Evaluating a function at a point where $x =$ matrix. Given $A=\left(
\begin{array} {lcr}
1 & -1\\
2 & 3
\end{array}
\right)$
and $f(x)=x^2-3x+3$ calculate $f(A)$.
I tried to consider the constant $3$ as $3$ times the identity matrix ($3I$) but the answer is wrong. Appreciate any ideas. 

We find that
$$
A^2 = \pmatrix{
-1 & -4\\
8 & 7}, \quad 
-3A = 
\pmatrix{
-3&3\\
-6&-9}, \quad
3I = \pmatrix{
3&0\\0&3
}
$$
Adding these together, we find
$$
f(A) = \pmatrix{
-1&-1\\
2&1
}
$$
