3 (source code)

= 3
{scope}

Use ordinary <matrix> addition and multiplication on $R=K[A]$. Sums and products of <polynomials> in $A$ remain such <polynomials>, and they commute because powers of the same <matrix> commute. The identity is $A^0=I$. Evaluation $\phi(\sum c_iX^i)=\sum c_iA^i$ is a surjective unital <algebra homomorphism> over $K$. It is unique among maps fixing the scalar <matrices> and sending $X$ to $A$.

The scalar condition is needed for the word “unique”: as an unrestricted ring-homomorphism assertion over an arbitrary <field>, prescribing only the image of $X$ does not suffice. For example, over $\mathbb C$ with a real scalar <matrix> $A$, conjugating every coefficient gives another unital <ring homomorphism> with the same image of $X$. The intended <polynomial>-evaluation map is the $K$-algebra map just defined.

The <kernel of a ring homomorphism> is an <ideal> of the <principal ideal domain> $K[X]$. It is nonzero because finitely many powers of $A$ must become linearly dependent in the finite-dimensional <matrix> space. Its unique <monic polynomial>[monic] generator is precisely the <minimal polynomial> $m$: division by $m$ shows that a <polynomial> killing $A$ has zero remainder, by minimality. Hence $\ker\phi=(m)$ and $R\cong K[X]/(m)$.

If $\gcd(f,m)=1$, <Bézout's identity> gives $uf+vm=1$; evaluation gives $u(A)f(A)=I$. Conversely an inverse in $R$ has form $g(A)$, so $fg-1\in(m)$, which forces $\gcd(f,m)=1$. Thus invertibility in this ring is exactly <coprimality> with the <minimal polynomial>.