# If $A = \begin{bmatrix} 1 & 2 & 2 \\[0.3em] 2 & 1 & 2 \\[0.3em] 2 & 2 & 1 \end{bmatrix}$ what is $$A^2-4A-5I=0$$

$\begin{array}{1 1} 1 \\ 2 \\ 0 \\ 3 \end{array}$

Toolbox:
• If A is an m-by-n matrix and B is an n-by-p matrix, then their matrix product AB is the m-by-p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B: $\begin{bmatrix}AB\end{bmatrix}_{i,j} = A_{i,1}B_{1,j} + A_{i,2}B_{2,j} + A_{i,3}B_{3,j} ... A_{i,n}B_{n,j}$
• The sum / difference $A(+/-)B$ of two $m$-by-$n$ matrices $A$ and $B$ is calculated entrywise: $(A (+/-) B)_{i,j} = A_{i,j} +/- B_{i,j}$ where 1 ≤ i ≤ m and 1 ≤ j ≤ n.
Step1:
Given:
A=$\begin{bmatrix}1 & 2 & 2\\2 & 1 & 2\\2 & 2&1\end{bmatrix}$
$A^2=A.A=\begin{bmatrix}1 & 2 & 2\\2 & 1 & 2\\2 & 2&1\end{bmatrix}\begin{bmatrix}1 & 2 & 2\\2 & 1 & 2\\2 & 2&1\end{bmatrix}$
$\quad=\begin{bmatrix}1(1)+2(2)+2(2) & 1(2)+2(1)+2(2)& 1(2)+2(2)+2(1)\\2(1)+1(2)+2(2) & 2(2)+1(1)+2(2) & 2(2)+1(2)+2(1)\\2(1)+2(2)+1(2) & 2(2)+2(1)+1(2)&2(2)+2(2)+1(1)\end{bmatrix}$
$\quad=\begin{bmatrix}1+4+4 & 2+2+4 &2+4+2\\2+2+4&4+1+4&4+2+2\\2+4+2&4+2+2&4+4+1\end{bmatrix}$
$\quad=\begin{bmatrix}9 & 8 &8\\8&9&8\\8&8&9\end{bmatrix}$
Step2:
We have to verify $A^2-4A-5I=0.$
$\Rightarrow\begin{bmatrix} 9 & 8 &8\\8 & 9 &8\\8& 8 &9\end{bmatrix}-4\begin{bmatrix}1 &2 &2\\2 &1 &2\\2 & 2& 1\end{bmatrix}-5\begin{bmatrix}1 &0 & 0\\0 &1 & 0\\0 & 0 &1\end{bmatrix}$
$\qquad=\begin{bmatrix} 9 & 8 &8\\8 & 9 &8\\8& 8 &9\end{bmatrix}+\begin{bmatrix}-4 &-8 &-8\\-8 &-4 &-8\\-8 & -8& -4\end{bmatrix}+\begin{bmatrix}-5 &0 & 0\\0 &-5 & 0\\0 & 0 &-5\end{bmatrix}$
$\qquad=\begin{bmatrix}9-4-5 & 8-8+0 & 8-8+0\\8-8+0 &9-4-5 & 8-8+0\\8-8+0&8-8+0&9-4-5\end{bmatrix}$
$\qquad=\begin{bmatrix}0 & 0 & 0\\0 &0 & 0\\0&0&0\end{bmatrix}$
$\Rightarrow A^2-4A-5I=0.$