Dividing a Matrix into three parts The matrix $A$ is given by $$\left(\begin{array}{ccc}
1 & 2 & 1 \\
1 & 1 & 2 \\
2 & 3 & 1 \end{array} \right)$$
Given that $A^3$ can be expressed as $A^3$=$aA^2+bA+cI$, find the values of $a,b,c$. Furthermore, express the inverse $A^{-1}$ in the form $A^{-1}$=$dA^2+eA+fI$, where $d$,$e$, and $f$ are rational numbers
I was given this problem in a homework set and did not make much progress. I'm not sure as to how I should separate matrix $A$ into three components.

Calculating $\det(A-\lambda I)=\det\begin{pmatrix}1-\lambda&2&1\\1&1-\lambda&2\\2&3&1-\lambda\end{pmatrix}$ gives
$\hspace{.3 in}(1-\lambda)^3+11-10(1-\lambda)=-(\lambda^3-3\lambda^2-7\lambda-2)$, 
so by the Cayley-Hamilton theorem, $\;\;A^3-3A^2-7A-2I=0$
and therefore $\;\;A\big[\frac{1}{2}(A^2-3A-7I)\big]=I$.

Alternatively, using the idea suggested by hkmather802,  we can find $A^2$ and $A^3$ to get the equation
$\begin{pmatrix}24&35&25\\25&36&29\\35&51&36\end{pmatrix}=a\begin{pmatrix}5&7&6\\6&9&5\\7&10&9\end{pmatrix}+b\begin{pmatrix}1&2&1\\1&1&2\\2&3&1\end{pmatrix}+c\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}$.
Just using the first row, we get the linear system
$5a+b+c=24,\;\;7a+2b=35,\;\;6a+b=25$;
so solving the last two equations gives $a=3, b=7$; and substituting in the 1st equation gives $c=2$.
