[Math] Bring quadratic form to canonical form using Lagrange’s method

linear algebraquadratic-forms

I have the quadratic form:

$$x^2_1+x^2_2+2x_1x_2-2x_1x_3-6x_2x_3$$

And have to bring it to the canonical form using Lagrange's method.
I realise that it should be quite easy because as far as I can understand I just have to compleate the square step by step.

The only thing I remember about compleating the square is the formula:

$$x^2+bx+c = \left(x +\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2+c$$

But how should I apply it to given quadratic form? Am I right about this formula at all? (seems like no to me).

Best Answer

You have

\begin{align} Q(x_1,x_2,x_3)&=x^2_1+x^2_2+2x_1x_2-2x_1x_3-6x_2x_3 \\&=\color{red}{x_1^2+2x_1(x_2-x_3)+(x_2-x_3)^2}\color{blue}{-(x_2-x_3)^2+x_2^2-6x_2x_3} \\&=\color{red}{(x_1+x_2-x_3)^2}\color{blue}{-\left(x_3^2+2x_3\cdot2x_2+4x_2^2-4x_2^2\right)} \\&=(x_1+x_2-x_3)^2-(x_3+2x_2)^2+4x_2^2 \end{align}

So $Q(x_1,x_2,x_3)$ is transformed to some

$$Q(y_1,y_2,y_3)=y_1^2-y_2^2+y_3^2\,,$$

where

$$\begin{pmatrix}y_1\\y_2 \\y_3 \\\end{pmatrix}=\begin{pmatrix}1&1&-1\\0&2&1 \\0&2&0 \\\end{pmatrix}\begin{pmatrix}x_1\\x_2 \\x_3 \\\end{pmatrix}$$

is the nonsingular transformation.

Related Question