Problem: I need to solve these equations with Python.
a + 3b + 2c + 2d = 1
2a + b + c + 2d = 0
3a + b + 2c + d = 1
2a + c + 3d = 0
So I can get the value for a, b, c and d. Is there a way that I can show them in a fraction?
My code:
import numpy as np
A = np.array([[1,3,2,2],[2,1,1,2]])
B = np.array([1,0,1,0])
X2 = np.linalg.solve(A,B)
Error:
LinAlgError: Last 2 dimensions of the array must be square