# If $f,g$ are quadratic forms over $\mathbb{R}$ and $f$ is positive definite, can you reduce the both simultaneously to sum of squares?

If $f,g$ are quadratic forms over $\mathbb{R}$ and $f$ is positive definite, can you reduce the both simultaneously to sum of squares?

This question appeared from a friend of mine and I did not understand the relation between being positive definite and can be diagonalizable simultaneously.

I appreciate any help!

Thanks

• Wouldn't that at least require that $g$ is also posdef? – Hagen von Eitzen Jul 11 '16 at 15:00
• @Hagen, I dont know, that question asks just $f$ being posdef. – L.F. Cavenaghi Jul 11 '16 at 15:02

I'm assuming that we are talking about a finite-dimensional real vector space $V$.

You can use the positive definite form $f$ in order to install a scalar product $\langle\cdot,\cdot\rangle$ on $V$ such that $f(x)=\langle x,x\rangle$ for all $x$. Then the matrix of $f$ with respect to any orthonormal basis is simply the identity matrix. By the spectral theorem for real symmetric matrices you then can choose an orthonormal basis of $V$ which diagonalizes $g$. With respect to this basis both $f$ and $g$ are diagonalized.

• thank you so much! What a wonderful answer. – L.F. Cavenaghi Jul 11 '16 at 15:59

A relatively direct consequence of the (nontrivial) spectral theorem is the following (Lang, Algebra, chap. XV, corollary 7.3):

Let $E$ be a non-zero finite dimensional vector space over the reals, with a positive definite symmetric form $f$. Let $g$ be another symmetric form on $E$. Then there exists a basis of $E$ which is orthogonal for both $f$ and $g$.

In this basis, $f$ and $g$ would then have the following forms $$f(x) = \sum_{i=1}^{\dim E} \lambda_i\,x_i^2 \qquad g(x)=\sum_{i=1}^{\dim E} \mu_i\, x_i^2.$$

Because $f$ is positive definite, $\lambda_i > 0$ and you could modify the basis so that $\lambda_i = 1$. But of course, there is no way to change the signs of the $\mu_i$. Alternatively, you could change the basis so that $\mu_i \in \{-1,0,1\}$, but you have to make a choice: you cannot have a simple form for both the $\lambda_i$'s and the $\mu_i$'s.

I hope this falls to your definition of "reducing simultaneously" the forms to "sums of squares". Anyway, there isn't really hope for a better statement.

• thank you so much! Nice presentation, but for simplicity, I choose Christian answer. – L.F. Cavenaghi Jul 11 '16 at 16:00

Positive definite probably simplifies the presentation, but all you really need is one of them ( the Hessian or Gram matrices) to be invertible. I like the discussion in the first edition of Horn and Johnson; see case II.b.1 in the table.

Here is a good example, in which the initial approach gives a not-quite diagonal pair of matrices, and an extra step is needed (but guaranteed to work). Congruence and diagonalizations  