Does "identical eigenvalues" mean that there is no diagonal matrix? If I have a 2 x 2 matrix and eigenvalues for that matrix are 3,3, does this mean that there exits no diagonal matrix? 
If I have 2 distinct eigenvalues, then eigenvectors corresponding to two distinct 
eigenvalues are independent and form a basis. Then I can find out a diagonal matrix having 
eigenvalues as entries. But, I am not sure whether having identical eigenvalues means that 
there is no diagonal matrix. 
 A: The eigenvalues for the diagonal matrix $\left(\begin{smallmatrix} x & 0 \\ 0 & x\end{smallmatrix}\right)$ are $x$ and $x$... so having repeated eigenvalues certainly doesn't mean non-diagonalizability.
A: What are the eigenvalues of the identity matrix?
A: Well, you can consider the identity matrix, $I$, which has unique eigenvalue $1$ - and it is already in diagonal form. 
What we want here is that the $2\times2$ matrix is diagonalisable iff:
either there are two eigenvalues with corresponding eigenbases of dimension $1$ or there is a unique eigenvalue with an eigenbasis of dimension $2$.
More generally, a $n\times n$ matrix is diagonalisable if the dimension of the space, which is the direct sum of all eigenspaces, is $n$. 
Now, the eigenbasis corresponding to eigenvalue $1$ for $I$ is of dimension $2$. However, consider $M=\begin{pmatrix}1 & 1\\ 0 & 1\end{pmatrix}$. It only has one eigenvalue, namely $\lambda = 1$, but its eigenbasis for $M$, namely the span of $e_{1}$, is of dimension $1$. And so it is not diagonalisable. 
I mention for posterity's sake  that if the eigenvalues are the same, then the matrix is diagonalisable iff it is already in diagonal form, since $P^{-1}DP = P^{-1}(nI)P = nP^{-1}P = nI$.
A: When you diagonalize the rest (the distinct eigenvalues), the subspace with the degenerate eigenvalue can behave in two ways:
*) Diagonalizable. Geometric multiplicity (the number of eigenvectors) is the same as the multiplicity of the eigenvalues. In this case, when you diagonalize the rest, the remaining block is already diagonal.
*) Not enough eigenvectors: you can put the degenerate block into a Jordan normal form, but nondiagonal terms will be nonzero.
For some matrices, you can be sure it's diagonalizable (for instance, symmetric matrices always are).
