Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org
« Matrix Addition and Multiplication
Linear Algebra - Matrices: (lesson 3 of 3)

Inverse of a matrix by Gauss-Jordan elimination

To find the inverse of matrix $A$, using Gauss-Jordan elimination, it must be found the sequence of elementary row operations that reduces $A$ to the identity and, then, the same operations on $I_n$ must be performed to obtain $A^{-1}$.

Inverse of 2 $\times$ 2 matrices

Example 1: Find the inverse of

$A = \left[ {\begin{array}{*{20}{c}} 1&3\\ 2&7 \end{array}} \right]$

Solution:

Step 1: Adjoin the identity matrix to the right side of $A$:

$ A = \left[ {\begin{array}{*{20}{c}} 1&3\\ 2&7 \end{array}\left| {\begin{array}{*{20}{c}} \color{blue}{1}&\color{blue}{0}\\ \color{blue}{0}&\color{blue}{1} \end{array}} \right.} \right] $

Step 2: Apply row operations to this matrix until the left side is reduced to $I$. The computations are:

$$ \begin{aligned} &\left[ {\begin{array}{*{20}{c}} \color{red}{1}&\color{red}{3}\\ {2 - \color{blue}{2} \cdot \color{red}{1}}&{7 - \color{blue}{2} \cdot \color{red}{3}} \end{array}\left| {\begin{array}{*{20}{c}} \color{red}{1}&\color{red}{0}\\ {0 - \color{blue}{2} \cdot \color{red}{1}}&{1 - \color{blue}{2} \cdot \color{red}{0}} \end{array}} \right.} \right] \ \ Row2 = Row2 - \color{blue}{2} \cdot \color{red}{Row1} \\ &\left[ {\begin{array}{*{20}{c}} 1&3\\ 0&1 \end{array}\left| {\begin{array}{*{20}{c}} 1&0\\ { - 2}&1 \end{array}} \right.} \right] \\ &\left[ {\begin{array}{*{20}{c}} {1 - \color{blue}{3} \cdot \color{red}{0}}&{3 - \color{blue}{3} \cdot \color{red}{1}}\\ \color{red}{0}&\color{red}{1} \end{array}\left| {\begin{array}{*{20}{c}} {1 - \color{blue}{3} \cdot \color{red}{( - 2)}}&{0 - \color{blue}{3} \cdot \color{red}{1}}\\ \color{red}{ - 2}&\color{red}{1} \end{array}} \right.} \right] \ \ Row1 = Row1 - \color{blue}{3} \cdot \color{red}{Row2} \\ &\left[ {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}\left| {\begin{array}{*{20}{c}} 7&{ - 3}\\ { - 2}&1 \end{array}} \right.} \right] \end{aligned} $$

Step 3: Conclusion: The inverse matrix is:

$A^{-1} = \left[ {\begin{array}{*{20}{c}} 7&{-3}\\ {-2}&1 \end{array}} \right]$

Not invertible matrix

If $A$ is not invertible, then, a zero row will show up on the left side.

Example 2: Find the inverse of

$ A = \left[ {\begin{array}{*{20}{c}} 1&{ - 3}\\ { - 2}&6 \end{array}} \right] $

Solution:

Step 1: Adjoin the identity matrix to the right side of A:

$ \left[ {\begin{array}{*{20}{c}} 1&{ - 3}\\ { - 2}&6 \end{array}\left| {\begin{array}{*{20}{c}} \color{blue}{1}&\color{blue}{0}\\ \color{blue}{0}&\color{blue}{1} \end{array}} \right.} \right] $

Step 2: Apply row operations

$ \left[ {\begin{array}{*{20}{c}} \color{red}{1}&\color{red}{ - 3}\\ { - 2 + \color{blue}{2} \cdot \color{red}{1}}&{6 + \color{blue}{2} \cdot \color{red}{( - 3)}} \end{array}\left| {\begin{array}{*{20}{c}} \color{red}{1}&\color{red}{0}\\ {0 + \color{blue}{2} \cdot \color{red}{1}}&{1 + \color{blue}{2} \cdot \color{red}{0}} \end{array}} \right.} \right]Row2 = Row2 + \color{red}{2} \cdot \color{blue}{Row1} $

$ \left[ {\begin{array}{*{20}{c}} 1&{ - 3}\\ \color{red}{0}&\color{red}{0} \end{array}\left| {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}} \right.} \right]_{\color{red}{\leftarrow ZERO \ \ ROW}} $

Step 3: Conclusion: This matrix is not invertible.

