Bilinear and Quadratic Forms: Matrix Congruence and Sylvester’s Criterion
A quadratic form on ℝn is a function q(x) = xTAx with a symmetric matrix A; it is positive definite if q(x) > 0 for all x ≠ 0, and Sylvester’s criterion states that this holds exactly when all leading principal minors of A are positive. In brief: q(x, y) = 2x2 + 2xy + 3y2 has the matrix [[2, 1], [1, 3]] with the minors 2 and 5, so it is positive definite. The form x2 + 4xy + y2 has the minors 1 and −3, so it takes both signs.
Quadratic forms describe energy, curvature and conic sections, and their definiteness decides whether a critical point is a minimum. This guide defines bilinear and quadratic forms, the matrix of a form and congruence, explains the classification by signature, shows how to reduce a form to a sum of squares, and states Sylvester’s criterion with worked examples and a table.
What are bilinear and quadratic forms?
A bilinear form is a function b(x, y) that is linear in each argument; on ℝn it has the form b(x, y) = xTAy for a matrix A, and it is symmetric when A = AT. The quadratic form associated with a symmetric b is q(x) = b(x, x) = xTAx = Σ aijxixj. The diagonal entries of A are the coefficients of the squares xi2, and the off-diagonal entries are half of the coefficients of the mixed terms.
Example 1: from a polynomial to a matrix
q(x, y, z) = x2 + 4xy + 3y2 − 6yz + 5z2 has the symmetric matrix [[1, 2, 0], [2, 3, −3], [0, −3, 5]]. Check by multiplying out: the entry 2 in the positions (1, 2) and (2, 1) produces 4xy.
What is matrix congruence?
Under the change of variables x = Py with P invertible, q becomes yT(PTAP)y. Matrices A and B are congruent if B = PTAP for an invertible P. Congruence preserves symmetry and the rank. It differs from similarity (B = P−1AP): for an orthogonal P the two coincide, but in general the eigenvalues change under congruence.
Example 2: congruent but not similar
A = diag(1, 4) and P = diag(1, 1/2): PTAP = diag(1, 1) = I. So diag(1, 4) is congruent to I, but its eigenvalues (1 and 4) differ from those of I, so the matrices are not similar.
How do you reduce a form to a sum of squares?
Lagrange’s method completes the square one variable at a time. Alternatively, orthogonally diagonalize A = QDQT, so q = λ1y12 + … + λnyn2 in the coordinates y = QTx, with the eigenvalues as coefficients.
Example 3: completing the square
q = 2x2 + 2xy + 3y2 = 2(x + y/2)2 − y2/2 + 3y2 = 2(x + y/2)2 + (5/2)y2. With u = x + y/2 and v = y: q = 2u2 + (5/2)v2, both coefficients positive.
Example 4: a form without squares
q = 2xy has no square terms. Substitute x = u + v, y = u − v: q = 2(u2 − v2) = 2u2 − 2v2. One positive and one negative coefficient.
How are forms classified?
Sylvester’s law of inertia: in any diagonal form reachable by a congruence, the number p of positive coefficients, the number m of negative ones and the number z of zeros are the same. The triple (p, m, z) is the signature (inertia). A form is:
- positive definite if p = n (all eigenvalues of A positive);
- negative definite if m = n;
- positive semidefinite if m = 0 (all eigenvalues ≥ 0), and negative semidefinite if p = 0;
- indefinite if p ≥ 1 and m ≥ 1.
Example 5: signature from eigenvalues
q = x2 + 4xy + y2: A = [[1, 2], [2, 1]] has the eigenvalues 3 and −1, so the signature is (1, 1, 0): indefinite. For q = x2 + 2xy + y2 = (x + y)2: A = [[1, 1], [1, 1]] has the eigenvalues 2 and 0, signature (1, 0, 1): positive semidefinite, with q = 0 along the line x = −y.
What is Sylvester’s criterion?
Let Δk be the determinant of the upper left k × k submatrix of A (the leading principal minor). The symmetric matrix A is positive definite if and only if Δ1 > 0, Δ2 > 0, …, Δn > 0. It is negative definite if and only if the signs alternate beginning with Δ1 < 0, Δ2 > 0, Δ3 < 0, and so on. For semidefiniteness, the leading minors are not enough: all principal minors (not just the leading ones) must be nonnegative.
Example 6: a positive definite 3 × 3 matrix
A = [[2, −1, 0], [−1, 2, −1], [0, −1, 2]]. Δ1 = 2, Δ2 = 4 − 1 = 3, Δ3 = det A = 2(4 − 1) + 1(−2 − 0) = 6 − 2 = 4. All positive, so q is positive definite. The eigenvalues 2 and 2 ± √2 are all positive, and their product 2(4 − 2) = 4 matches the determinant ✓.
Example 7: a parameter
For which k is q = x2 + 2kxy + 4y2 positive definite? The matrix [[1, k], [k, 4]] has Δ1 = 1 > 0 and Δ2 = 4 − k2 > 0, so −2 < k < 2.
Example 8: the semidefinite pitfall
A = [[0, 0], [0, −1]] has Δ1 = 0 and Δ2 = 0, which does not exclude negative semidefiniteness, and indeed q = −y2 ≤ 0. But [[0, 0], [0, 1]] has the same leading minors and is positive semidefinite. So the leading minors alone cannot tell the two apart.
How do quadratic forms describe conics?
The curve xTAx = c is a conic centered at the origin. After orthogonal diagonalization it becomes λ1u2 + λ2v2 = c in rotated axes (the principal axes). Both eigenvalues of the same sign as c give an ellipse, opposite signs a hyperbola.
Example 9: a hyperbola
x2 + 4xy + y2 = 3. The eigenvalues are 3 and −1 with the eigenvectors (1, 1)/√2 and (1, −1)/√2. In the rotated coordinates: 3u2 − v2 = 3, that is u2 − v2/3 = 1, a hyperbola with the axis along the line y = x.
Table of classification
| Type | Eigenvalues | Minors (Δ1, Δ2) | Example |
|---|---|---|---|
| positive definite | both > 0 | +, + | 2x2 + 2xy + 3y2 |
| negative definite | both < 0 | −, + | −x2 − y2 |
| indefinite | one + and one − | Δ2 < 0 | x2 + 4xy + y2 |
| positive semidefinite | ≥ 0, one is 0 | Δ2 = 0 | (x + y)2 |
| negative semidefinite | ≤ 0, one is 0 | Δ2 = 0 | −y2 |
Where does the theory come from?
The reduction of quadratic forms to sums of squares goes back to Lagrange (1759) and Gauss, who developed the arithmetic theory of forms. James Joseph Sylvester proved the law of inertia in 1852 and gave it its name; Carl Gustav Jacob Jacobi obtained it independently around the same time. The criterion with minors is attributed to Sylvester, though a similar statement was known to Jacobi and Gundelfinger.
Which mistakes are common?
Forgetting to halve the mixed coefficient
The term 4xy gives the matrix entries 2 and 2, not 4 and 4.
Using non-leading minors for definiteness
The criterion for strict definiteness uses the leading principal minors (nested from the top left corner). For semidefiniteness, all principal minors must be checked.
Treating congruence as similarity
The coefficients after completing the square are not the eigenvalues in general; only their signs are invariant.
Applying the criterion to a non-symmetric matrix
First replace A by (A + AT)/2, which defines the same quadratic form.