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.
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$.