# Is there a basis for which the quadratic forms are both diagonalized?

The question asks if there is a basis for which both of the following quadratic forms are in a diagonalized form:

$$q_1(x_1,x_2) = x_1^2 + x_1x_2 - x_2^2$$ $$q_2(x_1,x_2) = x_1^2 - 2x_1x_2$$

## What i tried:

I tried to see if one of the quadratic forms is positive definite, but I got that both are not.

Yet, it's not enough to say that none are positive definite in order to prove that there isn't a basis for which both are diagonalized, or at least I am not familiar with such a sentence.

So how can I determine this ?

Thank you.

• @ancientmathematician That is exactly the theorom i would have used, yet, i tried to diagonalaize (using lagrange) or check directly for positive definite (using jacobs) and got that both are not positive definite, therefore, cant use the theorom
– Alon
Commented May 16, 2020 at 16:51
• Ok ill try, the idea is that if i will get the same diagonalaizing matrix for both quadratic forms in the change to diagonalaize form, i would answer yes, yet, if i wont get the same diagonalaizing matrix, what would i say then? @ancientmathematician
– Alon
Commented May 16, 2020 at 17:12

Let's translate the problem into the language of matrices. Write $$q_1(x) = x^T A x$$ and $$q_2(x) = x^T B x$$ with $$A,B$$ symmetric and assume that $$q_1,q_2$$ are simultaneously diagonalizable. Then we can find an invertible $$P$$ with

$$P^TAP = D_1, P^TBP = D_2$$

where $$D_1,D_2$$ are diagonal. Let's assume that $$A,B$$ (and so $$D_1,D_2$$) are invertible. Then

$$A = \left( P^T \right)^{-1} D_1 P^{-1}, B = \left( P^T \right)^{-1} D_2 P^{-1}$$

so

$$A^{-1} B = P D_1^{-1} P^T \left( P^T \right)^{-1} D_2 P^{-1} = P \left( D_1^{-1} D_2 \right) P^{-1}$$

which implies that $$A^{-1}B$$ is similar to a diagonal matrix $$D_1^{-1} D_2$$. So a necessary condition for $$q_1,q_2$$ to be simultaneously diagonalizable is for $$A^{-1}B$$ to be a diagonalizable matrix.

$$A = \begin{pmatrix} 1 & \frac{1}{2} \\ \frac{1}{2} & -1 \end{pmatrix}, B = \begin{pmatrix} 1 & -1 \\ -1 & 0 \end{pmatrix}$$

so

$$A^{-1} B = \frac{1}{5} \begin{pmatrix} 2 & -4 \\ 6 & -2 \end{pmatrix}.$$

This matrix $$5 A^{-1} B$$ has characteristic polynomial $$X^2 + 20$$ which doesn't have real roots so it is not diagonalizable and hence your quadratic forms can't be simultaneously diagonalized over $$\mathbb{R}$$.

The answer is no.

In fact if there exists a base of $$\mathbb{R}^2$$ such that the symmetric matrixes $$A,B$$ associated to the two quadratic forms are diagonalizable in that base, then there exists an orthogonal change base matrix $$P$$ such that

$$P^TAP=I_1$$

and

$$P^TBP=I_2$$

where $$I_1, I_2$$ are diagonal matrixes. Then we get

$$AB=P^TI_1I_2 P=P^TI_2 I_1 P=BA$$

because $$P$$ is orthogonal and so $$P^{T}=P^{-1}$$.

This means that you would have $$AB=BA$$.

$$A=[[1, \frac{1}{2}], [\frac{1}{2}, -1]]$$

$$B=[[1, -1],[-1, 0]]$$

and you can observe they not commute.

A necessary condition to get two matrixes are simultaneously diagonalizable is that they commute.

When the field is algebraically closed, then this condition is also sufficient.

• This is actually not true. The OP is not asking about simultaneous diagonalization of matrices but of quadratic forms which is not the same. The relation is $P^T A P = I_1$ and not $P^{-1} A P = I_1$. Commented May 16, 2020 at 17:40
• @levap No the problem is the same. In fact A and B are symmetric and so P is orthogonal, ie. P^T=P^{-1} Commented May 16, 2020 at 18:02
• Well, the fact that $A,B$ are symmetric doesn't imply that $P$ is orthogonal. There are two distinct notions: Diagonalizing a quadratic form using an arbitrary change of variables and (over $\mathbb{R}$) diagonalizing using an orthogonal change of variables. Those are not the same things. The OP didn't ask about whether there is an orthogonal basis for which both forms are diagonal (then what you wrote would be correct), only whether there is a basis for which both forms are diagonal. Commented May 16, 2020 at 18:20
• For example, if $q_1(x_1,x_2) = x_1^2 - x_2^2$ and $q_2(x_1,x_2) = x_1^2 + 2x_1x_2 + 2x_2^2$ then $q_1,q_2$ are simultaneously diagonalizable (because $q_2$ is positive definite) but (for the matrices representing the forms) we have $AB \neq BA$. Commented May 16, 2020 at 19:34
• @levap Yes, you’re right. I’ll leave the answer to permit the people to do not the same error Commented May 16, 2020 at 20:27