Is every non-diagonalizable matrix diagonalizable over a larger non-reduced commutative ring? Let $A$ be a square matrix with entries in some algebraically closed field $K$ (e.g., the complex numbers $\mathbb{C}$) and suppose that $A$ is not diagonalizable (so there is at least one eigenvalue of $A$ in $K$ for which the algebraic and geometric multiplicities differ).
Then, could $A$ still be diagonalized (i.e., of the form $PDP^{-1}$ with $P$ an invertible matrix and $D$ a diagonal matrix) over some commutative ring $R$ containing $K$? If so, must any such $R$ necessarily be non-reduced (i.e., contain a nonzero nilpotent element)?
If $A$ is of the form $N+\lambda{I_n}$ where $N$ is an $n \times n$ nilpotent matrix, $I_n$ is the $n \times n$ identity matrix, and $\lambda$ is the unique eigenvalue of $A$ with algebraic multiplicity $n$ (but a smaller geometric multiplicity), then assuming that the ring $R$ exists, it must be non-reduced, because all diagonal entries of $D-\lambda{I_n}$ must be nilpotent with at least one of them nonzero.
An obvious way to try to construct the $K$-algebra $R$ is to just adjoin $n^2+n+1$ elements $x_{11},...,x_{nn},y_1,...,y_n,z$ to $K$, let $P$ be the matrix of the $x_{ij}$s and $D$ be the diagonal matrix with the $y_i$s on the diagonal, and identity $AP$ with $PD$ (entrywise) and $z$ as the multiplicative inverse of the determinant of $P$. But this could lead to the zero $K$-algebra, so one needs to show this $K$-algebra is in fact nonzero.
 A: No: if $A$ is not diagonalizable over $K$ then it is not diagonalizable over any nonzero commutative $K$-algebra $R$.  There are some hands-on ways to prove this (for instance, using Jordan normal forms) but here is a very slick argument.  By the Nullstellensatz, any nonzero finitely generated $K$-algebra $R$ has a homomorphism $R\to K$.  Although the $R$ we start with may not be finitely generated, we can replace $R$ with the subalgebra generated by all the entries of $P$, $D$, and $P^{-1}$ to assume that it is.  Then applying a homomorphism $R\to K$ to the entries of $P$ and $D$, we would get a diagonalization of $A$ over $K$.
A: Consider a matrix $A\in M_n(\mathbb{Z})$ that is not diagonalizable over any field. For instance, we can consider $A=J_{n, 1}$, a Jordan cell.
First, consider a domain $R$. Let $K$ be the field of fractions of $B$. Let now a matrix, $B \in M_n(R)$,  $D$ a diagonal $D$ such that
$$D B = B A$$
Since an equality $D= B A B^{-1}$ is not possible, we conclude that $B$ is not invertible in $M_n(K)$, and so
$$\det B=0$$
Let now $R$ be any commutative ring with $1$. Let $B \in M_n(R)$, diagonal $D \in M_n(R)$, such that $D B= B A$. Let $\mathfrak{p}$ a prime ideal of $R$.   Apply the statement previous implications for every  domain $R/\mathfrak{p}$.   We conclude that $\det (\overline{B})= 0$ in $R/\mathfrak{p}$, and so $\det (B) \in \mathfrak{p}$. Therefore:
$$\det B\in \bigcap_{\mathfrak{p}\in \operatorname{Spec}(R)} \mathfrak{p} = \operatorname{\mathcal{N}}(R)$$ the nilpotent radical of $R$, that is, $\det B$ is nilponent.
We can make this effective in some small cases. Consider the ideal generated by the entries of the matrix
$$\left(\begin{matrix} a & b\\c& d\end{matrix}\right)\left(\begin{matrix} 1 & 1\\0& 1\end{matrix}\right)- \left(\begin{matrix} s & 0\\0& t\end{matrix}\right)\left(\begin{matrix} a & b\\c& d\end{matrix}\right)$$
that is
$$I \colon =(a - a s, a + b - b s, c - c t, c + d - d t)$$
Then we can see that  we have
$$(a d - b c)^3 \in I$$
in the ring $\mathbb{Z}[a,b,c,d,s,t]$.
It would be interesting to have an effective      result for higher $n$'s, of the sort: if $A$ is not diagonalizable over any field, and $B A = D B$, then $\det B^{n+1}=0$ ( a wild guess, worth testing for small cases).
$\bf{Added:}$ I tested for $3\times 3$ matrices $B$ and $A= J_{3, 0}$ the nilpotent Jordan cell, that $\det B ^4$ belongs to the ideal of the entries of $B A- D B$, while $\det B^3$ does not. Now we got ourselves a nice conjecture, or it might be known already.
