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. 

$f(A) = \begin{pmatrix}
1 & -1 \\ 2 & 3  
\end{pmatrix}^2 - 3\begin{pmatrix} 1 & -1 \\ 2 & 3   \end{pmatrix} + 3\begin{pmatrix}
1 & 0 \\ 0 & 1  
\end{pmatrix} $
$f(A) = \begin{pmatrix}
-1 & -4 \\ 8 & 7  
\end{pmatrix} + \begin{pmatrix}
-3 & 3 \\ -6 & -9  
\end{pmatrix} + \begin{pmatrix}
3 & 0 \\ 0 & 3  
\end{pmatrix}$
$f(A) = \begin{pmatrix}
-1 & -1 \\ 2 & 1  
\end{pmatrix}$
