Do you mean diagonalize matrix A or a matrix made up of the diagonal entries of A.
D := Diagonal(A);
Will choose just the diagonal entries from matrix A.
For diagonalizing one... I'm not entirely sure but
D := JordanForm(A);
Seems to be on the right track.