Make calculate_matrix module