Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How does one find matrix $M\in M_3(\mathbb R)$ such that $M^TAM=I$ where $$A=\left(\begin{array}{rrr}2&0&0\\ 0&3&-1\\ 0&-1&3\end{array}\right)$$ and simultaneously, $M^TBM$ is some diagonal matrix where $$B=\left(\begin{array}{rrr}1&3&-3\\ 3&3&1\\ -3&1&3\end{array}\right)$$?


share|improve this question

1 Answer 1

As noted in my answer to your related question, there is a theorem regarding simultaneous diagonalization by congruence: 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 by similarity transform (Horn and Johnson, Matrix Analysis, Theorem 4.5.15.).

When all eigenvalues of $C$ are distinct, the matrix for diagonalizing $C$ via similarity transform is by itself the matrix for simultaneous diagonalizing $A$ and $B$ by congruence. Unfortunately, in your problem, $C$ has repeated eigenvalues and hence some additional manual work is needed. Specifically, we first try to diagonalize $C$ and obtain $$ C = A^{-1}B = \begin{pmatrix} 1/2&3/2&-3/2\\ 3/4&5/4&3/4\\ -3/4&3/4&5/4 \end{pmatrix} =M_1\ D\ M_1^{-1}, $$ where $$ M_1 = \begin{pmatrix} 2&1&0\\ -1&1&1\\ 1&0&1 \end{pmatrix},\quad D=\textrm{diag}(-1,2,2). $$ So, our first candidate for $M$ is $M_1$. However, observe that $D$ has repeated eigenvalues. So there is a chance that $M_1^\top AM_1$ or $M_1^\top BM_1$ are not diagonal. Indeed, $$ M_1^\top AM_1 = \begin{pmatrix} 16&0&0\\ 0&5&2\\ 0&2&4 \end{pmatrix}, \quad M_1^\top BM_1 = \begin{pmatrix} -16&0&0\\ 0&10&4\\ 0&4&8 \end{pmatrix}. $$ So we need to further diagonalize $\begin{pmatrix}5&2\\2&4\end{pmatrix}$ and $\begin{pmatrix}10&4\\4&8\end{pmatrix}$ simultaneously via congruence. Since the two matrices are multiples of each other and they are symmetric, it suffices to find a matrix $M_2$ that orthogonally diagonalizes either one of them. It is not difficult to work out such a matrix: for $$ \lambda=\frac{9+\sqrt{17}}{2},\quad M_2=\frac{1}{\sqrt{\lambda+4}}\begin{pmatrix}\lambda-4&-2\\2&\lambda-4\end{pmatrix}, $$ we have $$ \begin{pmatrix}5&2\\2&4\end{pmatrix} = M_2\begin{pmatrix}\lambda&0\\0&9-\lambda\end{pmatrix}M_2^\top. $$ Now we may set $$ M = M_1\begin{pmatrix}1\\&M_2\end{pmatrix}. $$

For this particular problem, since $A$ is positive definite, there is a simpler solution -- find the square root of $A$, then orthogonally diagonalize $(\sqrt{A}^\top)^{-1}B\sqrt{A}^{-1}$. In other words, if $\sqrt{A}$ is a matrix such that $\sqrt{A}^\top\sqrt{A}=A$, and $Q$ is an orthogonal matrix such that $Q^\top(\sqrt{A}^\top)^{-1}B\sqrt{A}^{-1}Q$ is diagonal, then you may set $M=\sqrt{A}^{-1}Q$. In this case you will get $M^\top AM=I$.

share|improve this answer
user, we may take, without undue calculation, $M_2$ to be the elementary matrix with position $1,2$ being $-2/5,$ or multiply through by $5$ and take $$ M_2 = \left( \begin{array}{cc} 5 & -2 \\ 0 & 5 \end{array} \right) $$ –  Will Jagy Aug 23 at 16:59
I see, you wrote $M_2$ on the left and $M_2^T$ on the right, so it should be $$ M_2 = \left( \begin{array}{cc} 5 & 0 \\ -2 & 5 \end{array} \right) $$ I have very good reasons for writing any $M$ on the right and transpose on the left, but that is just me. –  Will Jagy Aug 23 at 17:10
@WillJagy Agree, but since we need $M_2^T\pmatrix{5&2\\ 2&4}M_2=\Sigma$ for some diagonal matrix $\Sigma$, if $M_2$ is chosen to be orthogonal, we have $\pmatrix{5&2\\ 2&4} = M_2\Sigma M_2^T$ and $M_2^T$ goes to the right hand side of the factorisation. –  user1551 Aug 23 at 17:37
In the end, I got, for $M$ written on the right as in the question, $$ \left( \begin{array}{ccc} 2 & 5 & -2 \\ -1 & 5 & 3 \\ 1 & 0 & 5 \end{array} \right) $$ However, I had not noticed that he wanted $M^T A M = I$ rather than unspecified diagonal, so, indeed, an extra thing with reciprocals of square roots on the diagonal must be applied to the matrix i thought was an answer. Sigh. There's always something more. Do you have any idea where this problem comes from? I ask OP's for the source of their problem, rarely get a substantial answer. –  Will Jagy Aug 23 at 17:51
found two questions, page 430 of a book by Korner, image at i.stack.imgur.com/Wc9OH.jpg book link books.google.com/… –  Will Jagy Aug 23 at 18:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.