Inverse of 3 $\times$ 3 matrices

Example 1: Find the inverse of

$ A = \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 2&5&3\\ 1&0&8 \end{array}} \right] $

Solution:

Step 1: Adjoin the identity matrix to the right side of A:

$ \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 2&5&3\\ 1&0&8 \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ 0&1&0\\ 0&0&1 \end{array}} \right.} \right] $

Step 2: Apply row operations to this matrix until the left side is reduced to I. The computations are:

$ \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 2&5&3\\ 1&0&8 \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ 0&1&0\\ 0&0&1 \end{array}} \right.} \right]\mathop { - - - - - - - \to }\limits_{R3 = R3 \color{red}{-} R1}^{R2 = R2 - \color{blue}{2} \cdot R1} \left[ {\begin{array}{*{20}{c}} 1&2&3\\ {2 - \color{blue}{2} \cdot 1}&{5 - \color{blue}{2} \cdot 2}&{3 - \color{blue}{2} \cdot 3}\\ {1 \color{red}{-} 1}&{0 \color{red}{-} 2}&{8 \color{red}{-} 3} \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ {0 - \color{blue}{2} \cdot 1}&{1 - \color{blue}{2} \cdot 0}&{0 - \color{blue}{2} \cdot 0}\\ {0 \color{red}{-} 1}&{0 \color{red}{-} 0}&{1 \color{red}{-} 0} \end{array}} \right.} \right] $

$ \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 0&1&{ - 3}\\ 0&{ - 2}&5 \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ { - 2}&1&0\\ { - 1}&0&1 \end{array}} \right.} \right]\mathop { - - - - - - - \to }\limits_{R3 = R3 \color{blue}{+ 2} \cdot R2}^{} \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 0&1&{ - 3}\\ {0 \color{blue}{+ 2} \cdot 0}&{ - 2 \color{blue}{+ 2} \cdot 1}&{5 \color{blue}{+ 2} \cdot ( - 3)} \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ { - 2}&1&0\\ { - 1 \color{blue}{+ 2} \cdot ( - 2)}&{0 \color{blue}{+ 2} \cdot 1}&{1 \color{blue}{+ 2} \cdot 0} \end{array}} \right.} \right] $

$ \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 0&1&{ - 3}\\ 0&0&{ - 1} \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ { - 2}&1&0\\ { - 5}&2&1 \end{array}} \right.} \right]\mathop { - - - - - - - \to }\limits_{R3 = - 1 \cdot R3}^{} \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 0&1&{ - 3}\\ 0&0&1 \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ { - 2}&1&0\\ 5&{ - 2}&{ - 1} \end{array}} \right.} \right] $

$ \left[ {\begin{array}{*{20}{c}} 1&2&3\\ 0&1&{ - 3}\\ 0&0&1 \end{array}\left| {\begin{array}{*{20}{c}} 1&0&0\\ { - 2}&1&0\\ { - 5}&{ - 2}&1 \end{array}} \right.} \right]\mathop { - - - - - - - \to }\limits_{R2 = R2 + 3 \cdot R3}^{R1 = R1 - 3 \cdot R3} \left[ {\begin{array}{*{20}{c}} 1&2&0\\ 0&1&0\\ 0&0&1 \end{array}\left| {\begin{array}{*{20}{c}} { - 14}&6&3\\ {13}&{ - 5}&{ - 3}\\ 5&{ - 2}&{ - 1} \end{array}} \right.} \right] $

$ \left[ {\begin{array}{*{20}{c}} 1&2&0\\ 0&1&0\\ 0&0&1 \end{array}\left| {\begin{array}{*{20}{c}} { - 14}&6&3\\ {13}&{ - 5}&{ - 3}\\ 5&{ - 2}&{ - 1} \end{array}} \right.} \right]\mathop { - - - - - - - \to }\limits_{}^{R1 = R1 - 2 \cdot R2} \left[ {\begin{array}{*{20}{c}} 1&1&0\\ 0&1&0\\ 0&0&1 \end{array}\left| {\begin{array}{*{20}{c}} { - 40}&{16}&9\\ {13}&{ - 5}&{ - 3}\\ 5&{ - 2}&{ - 1} \end{array}} \right.} \right] $

Step 3: Conclusion: The inverse matrix is:

$ A^{ - 1} = \left[ {\begin{array}{*{20}{c}} { - 40}&{16}&9\\ {13}&{ - 5}&{ - 3}\\ 5&{ - 2}&{ - 1} \end{array}} \right] $