|
・In Japanese
■Explanation of linalg.solve
linalg.solve solves systems of simultaneous equations.
You can solve simultaneous equations by using a matrix and then multiplying it by its inverse, as shown below.
■Examples using linalg.solve
You need to install the numpy library.
import numpy as np
A = np.array([[2, 1], [1,2]])
B = np.array([4, 5])
k = np.linalg.solve(A, B)
print(k)
⇒ [1. 2.]
|
|