Matrix Operations
This lesson discusses various matrix operations.
We'll cover the following
Inverse
Suppose we have to solve the equation for .
If vector changes, one has to call np.linalg.solve()
over and over. Instead, if were calculated once, matrix multiplication with could be done over and over, more efficiently, to obtain different solutions.
The inverse of a matrix may be computed with the inv
function of the linalg
package.
Let’s use the inverse of the matrix to obtain the solution to the problem in the first lesson.
If the inverse of matrix A
is called Ainv
, the solution for the equation may be obtained through matrix multiplication of Ainv
with the right-hand side. Let’s look at an implementation of this below.
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy