Solve the linear equations system AX = B in Python, np.linalg.solve not working
问题 I'm trying to solve the linear equation AX=B where A,X,B are Matrices. I've tried using the np.linalg.solve function of numpy but the result seems to be wrong. Example: Matrix A [9 1 8] [3 2 5] [1 6 5] Matrix B [7 0 5] [7 8 4] [5 6 7] So to solve X, i've used: X = np.linalg.solve(A,B) The result is: X [ 1.17521368 -0.17948718 0.40598291] [ 0.20512821 -0.30769231 0.74358974] [-0.56410256 -0.15384615 1.20512821] But if i try to verify the result by multiplying A by X, the result is anything but