Polynomial evaluated at a matrix (source code)

= Polynomial evaluated at a matrix
{title2=$p(A)=\sum_{j=0}^d a_jA^j$}

For a <polynomial> $p(t)=\sum_{j=0}^d a_jt^j$, substitute a fixed <square matrix> $A$ for $t$, taking $A^0=I$. In particular, $p(t)=t^2-3t+1$ becomes $p(A)=A^2-3A+I$, not $A^2-3A$ with the scalar $1$ added separately to each entry. <Polynomials> in the same <matrix> commute with each other, even though arbitrary <matrix multiplication> is <noncommutative>.