[Math] Quadratic form with Lagrange method

linear algebra

I am trying to understand how to use lagrange method, on the following quadratic form:

$$q(x_1, x_2, x_3, x_4) = 2x_1x_4 – 6x_2x_3$$

I already have the solution for this answer which is:

  1. First, how did they get the following equation?
    $$ q(x_1, x_2, x_3, x_4) =
    \frac{1}{2}(x_1+x_4)^2 – \frac{1}{2}(x_1-x_4)^2+\frac{3}{2}(x_2-x_3)^2 – \frac{3}{2}(x_2+x_3)^2 $$

  2. Then they continued and said that
    $$y_1 = x_1 + x_4 $$
    $$y_2 = x_1 – x_4 $$
    $$y_3 = x_2 – x_3 $$
    $$y_4 = x_2 + x_3 $$
    While:
    $$x_1 = \frac{y_1+y_2}{2}$$
    $$ x_4 = \frac{y_1-y_2}{2}$$
    $$x_2 = \frac{y_3+y_3}{2} $$
    $$x_3 = \frac{-y_3+y_4}{2} $$
    and found that:
    $$q = \frac{1}{2}y_1^2- \frac{1}{2}y_2^2+\frac{3}{2}y_3^2 – \frac{3}{2}y_4^2$$

Now, I'm trying to figure out the steps they did in order to find those equations

Best Answer

The first step is to diagonalize the quadratic form. Take the first term in (1) above.

$$2x_{1}x_{4} = (x_{1}+x_{4})^{2}-x_{1}^{2}-x_{4}^{2}$$

Also $$(x_{1}-x_{4})^{2}=x_{1}^{2}+x_{4}^{2}-2x_{1}x_{4}$$ Thus $$2x_{1}x_{4}=\frac{1}{2}(x_{1}+x_{4})^{2} - \frac{1}{2}(x_{1} - x_{4})^{2}$$ Repeat for the remaining term. The next set of $y_{i}$'s play on the fact that it is now 'obvious' to substitute new variables into the quadratic form.

Related Question