Maths WorkshopMaths problems with full solutions
Exercise 1844Linear algebra › Quadratic formsL1Added 3 Nov 2026

Canonical form of a quadratic form

#canonical form#Gauss reduction#signature

Statement

Put the quadratic form
Q(x,y,z)=x2+2y2+3z2+2xy−4xzQ(x,y,z)=x^2+2y^2+3z^2+2xy-4xz
into canonical form (sum of squares with coefficients ±1\pm1 or 00).

Hint

Complete the square in xx first (since x2x^2 appears), then in yy, then in zz.

Show solutionHide solution

Solution

Group terms containing xx. x2+2xy−4xz=x2+2x(y−2z)=(x+y−2z)2−(y−2z)2x^2+2xy-4xz=x^2+2x(y-2z)=(x+y-2z)^2-(y-2z)^2.

Remaining terms.
Q=(x+y−2z)2−(y−2z)2+2y2+3z2=(x+y−2z)2+y2+4yz−z2.Q=(x+y-2z)^2-(y-2z)^2+2y^2+3z^2=(x+y-2z)^2+y^2+4yz-z^2.

Square in yy. y2+4yz=(y+2z)2−4z2y^2+4yz=(y+2z)^2-4z^2. So
Q=(x+y−2z)2+(y+2z)2−5z2.Q=(x+y-2z)^2+(y+2z)^2-5z^2.

Canonical form. With u=x+y−2zu=x+y-2z, v=y+2zv=y+2z, w=zw=z:
Q=u2+v2−5w2.Q=u^2+v^2-5w^2.

Signature. (2,1,0)(2,1,0): two positive squares, one negative.

Conclusion. Q=u2+v2−5w2Q=u^2+v^2-5w^2 (or, after rescaling w′=5ww'=\sqrt5 w, Q=u2+v2−w′2Q=u^2+v^2-w'^2).