Finding the inverse of an invertible $n\times n$ matrix
The adjoint of a square matrix
Theorem: key property of the adjoint of a square matrix
If $A$ is any $n\times n$ matrix and $J$ is its adjoint, then $AJ=(\det A)I_n=JA$.
Proof
- Omitted
Corollary: a formula for the inverse of a square matrix
If $A$ is any $n\times n$ matrix with $\det(A)\ne 0$, then $A$ is invertible, and $A^{-1}=\frac1{\det A}J$ where $J$ is the adjoint of $A$.
Proof
- Divide the equation $AJ=(\det A)I_n=JA$ by $\det A$.
- $A(\frac1{\det A}J)=I_n=(\frac1{\det A}J)A$
- So $A^{-1}=\frac1{\det A} J$. ■
Example: $n=2$
If $A=\def\mat#1{\begin{bmatrix}#1\end{bmatrix}}\def\vm#1{\begin{vmatrix}#1\end{vmatrix}}\mat{a&b\\c&d}$, then $C=\mat{d&-c\\-b&a}$, so the adjoint of $A$ is $J=C^T=\mat{d&-b\\-c&a}$.
- So if $\det A\ne0$, then $A^{-1}=\frac1{\det A}J=\frac1{ad-bc}\mat{d&-b\\-c&a}$.
- Same as previous formula!
Example: $n=3$
Find $J$, the adjoint of $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$, and compute $AJ$, $JA$, $\det(A)$ and $A^{-1}$.
- Matrix of signs: $\mat{+&-&+\\-&+&-\\+&-&+}$
- Matrix of cofactors: $C=\def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|}\mat{\vm{-4&3\\4&-2}&-\vm{-2&3\\5&-2}&\vm{-2&-4\\5&4}\\-\vm{1&0\\4&-2}&\vm{3&0\\5&-2}&-\vm{3&1\\5&4}\\\vm{1&0\\-4&3}&-\vm{3&0\\-2&3}&\vm{3&1\\-2&-4}}= \mat{-4&11&12\\2&-6&-7\\3&-9&-10}$
- Adjoint of $A=\mat{3&1&0\\-2&-4&3\\5&4&-2}$ is $J=C^T=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}$
- $AJ=\mat{3&1&0\\-2&-4&3\\5&4&-2}\mat{-4&2&3\\11&-6&-9\\12&-7&-10}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$
- $JA=\mat{-4&2&3\\11&-6&-9\\12&-7&-10}\mat{3&1&0\\-2&-4&3\\5&4&-2}=\mat{-1&0&0\\0&-1&0\\0&0&-1}=-1\cdot I_3$
- So $\det(A)=-1$.
- So $A^{-1}=\frac1{\det(A)}J=-J=\mat{4&-11&-12\\-2&6&7\\-3&9&10}$.
Example ($n=4$)
Let $A=\mat{1&0&0&0\\1&2&0&0\\1&2&3&0\\1&2&3&4}$.
- Reminder: repeated row or zero row gives determinant zero
- $C=\mat{+\vm{2&0&0\\2&3&0\\2&3&4}&-\vm{1&0&0\\1&3&0\\1&3&4}&+0&-0\\-0&+\vm{1&0&0\\1&3&0\\1&3&4}&-\vm{1&0&0\\1&2&0\\1&2&4}&+0\\+0&-0&+\vm{1&0&0\\1&2&0\\1&2&4}&-\vm{1&0&0\\1&2&0\\1&2&3}\\-0&+0&-0&+\vm{1&0&0\\1&2&0\\1&2&3}}=\mat{24&-12&0&0\\0&12&-8&0\\0&0&8&-6\\0&0&0&6}$
Example ($n=4$)
Let $A=\mat{1&0&0&0\\1&2&0&0\\1&2&3&0\\1&2&3&4}$.
- $C=\mat{24&-12&0&0\\0&12&-8&0\\0&0&8&-6\\0&0&0&6}$ so $J=C^T=\mat{24&0&0&0\\-12&12&0&0\\0&-8&8&0\\0&0&-6&6}$.
- So $A^{-1}=\frac1{\det A}J = \frac1{24}\mat{24&0&0&0\\-12&12&0&0\\0&-8&8&0\\0&0&-6&6}=\mat{1&0&0&0\\-1/2&1/2&0&0\\0&-1/3&1/3&0\\0&0&-1/4&1/4}$.
- (Easy to check that $AA^{-1}=I_4=A^{-1}A$.)
A more efficient way to find $A^{-1}$
- Given an $n\times n$ matrix $A$, form the $n\times 2n$ matrix $\def\m#1{\small\left[\begin{array}{@{} c|c {}@}#1\end{array}\right]}\m{A&I_n}$.
- One of two things can happen:
- you get a row of the form $[0~0~\dots~0~|~*~*~\dots~*]$ which starts with $n$ zeros. You can then conclude that $A$ is not invertible.
- OR you get a matrix of the form $\m{I_n&B}$ for some $n\times n$ matrix $B$. You can then conclude that $A$ is invertible, and $A^{-1}=B$.
Examples
- Consider $A=\def\mat#1{\begin{matrix}#1\end{matrix}}\left[\mat{1&3\\2&6}\right]$. \begin{align*}\m{A&I_2}&=\m{\mat{1&3\\2&6}&\mat{1&0\\0&1}} \def\go#1#2{\m{\mat{#1}&\mat{#2}}} \def\ar#1{\\[6pt]\xrightarrow{#1}&} \ar{R2\to R2-2R1}\go{1&3\\0&0}{1&0\\-2&1} \end{align*} Conclusion: $A$ is not invertible.
- Consider $A=\left[\mat{1&3\\2&7}\right]$.\begin{align*}\m{A&I_2}&=\m{\mat{1&3\\2&7}&\mat{1&0\\0&1}} \ar{R2\to R2-2R1}\go{1&3\\0&1}{1&0\\-2&1} \ar{R1\to R1-3R1}\go{1&0\\0&1}{7&-3\\-2&1} \end{align*} Conclusion: $A$ is invertible and $A^{-1}=\left[\mat{7&-3\\-2&1}\right]$.
- Consider $A=\left[\mat{3&1&0\\-2&-4&3\\5&4&-2}\right]$.\begin{align*}\m{A&I_3}&=\go{3&1&0\\-2&-4&3\\5&4&-2}{1&0&0\\0&1&0\\0&0&1} \ar{R1\to R1+R2} \go{1&-3&3\\-2&-4&3\\5&4&-2}{1&1&0\\0&1&0\\0&0&1}\end{align*}
\begin{align*} \ar{R2\to R2+2R1,\ R3\to R3-5R1} \go{1&-3&3\\0&-10&9\\0&19&-17}{1&1&0\\2&3&0\\-5&-5&1} \ar{R3\leftrightarrow R2} \go{1&-3&3\\0&19&-17\\0&-10&9}{1&1&0\\-5&-5&1\\2&3&0}\end{align*}
\begin{align*} \ar{R2\to R2+2R3} \go{1&-3&3\\0&-1&1\\0&-10&9}{1&1&0\\-1&1&1\\2&3&0} \ar{R1\to R1+3R2,\ R3\to R3-10R2} \go{1&0&0\\0&-1&1\\0&0&-1}{4&-2&3\\-1&1&1\\12&-7&-10}\end{align*}
\begin{align*} \ar{R2\to R2+R3} \go{1&0&0\\0&-1&0\\0&0&-1}{4&-2&3\\11&-6&-9\\12&-7&-10} \ar{R2\to -R2,\ R3\to -R3} \go{1&0&0\\0&1&0\\0&0&1}{4&-2&3\\-11&6&9\\-12&7&10}\end{align*}
- So $\m{A&I_3}\xrightarrow{\text{EROs}}\go{1&0&0\\0&1&0\\0&0&1}{4&-2&3\\-11&6&9\\-12&7&10}$
- Conclusion: $A$ is invertible, and $A^{-1}=\left[\mat{4&-2&3\\-11&6&9\\-12&7&10}\right]$.

