from scipy import matrix from scipy import linalg a = matrix([[1, 1],[2, 4]]) b = matrix([[10],[26]]) x = linalg.solve(a, b) print(x)