A = np.array([[4, 3, 2], [-2, 2, 3], [3, -5, 2]]) # matrix b = np.array([25, -10, -4]) # b vector X = np.linalg.inv(A).dot(b) # returns values for x, y and z #or X = np.linalg.solve(A, b)