If $A=\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]$, show that $A^{2}-5 A+7 I=O$. Hence find $A^{-1}$.
$A=\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]$
$A^{2}=A \cdot A=\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]=\left[\begin{array}{ll}9-1 & 3+2 \\ -3-2 & -1+4\end{array}\right]=\left[\begin{array}{rr}8 & 5 \\ -5 & 3\end{array}\right]$
$\therefore A^{2}-5 A+7 I$
$=\left[\begin{array}{rr}8 & 5 \\ -5 & 3\end{array}\right]-5\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]+7\left[\begin{array}{ll}1 & 0 \\ 0 & 1\end{array}\right]$
$=\left[\begin{array}{rr}8 & 5 \\ -5 & 3\end{array}\right]-\left[\begin{array}{cc}15 & 5 \\ -5 & 10\end{array}\right]+\left[\begin{array}{cc}7 & 0 \\ 0 & 7\end{array}\right]$
$=\left[\begin{array}{ll}-7 & 0 \\ 0 & -7\end{array}\right]+\left[\begin{array}{ll}7 & 0 \\ 0 & 7\end{array}\right]=\left[\begin{array}{ll}0 & 0 \\ 0 & 0\end{array}\right]$
Hence, $A^{2}-5 A+7 I=O$.
$\therefore A \cdot A-5 A=-7 I$
$\Rightarrow A \cdot A\left(A^{-1}\right)-5 A A^{-1}=-7 I A^{-1} \quad\left[\right.$ Post-multiplying by $A^{-1}$ as $\left.|A| \neq 0\right]$]
$\Rightarrow A\left(A A^{-1}\right)-5 I=-7 A^{-1}$
$\Rightarrow A I-5 I=-7 A^{-1}$
$\Rightarrow A^{-1}=-\frac{1}{7}(A-5 I)$
$\Rightarrow A^{-1}=\frac{1}{7}(5 I-A)$
$=\frac{1}{7}\left(\left[\begin{array}{ll}5 & 0 \\ 0 & 5\end{array}\right]-\left[\begin{array}{rr}3 & 1 \\ -1 & 2\end{array}\right]\right)=\frac{1}{7}\left[\begin{array}{rr}2 & -1 \\ 1 & 3\end{array}\right]$
$\therefore A^{-1}=\frac{1}{7}\left[\begin{array}{lr}2 & -1 \\ 1 & 3\end{array}\right]$