I am reading a proof of the Cayley-Hamilton theorem here. For a rough outline of the proof, let $A$ be a matrix representing the endomorphism $\phi$ over finitely-generated module $M$ with generators $m_1,...,m_n$. Now, we can regard $M$ as an $R[x]$-module by letting $x$ act as $\phi$.
This next part is where I am confused. They let $\mathfrak{m}$ the column vector whose entries are the $m_j$. Then, we get $(xI-A)\mathfrak{m}=0$, which I guess works by letting matrix multiplication be letting the elements in the matrix with coefficients in $R[x]$ act on the elements of $\mathfrak{m}$.
The next step multiplies both sides by the adjugate matrix to get $[\det(xI-A)]I\cdot\mathfrak{m}=0$, which then completes the proof, as we $p(\phi)=0$, where $p(x):=\det(xI-A)$.
I guess my real question is: what is actually going on? I've never seen matrices used this way; is this just a formal manipulation? But then it feels like multiplying by the adjugate matrix is "wrong". How do I know that the manipulation in $R[x]$ preserves the module action structure? I'm sorry for phrasing this poorly but I just have a feeling that something is off and I may not have it articulated it that well.