Let's say $f \in \mathbb{Q}[X]$ and $A \in \mathbb{Q}^{2 \times 2}$. Now let $f$ be $f = X^3+2X^2+3X+4$ and $A$ be $A = \begin{pmatrix} 1 & -1 \\ 2 & 3 \end{pmatrix}$ how do we calculate the matrix $f(A)$?
I know from the solution, that the $(2,2)$ entry of $f(A)$ is $40$. However, I don't see how we' d calculate that. I've tried reversing the solution but I did not come far.