I have a matrix
M = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, b}, {0, 0, -b, 0}}
that I want to diagonalize. So far, I always used the following and it worked, but for
U = Eigenvectors[M]
FullSimplify[U.M.Transpose[U]] // MatrixForm
I get $$ \left( \begin{array}{cccc} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 i b \\ 0 & 0 & -2 i b & 0 \\ \end{array} \right)$$
In contrast for a different matrix like
M2= {{0, 0, 0, 0}, {0, 0, A, 0}, {0, A, 0, 0}, {0, 0, 0, 0}}
I get from
U2 = Eigenvectors[M2]
FullSimplify[U2.M2.Transpose[U2]] // MatrixForm
the result
$$ \left( \begin{array}{cccc} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & -2 A & 0 \\ 0 & 0 & 0 & 2 A \\ \end{array} \right)$$ as it should be.
What's the problem here? Why isn't
FullSimplify[U.M.Transpose[U]] // MatrixForm
diagonal as it should be?
EDIT: For
FullSimplify[U.M.Inverse[U]] // MatrixForm
I get a diagonal matrix, but then
M3=M+M2
U3 = Eigenvectors[M3]
FullSimplify[U3.M3.Inverse[U3]] // MatrixForm
isn't diagonal.
M
is not symmetric, so the correct check exploiting the antisymmetry isU.M.ConjugateTranspose[U]
. $\endgroup$ – J. M.'s ennui♦ Jun 29 '15 at 12:13Transpose[]
before checking. $\endgroup$ – J. M.'s ennui♦ Jun 29 '15 at 12:22Eigensystem[]
, and then try answering your own question. $\endgroup$ – J. M.'s ennui♦ Jun 29 '15 at 12:26