solve ax=b python 1

solve ax=b python

a = np.array([[1, 2], [3, 5]])

b = np.array([1, 2])

x = np.linalg.solve(a, b)

Here is what the above code is Doing:
1. We create a 2×2 matrix called a.
2. We create a 1×2 matrix called b.
3. We solve the equation ax = b for x.

Similar Posts