Matrix Inverse

The inverse of a Matrix Transformation is a matrix that reverses the transformation.

For example, if our matrix transform did a 90° anticlockwise rotation, the inverse matrix would do a 90° clockwise rotation.

Inverse transformation example

We represent the inverse of a matrix AA as A1A^{-1}.

When you multiply a matrix by its inverse, you get the Identity Matrix back: AA1=IA \cdot A^{-1} = I

It's the equivalent of the reciprocal of a number in scalar math, ie 10110=110 * \frac{1}{10} = 1 or 10101=110 \cdot 10^{-1} = 1

For a 2×22 \times 2 matrix, we calculate the inverse as follows:

[abcd]1=1adbc[dbca]\begin{bmatrix}a & b \\ c & d\end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix}d & -b \\ -c & a\end{bmatrix}

For example:

[1324]1=11×43×2[4321]=12[4321]=[21.510.5]\begin{bmatrix}1 & 3 \\ 2 & 4\end{bmatrix}^{-1} = \frac{1}{1 \times 4 - 3 \times 2} \begin{bmatrix}4 & -3 \\ -2 & 1\end{bmatrix} = -\frac{1}{2} \begin{bmatrix}4 & -3 \\ -2 & 1\end{bmatrix} = \begin{bmatrix}-2 & 1.5 \\ 1 & -0.5\end{bmatrix}

We can do a matrix multiplication to confirm the identity matrix is returned:

[1324][21.510.5]=[1001]\begin{bmatrix}1 & 3 \\ 2 & 4 \end{bmatrix} \begin{bmatrix}-2 & 1.5 \\ 1 & -0.5\end{bmatrix} = \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}

We can also use the np.linalg.inv method in Numpy to find the inverse.

The adbcad-bc part of the expression is the Matrix Determinate.

For a larger matrix, we can use Gaussian Elimination to invert a matrix.

Dye et al. (2018)

A matrix with a determinate of 0: A=0|A| = 0 is referred to as a Singular Matrix and has no inverse.

We can only calculate the inverse of a square matrix.

KhanAcademyLabs (2008)

References

David Dye, Sam Cooper, and Freddie Page. Mathematics for Machine Learning: Linear Algebra - Home. 2018. URL: https://www.coursera.org/learn/linear-algebra-machine-learning/home/welcome.

Khan Academy Labs. Introduction to matrix inverses. June 2008. URL: https://www.khanacademy.org/math/algebra-home/alg-matrices#alg-intro-to-matrix-inverses.


Backlinks