# Is there a simpler way to falsify this?

I was told that there can't exist a matrix $M\in M_3(\mathbb R)$ such that $M^TCM$ and $M^TDM$ are both diagonal,where $$C=\begin{pmatrix}1&0&0\\0&-1&0\\ 0&0&0\end{pmatrix}$$ and $$D=\begin{pmatrix}0&1&0\\1&0&0\\0&0&0\end{pmatrix}.$$ Why is this necessarily true? Can this be shown without actually writing out $$M=\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}$$ and dealing with messy algebra? I am quite sure there is a simpler way...

Added: where the resulting matrices are not the zero matrix

Thanks.

-
Have you tried $M=O$ or $M$ a matrix with only non zero entry in the lower right corner? –  Jan Dec 3 '11 at 15:08
@Jan: Thanks, I should have been clearer, my bad, but I am looking for the resultant diagonal matrices to be non-trivial. -- so at least one non-zero entry along the diagonal. –  Patrick Dec 3 '11 at 15:26

The problem statement is false if $M$ is not constrained. As Jan pointed out, you may use $M=0$ as a counterexample.

When $M$ is invertible, however, the problem statement is indeed true.  The general theorem is this: if $A, B$ are real symmetric and $A$ is nonsingular, then they are simultaneously congruent to diagonal matrices if and only if $C=A^{-1}B$ is diagonalizable. See Horn and Johnson, Matrix Analysis, Theorem 4.5.15. For this particular question, however, we have a more elementary proof, which is given below.[End edit]

The main weapon for attacking the problem is Sylvester's law of inertia, which states that if $X$ is real symmetric and $M$ is invertible, then $X$ and $M^\top XM$ have the same number of positive, negative and zero eigenvalues.

Suppose $M^\top CM=\widehat{C}$ and $M^\top DM=\widehat{D}$ for some diagonal matrices $\widehat{C}$ and $\widehat{D}$. For any real number $\epsilon$, let $S_\epsilon=C+\epsilon D$. Then $\widehat{S}_\epsilon=M^\top SM$ is a diagonal matrix. Note that $C, D$ and $S_\epsilon$ all have exactly one positive eigenvalue, one negative eigenvalue and one zero eigenvalue. By Sylvester's law of inertia, So do $\widehat{C}, \widehat{D}$ and $\widehat{S}_\epsilon$. WLOG, assume the sign pattern of $\widehat{C}$ is $\widehat{C}=\textrm{diag}(+,-,0)$. Now there are two possibilities:

1. The sign pattern of $\widehat{D}$ is $\textrm{diag}(0,+,-)$, $\textrm{diag}(0,-,+)$, $\textrm{diag}(+,0,-)$ or $\textrm{diag}(-,0,+)$. Then for sufficiently small $\epsilon\not=0$, $\widehat{C}+\epsilon\widehat{D}$ has three nonzero eigenvalues, which is a contradiction.
2. The sign pattern of $\widehat{D}$ is $\textrm{diag}(+,-,0)$ or $\textrm{diag}(-,+,0)$. Therefore, for an appropriate value of $\epsilon$, the sign pattern of $\widehat{C}+\epsilon\widehat{D}$ would possess at least two zero eigenvalues. But this is again a contradiction. So we conclude that $C$ and $D$ cannot be simultaneously congruent to diagonal matrices.
-

There is a theorem that completely characterizes when two matrices are "simultaneously diagonalizable." Have you looked it up? It will give you a very easy test for checking whether or not $C$ and $D$ are simultaneously diagonalizable.

-
Thanks for the suggestion. I looked it up but it is applicable to $M^{-1}AM$ where the matrix on the left is an inverse rather than a conjugate... –  Patrick Dec 3 '11 at 15:23
That theorem says that in $M^{-1}AM$, M will be unitary, which means that $M^{-1} = M^{*T}$. –  Sjoerd Dec 3 '11 at 15:33
@Sjoerd: Thanks. But even so, doesn't it just say that there is no unitary matrix that simultaneously diagonalizes $A,B$? What about the non-unitary ones? –  Patrick Dec 3 '11 at 16:14
@Patrick I don't know enough to help you on that one. I have a background in chemistry, where $M^{-1}AM$ shows up when switching to a different set of base vectors. The base vectors are always chosen to be orthonormal, in which case $M$ will be unitary and $M^{-1} = M^{*T}$. Maybe it is possible to proof that when $M$ exists, orthonormalizing the base will yield a $M'$ that is unitary? Hopefully, someone more knowledgable than me can help you out. –  Sjoerd Dec 4 '11 at 21:28

I will use only the left upper two by two block: We have the congruence relation $$\pmatrix{1&0\\0&-1} = \left(\frac{1}{\sqrt{2}}\pmatrix{1&1\\1&-1} \right)\pmatrix{0&1\\1&0} \underbrace{\left(\pmatrix{1&1\\1&-1}\frac{1}{\sqrt{2}}\right)}_S$$ Hence, you have to find a matrix $M$ such that it solves the following equation $$(SM)^T\pmatrix{0&1\\1&0}SM = M^T\pmatrix{0&1\\1&0} M$$ Can you find one?

-
THanks! Is the answer no because we can take the inverses of $M,M^T$ then we are left with $S^T\pmatrix{0&1\\1&0}S=\pmatrix{0&1\\1&0}$? which is a contradiction? –  Patrick Dec 3 '11 at 16:20
How is the second equation obtained? Can't the LHS and RHS both be diagonal but the diagonal entries are not equal? –  Patrick Dec 3 '11 at 17:12
@Patrick I replaced $C$ with $D$ and factored the transposed terms. Nothing complicated. The technical detail is to see that they would end up with the same diagonal matrix had there been a matrix $M$. This is due to the Sylvester's Law of Inertia. –  user13838 Dec 3 '11 at 17:18