Linear algebra is an important subdivision of mathematics. We can use linear algebra, for instance, to perform linear regression. The `numpy.linalg`

subpackage holds linear algebra routines. With this subpackage, you can invert matrices, compute eigenvalues, solve linear equations, and find determinants among other matters. Matrices in NumPy are represented by a subclass of `ndarray`

.

The inverse of a square and invertible matrix `A`

in linear algebra is the matrix `A-1`

, which when multiplied with the original matrix is equal to the identity matrix `I`

. This can be written down as the following mathematical equation:

A A-1 = I

The `inv()`

function in the `numpy.linalg`

subpackage can do this for us. Let's ...

Start Free Trial

No credit card required