I can't figure out how to get to the answer of this question, been staring at it for hours
Let $$q(x_1, x_2, x_3) = x_1x_2 + x_1x_3 + x_2x_3$$
be a quadratic form in three unknown variables over $\mathbb R$.
(a) Find a canonical form of the quadratic form $q$ and write down the nondegenerate change of coordinates you used.
Here is the answer: Following the Lagrange algorithm, we first use the change of variables
$$ x_1 = y_1 + y_2 x_2 = y_1 − y_2 x_3 = y_3,$$
getting the form:
$$q′(y_1, y_2, y_3) = q(y_1 + y_2, y_1 − y_2, y_3)\\ =(y_1 + y_2)(y_1 − y_2) + (y_1 + y_2)y_3 + (y_1 − y_2)y_3\\ =y_1^2 - y_2^2 + 2y_1y_3\\ =(y1 + y3)^2 - y_2^2 - y_3^2.$$
The new change of variables
$$z_1 = y_1 + y_3,\\ z_2 = y_2,\\ z_3 = y_3$$
yields:
$$q′′(z_1, z_2, z_3) = z_1^2 - z_2^2 - z_3^3.$$
The resulting change of variables is change of variables
$$z_1 = 1/2x_1 + 1/2x_2 + x_3,\\ z2 = 1/2x_1 - 1/2x_2,\\ z3 = x_3.$$
I've searched extensively online and cant find any examples like this one. Am I supposed to start by completing the square? Any help is really appreciated