solve: first factorizes *A* using LU decomposition, then solves for *x*using forward and backward substitution

inv: uses the same method to compute the inverse of *A* by solving for *A*^{-1} in *A·A*^{-1} = I where *I* is the identity*. The factorization step is exactly the same as above, but it takes more floating point operations to solve for *A*^{-1} (an *n×n* matrix) than for *x* (an *n*-long vector).

#### Reference

https://stackoverflow.com/questions/31256252/why-does-numpy-linalg-solve-offer-more-precise-matrix-inversions-than-numpy-li/31257909

### Like this:

Like Loading...

*Related*