Computational Physics, Python, Linear Algebra, Math, Mathematics.
pseudo-inverse to find the equation of the line minimizing the error (difference between the line and the actual data points). Let’s start with the creation of the matrix of A and b: A = np.array([[0, 1], [1, 1], [2, 1], [3, 1], [3, 1], [4, 1]]) A array([[0, 1], [1, 1], [2, 1], [3, 1], [3, 1], [4,