diagonalization of a form
A general quadratic form has messy cross terms like x_1 x_2 that tangle the variables together. Diagonalizing a form means choosing better coordinates in which all the cross terms vanish, leaving a clean sum of weighted squares such as a_1 y_1^2 + … + a_n y_n^2. Geometrically you are rotating and stretching axes until they line up with the form's natural directions.
Formally, to diagonalize a symmetric bilinear form B is to find a basis e_1, …, e_n that is orthogonal, meaning B(e_i, e_j) = 0 for i ≠ j; in this basis the Gram matrix is diagonal. Over any field of characteristic not 2, every symmetric bilinear form admits such a basis — completing the square repeatedly, or the Gram-Schmidt process when no isotropic obstruction appears, produces one constructively.
Diagonalization is not unique: the diagonal entries can be scaled by squares and reordered, so only their pattern matters. Over R the count of positive, negative, and zero entries is an invariant (the signature, by Sylvester's law). Over C every nonzero entry can be made 1. Over Q the entries modulo squares, together with the Hasse invariant, encode genuine arithmetic. Caution: this is congruence diagonalization, distinct from eigenvalue diagonalization, though for a symmetric real matrix the spectral theorem achieves both at once via an orthogonal change of basis.
Q(x, y) = x^2 + 2xy + 3y^2 completes the square as (x + y)^2 + 2y^2. Setting u = x + y, v = y gives Q = u^2 + 2v^2, diagonal with entries 1, 2 — signature (2, 0), so Q is positive definite.
Diagonalizing a binary form by completing the square.