A quadratic form may be diagonalized by the following procedure:

1. 1.

Find a variable $x$ such that $x^{2}$ appears in the quadratic form. If no such variable can be found, perform a linear change of variable so as to create such a variable.

2. 2.

By completing the square, define a new variable $x^{\prime}$ such that there are no cross-terms involving $x^{\prime}$.

3. 3.

Repeat the procedure with the remaining variables.

 $Q=x^{2}+xy-3xz-y^{2}/4+yz-9z^{2}/4$

in three variables. We could proceed as follows:

• Since $x^{2}$ appears, we do not need to perform a change of variables.

• We have the cross terms $xy$ and $-3xz$. If we define $x^{\prime}=x+y/2-3z/2$, then

 ${x^{\prime}}^{2}=x^{2}+xy-3xz+y^{2}/4+9z^{2}/4-3yz/2$

Hence, we may re-express $Q$ as

 $Q={x^{\prime}}^{2}-yz/2$
• We must now repeat the procedure with the remaining variables, $y$ and $z$. Since neither $y^{2}$ nor $z^{2}$ appears, we must make a change of variable. Let us define $z^{\prime}=z+2y$.

 $Q={x^{\prime}}^{2}-y^{2}-yz^{\prime}/2$
• We have a cross term $-yz^{\prime}/2$. To eliminate this term, make a change of variable $y^{\prime}=y+z^{\prime}/4$. Then we have

 ${y^{\prime}}^{2}=y^{2}+yz^{\prime}/2+{z^{\prime}}^{2}/16$

and hence

 $Q={x^{\prime}}^{2}-{y^{\prime}}^{2}+{z^{\prime}}^{2}/16$

The quadratic form is now diagonal, so we are done. We see that the form has rank 3 and signature 2.

Title diagonalization of quadratic form DiagonalizationOfQuadraticForm 2013-03-22 14:49:34 2013-03-22 14:49:34 rspuzio (6075) rspuzio (6075) 7 rspuzio (6075) Algorithm msc 15A03 DiagonalQuadraticForm