The Similarity of a Matrix with its Diagonal Matrix of Eigenvalues When is a matrix $A$ similar to its diagonal matrix $D$ of eigenvalues? Evidently the two matrices have the same eigenvalues, but this by itself is not enough to conclude similarity. If the eigenvalues are distinct, the matrices are similar. If $A$ is diagonalizable, then we have such similarity by definition. Can we say anything better?
 A: You need a basis for the vector space consisting of eigenvectors of the matrix.  Of course, if all eigenvalues are different then their corresponding eigenvectors are independent so form a basis.  But two or more eigenvalues can be the same as long as their corresponding eivenvectors are independent.
A: For Will Jagy's example, $\begin{bmatrix}1 & 1 \\ 0 & 1 \end{bmatrix}$ the eigenvalue equation is $\left|\begin{array}{cc} 1- \lambda & 0 \\ 0 & 1- \lambda \end{array}\right|= (1- \lambda)^2= 0$ which has the double root $\lambda= 1$.  What are its eigenvectors?  If $\begin{bmatrix}x \\ y\end{bmatrix}$ is an eigenvector corresponding to  eigenvalue 1 then we must have $\begin{bmatrix}1 & 1 \\  0 & 
 1\end{bmatrix}\begin{bmatrix}x \\ y \end{bmatrix}= \begin{bmatrix} x+ y \\  y\end{bmatrix}= \begin{bmatrix}x \\ y\end{bmatrix}$.  We must have x+ y= x and y= y.  The first equation gives y= 0 while the second equation does not give a value for x.  Any vector of the form $\begin{bmatrix} x \\ 0 \end{bmatrix}$ is an eigenvector.  Clearly there is no basis for $R^2$ consisting of eigenvectors so this matrix cannot be diagonalized.
On the other hand, the matrix $\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}$ already is* diagonal even though its only eigenvalue is 1. There are two independent eigenvectors coorespondng t that eigenvalue, $\begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\begin{bmatrix}0 \\ 1 \end{bmatrix}$.
