Skip to main content
Logo image

Section 4.4 Matrix Inversion - First Steps

So far we have looked at addition, subtraction and multiplication of matrices. It would be quite natural to next study matrix division. But... Well, you can’t simply divide by a matrix, can you?
The idea of division is really to have an operation that “undoes” multiplication. For example, starting with the number 5, multiplying it by 3 gets you to 15. To undo this operation we need to divide the 15 by 3 and we find ourselves back at 5.
Extrapolating this idea to matrices would mean to find an operation that can undo matrix multiplication. This will naturally be a bit more complicated than regular division of numbers since matrix multiplication is already a bit prickly to begin with. This is where the matrix inverse comes into the picture. Don’t worry, MATLAB can do it all.
The matrix inverse is very useful in many situations, amongst them solving systems of equations.
Consider the following system of equations, where there are 3 unknowns and 3 equations. This means a unique solution exists (unless the equations are linearly dependent). We could solve this system by substitution for example, or we can put it into matrix form and solve with MATLAB!
5x + 3y +  -9z  = 21
8x +  y +   2z  = 13
3x + 6y +  -2z  = 81
Now let’s put the system into matrix form:
A            *   x   =   b
\(\begin{bmatrix}5 & 3 & -9\\8 & 1 & 2\\3 & 6 & -2\end{bmatrix} * \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} 21\\ 13\\ 81 \end{bmatrix}\)
In this form, matrix A and vector b contain known values and vector x contains the unknowns for which we are solving.
\(\begin{bmatrix}a_{11} & a_{12} & a_{13}\\a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\end{bmatrix} * \begin{bmatrix} x_1\\ x_2\\ x_3 \end{bmatrix} = \begin{bmatrix} b_1\\ b_2\\ b_3 \end{bmatrix}\)
So ideally, we’d want to “divide” by the matrix A in order to solve for the vector x. But again, there is no such thing as division by a matrix. Instead, such a matrix equation can be solved using the matrix inverse of A, also denoted \(A^{-1}\) (if it exists). In the following equation, \(I\) denotes the identity matrix (that is, a square matrix with ones along the entire diagonal and zeros elsewhere):
\begin{equation*} A x = b \Longrightarrow A^{-1} A x = A^{-1} b \Longrightarrow I x = A^{-1} b \end{equation*}
This means that if the matrix inverse of A exists then we can solve for \(x\) like this:
\begin{equation*} x = A^{-1} b \end{equation*}