If $A=\left[\begin{array}{ccc}2 & -1 & 1 \\ -1 & 2 & -1 \\ 1 & -1 & 2\end{array}\right]$. Verify that $A^{3}-6 A^{2}+9 A-4 I=O$ and hence find $A^{-1}$.
$A=\left[\begin{array}{lll}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\left.\begin{array}{lll}1 & -1 & 2\end{array}\right]$
$\Rightarrow|A|=\mid 2 \quad-1 \quad 1$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\begin{array}{lll}1 & -1 & 2 \mid=2 \times(4-1)+1(-2+1)+1(1-2)=6-1-1=4\end{array}$
Since, $|A| \neq 0$
Hence, $A^{-1}$ exists.
Now,
$A^{2}=\left[\begin{array}{lll}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\left.\begin{array}{lll}1 & -1 & 2\end{array}\right]\left[\begin{array}{lll}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$1 \quad-1 \quad 2 \quad 2]=\left[\begin{array}{llllllll}4+1+1 & -2-2-1 & 2+1+2-2-2-1 & 1+4+1 & -1-2-2 & 2+1+2 & -1-2-2 & 1+1+4\end{array}\right]$
$=\left[\begin{array}{lll}6 & -5 & 5\end{array}\right.$
$\begin{array}{lll}-5 & 6 & -5\end{array}$
$5 \quad-5 \quad 6]\left[\begin{array}{lll}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\begin{array}{lll}1 & -1 & 2\end{array}=\left[\begin{array}{lllllll}12+5+5 & -6-10-5 & 6+5+10-10-6-5 & 5+12+5 & -5-6-10 & 10+5+6 & -5-10-6 & 5+5+12\end{array}\right]$
$=\left[\begin{array}{lll}22 & -21 & 21\end{array}\right.$
$\begin{array}{ccr}-21 & 22 & -21 \\ 21 & -21 & 22\end{array}$
Now, $A^{3}-6 A^{2}+9 A-4 I=\left[\begin{array}{lll}22 & -21 & 21\end{array}\right.$
$\begin{array}{lll}-21 & 22 & -21\end{array}$
$\left.\begin{array}{lll}21 & -21 & 22\end{array}\right]-6\left[\begin{array}{lll}6 & -5 & 5\end{array}\right.$
$\begin{array}{lll}-5 & 6 & -5\end{array}$
$\begin{array}{lll}5 & -5 & 6\end{array}+9\left[\begin{array}{ccc}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\left.\begin{array}{lll}1 & -1 & 2\end{array}\right]-4\left[\begin{array}{lll}1 & 0 & 0\end{array}\right.$
$\begin{array}{ccc}0 & 1 & 0 \\ 0 & 0 & 1]\end{array}$
$=\left[\begin{array}{lllll}22-36+18-4 & -21+30-9-0 & 21-30+9-0-21+30-9-0 & 22-36+18-4 & -21+30-9-0 & 21-30+9-0 & -21+30-9-0 & 22-36+18-4\end{array}\right]$
$=\left[\begin{array}{lll}0 & 0 & 0\end{array}\right.$
$\begin{array}{lll}0 & 0 & 0\end{array}$
$\left.\begin{array}{lll}0 & 0 & 0\end{array}\right]=O[$ : matrix $]$
Hence proved.
Now, $A^{3}-6 A^{2}+9 A-4 I=O$
$\Rightarrow A^{-1} \times\left(A^{3}-6 A^{2}+9 A-4 I\right)=A^{-1} \times O$
$\Rightarrow A^{2}-6 A+9 I-4 A^{-1}=O$
$\Rightarrow 4 A^{-1}=A^{2}-6 A+9 I$
$\Rightarrow 4 A^{-1}=\left[\begin{array}{lll}6 & -5\end{array}\right.$
$\begin{array}{lll}-5 & 6 & -5\end{array}$
$5 \quad-5 \quad 6]-6\left[\begin{array}{lll}2 & -1 & 1\end{array}\right.$
$\begin{array}{lll}-1 & 2 & -1\end{array}$
$\left.\begin{array}{lll}1 & -1 & 2\end{array}\right]+9\left[\begin{array}{lll}1 & 0 & 0\end{array}\right.$
$\begin{array}{lll}0 & 1 & 0\end{array}$
$\left.\begin{array}{lll}0 & 0 & 1\end{array}\right]$
$\Rightarrow 4 A^{-1}=\left[\begin{array}{llllll}6-12+9 & -5+6+0 & 5-6+0-5+6+0 & 6-12+9 & -5+6+0 & 5-6+0 & -5+6+0 & 6-12+9\end{array}\right]$
$\Rightarrow 4 A^{-1}=\left[\begin{array}{lll}3 & 1 & -1\end{array}\right.$
$\begin{array}{lll}1 & 3 & 1\end{array}$
$\left.\begin{array}{lll}-1 & 1 & 3\end{array}\right]$
$\Rightarrow A^{-1}=\frac{1}{4}\left[\begin{array}{lll}3 & 1 & -1\end{array}\right.$
$\begin{array}{lll}1 & 3 & 1\end{array}$
$\left.\begin{array}{lll}-1 & 1 & 3\end{array}\right]$