Skip to content

Quadratic Forms

CSIR NET linear algebra: quadratic forms, congruence, completing squares, Sylvester's law of inertia, rank and signature, definiteness, extremes.

  • 19 min read
  • Updated
On this page · 14 sections
  1. Prerequisites
  2. The Hook: A Saddle Hidden in a Formula
  3. Bilinear and Quadratic Forms
  4. Diagonalising a Quadratic Form
  5. Sylvester’s Law of Inertia
  6. Definiteness
  7. Extreme Values and Geometry
  8. Memory Tricks
  9. Don’t Confuse
  10. Common Mistakes
  11. Practice
  12. Quick Revision Table
  13. Key Takeaways
  14. What’s Next

Prerequisites

The Hook: A Saddle Hidden in a Formula

Bilinear and Quadratic Forms

Bilinear and quadratic forms

A bilinear form on \( V \) is a map \( B : V \times V \to F \) linear in each argument. In a basis, \( B(x, y) = x^TAy \) with \( a_{ij} = B(e_i, e_j) \). \( B \) is symmetric iff \( A = A^T \). A quadratic form is \( Q(x) = B(x, x) \) for a symmetric \( B \); over \( \mathbb{R}^n \),

$$Q(x) = x^TAx = \sum_i a_{ii}x_i^2 + 2\sum_{i < j} a_{ij}x_ix_j, \qquad A = A^T.$$

Writing the matrix. Diagonal entries are the coefficients of the squares; each cross-term coefficient is split in half between the two symmetric positions. For \( Q = x^2 + 4xy + 3y^2 - 6yz \):

$$A = \begin{pmatrix} 1 & 2 & 0 \\ 2 & 3 & -3 \\ 0 & -3 & 0 \end{pmatrix}.$$

(Any matrix \( M \) gives the same \( x^TMx \) as its symmetric part \( \frac{M + M^T}{2} \); we always use the symmetric one.) Over a field of characteristic \( \ne 2 \), the symmetric bilinear form is recovered from \( Q \) by polarisation: \( B(x, y) = \frac{1}{2}\left(Q(x + y) - Q(x) - Q(y)\right) \).

Change of variables: congruence

Substituting \( x = Py \) with \( P \) invertible gives \( Q(Py) = y^T(P^TAP)y \). So a change of basis replaces \( A \) by

$$\boxed{A' = P^TAP} \quad \text{(congruence)}$$

and not by \( P^{-1}AP \). Congruence preserves rank and symmetry, but not the eigenvalues or the determinant (\( \det A' = (\det P)^2\det A \): only its sign survives over \( \mathbb{R} \)). When \( P \) is orthogonal, \( P^T = P^{-1} \) and congruence coincides with similarity.

The rank of a quadratic form is the rank of its matrix (in any basis). A form is non-degenerate if its rank equals \( n \).

Diagonalising a Quadratic Form

Every real quadratic form can be written as a sum of squares \( d_1y_1^2 + \dots + d_ny_n^2 \) in suitable variables. Two standard routes:

1. Orthogonal diagonalisation (spectral theorem). \( A = QDQ^T \) with \( Q \) orthogonal and \( D = \operatorname{diag}(\lambda_1, \dots, \lambda_n) \). With \( y = Q^Tx \),

$$x^TAx = \lambda_1y_1^2 + \dots + \lambda_ny_n^2.$$

The coefficients are the eigenvalues, and the new axes (the principal axes) are orthonormal eigenvectors. This is the route for geometry and for extreme values.

2. Completing squares (Lagrange’s method). Faster by hand and enough for rank and signature. Collect every term with \( x_1 \), complete the square, repeat with the remaining variables.

If a form has no square terms (for example \( Q = xy \)), first substitute \( x = u + v \), \( y = u - v \): \( xy = u^2 - v^2 \).

Sylvester’s Law of Inertia

Sylvester's law of inertia

If a real quadratic form is written in two ways as a sum of squares of independent linear forms,

$$Q = d_1y_1^2 + \dots + d_ry_r^2 = d_1'z_1^2 + \dots + d_{r'}'z_{r'}^2 \quad (\text{all } d_i, d_i' \ne 0),$$

then \( r = r' \) and the number of positive coefficients is the same in both. Equivalently, every real symmetric matrix is congruent to exactly one matrix of the form \( \operatorname{diag}(I_p, -I_q, 0) \).

The inertia of \( Q \) is the triple \( (p, q, z) \): numbers of positive, negative and zero coefficients, which equal the numbers of positive, negative and zero eigenvalues of \( A \). Derived invariants:

NameValueFor \( u^2 - v^2 + 5w^2 \)
rank\( p + q \)3
index (positive index of inertia)\( p \)2
signature\( p - q \)1
nullity\( z = n - (p + q) \)0

Consequences.

  • Two real symmetric \( n \times n \) matrices are congruent iff they have the same rank and signature (equivalently the same \( p \) and \( q \)).
  • The number of congruence classes of real symmetric \( n \times n \) matrices is the number of pairs \( (p, q) \) with \( p + q \le n \): \( \frac{(n + 1)(n + 2)}{2} \). For \( n = 2 \): 6; for \( n = 3 \): 10.
  • Over \( \mathbb{C} \) the sign disappears (\( -1 = i^2 \)): complex symmetric matrices are congruent iff they have the same rank, giving \( n + 1 \) classes.
  • For Hermitian forms \( x^*Ax \) (values are real) the same law holds with \( P^*AP \) in place of \( P^TAP \).
  • Sign of the determinant. \( \det A \) has the sign \( (-1)^q \) when \( A \) is non-singular; for \( n = 2 \), \( \det A < 0 \) means indefinite.

Definiteness

TypeCondition on \( Q(x) = x^TAx \)EigenvaluesInertia
positive definite\( Q(x) > 0 \) for \( x \ne 0 \)all \( > 0 \)\( p = n \)
positive semidefinite\( Q(x) \ge 0 \)all \( \ge 0 \)\( q = 0 \)
negative definite\( Q(x) < 0 \) for \( x \ne 0 \)all \( < 0 \)\( q = n \)
negative semidefinite\( Q(x) \le 0 \)all \( \le 0 \)\( p = 0 \)
indefinitetakes both signsboth signs\( p, q \ge 1 \)
Sylvester's criterion

Let \( \Delta_k \) be the \( k \)-th leading principal minor of the real symmetric \( A \) (the determinant of its top-left \( k \times k \) block).

  1. \( A \) is positive definite iff \( \Delta_k > 0 \) for \( k = 1, \dots, n \).
  2. \( A \) is negative definite iff \( (-1)^k\Delta_k > 0 \) for all \( k \) (signs \( -, +, -, \dots \)).
  3. \( A \) is positive semidefinite iff all principal minors (not just the leading ones) are \( \ge 0 \).

Other characterisations of positive definiteness (real symmetric \( A \)): \( A = B^TB \) for some invertible \( B \); \( A = LL^T \) with \( L \) lower triangular with positive diagonal (Cholesky); \( \langle x, y \rangle = y^TAx \) is an inner product. Quick necessary conditions: every diagonal entry is positive, \( \det A > 0 \), \( \operatorname{tr} A > 0 \), and \( a_{ii}a_{jj} > a_{ij}^2 \). Each is necessary, none alone sufficient.

Useful facts.

  • \( A^TA \) is positive semidefinite for any real \( A \), and positive definite iff \( A \) has independent columns.
  • Sums of positive definite matrices are positive definite; so is the inverse of one.
  • The \( 2 \times 2 \) form \( ax^2 + 2hxy + by^2 \) is positive definite iff \( a > 0 \) and \( ab - h^2 > 0 \); indefinite iff \( ab - h^2 < 0 \).

Extreme Values and Geometry

Rayleigh quotient bounds

For real symmetric \( A \) with smallest and largest eigenvalues \( \lambda_{\min}, \lambda_{\max} \):

$$\lambda_{\min}\lVert x \rVert^2 \le x^TAx \le \lambda_{\max}\lVert x \rVert^2,$$

with equality at the corresponding eigenvectors. So \( \max_{\lVert x \rVert = 1} x^TAx = \lambda_{\max} \) and \( \min_{\lVert x \rVert = 1} x^TAx = \lambda_{\min} \).

Example: on \( x^2 + y^2 = 1 \), \( 3x^2 + 2xy + 3y^2 \) has matrix \( \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} \), eigenvalues 4 and 2: maximum 4 at \( \pm\frac{1}{\sqrt{2}}(1, 1) \), minimum 2 at \( \pm\frac{1}{\sqrt{2}}(1, -1) \).

Conics and quadrics. In principal axes, \( ax^2 + 2hxy + by^2 = 1 \) becomes \( \lambda_1u^2 + \lambda_2v^2 = 1 \):

Eigenvalue signsCurve \( x^TAx = 1 \) in \( \mathbb{R}^2 \)
both \( > 0 \)ellipse (circle if equal), semi-axes \( \frac{1}{\sqrt{\lambda_1}}, \frac{1}{\sqrt{\lambda_2}} \)
opposite signshyperbola
one \( > 0 \), one \( = 0 \)pair of parallel lines
both \( \le 0 \)empty set

The area enclosed by the ellipse \( x^TAx = 1 \) is \( \frac{\pi}{\sqrt{\det A}} \). In \( \mathbb{R}^3 \), \( x^TAx = 1 \) is an ellipsoid when \( A \) is positive definite, a hyperboloid of one sheet for inertia \( (2, 1) \), of two sheets for \( (1, 2) \).

Second derivative test. At a critical point of a \( C^2 \) function \( f \) on \( \mathbb{R}^n \), the Hessian \( H \) decides: positive definite gives a local minimum, negative definite a local maximum, indefinite a saddle; semidefinite and singular is inconclusive.

Simultaneous diagonalisation. If \( A \) is positive definite and \( B \) symmetric, there is an invertible \( P \) with \( P^TAP = I \) and \( P^TBP = \operatorname{diag}(\mu_1, \dots, \mu_n) \), where the \( \mu_i \) are the roots of \( \det(B - \mu A) = 0 \). (The positive definite form plays the role of an inner product.)

graph TD
    A["Quadratic form Q = x^T A x"] --> B["Write symmetric A
(halve cross terms)"] B --> C{"What is asked?"} C -->|rank, signature| D["Complete squares or count
eigenvalue signs"] C -->|definiteness| E["Leading minors (definite)
or all principal minors (semidefinite)"] C -->|max/min on unit sphere| F["Largest / smallest eigenvalue"] C -->|are two forms equivalent?| G["Compare rank and signature
(over C: rank only)"]

Memory Tricks

  • Halve the cross term. \( 4xy \) puts 2 in positions \( (1, 2) \) and \( (2, 1) \).
  • Congruence is P-transpose, similarity is P-inverse. \( P^TAP \) for forms, \( P^{-1}AP \) for maps; they agree when \( P \) is orthogonal.
  • Signature = plus minus minus. \( p - q \); rank \( = p + q \). From rank and signature: \( p = \frac{r + s}{2} \), \( q = \frac{r - s}{2} \).
  • Leading for definite, all for semi. Sylvester’s criterion with leading minors works only for strict definiteness.
  • Triangular numbers count classes. \( \frac{(n+1)(n+2)}{2} \) congruence classes of real symmetric \( n \times n \) matrices.

Don’t Confuse

ThisIs not thisThe difference
congruent (\( P^TAP \))similar (\( P^{-1}AP \))congruence keeps inertia; similarity keeps eigenvalues
signature \( p - q \)index \( p \)conventions differ; compute both \( p \) and \( q \)
leading principal minors \( \ge 0 \)positive semidefiniteneed all principal minors \( \ge 0 \)
\( \det A > 0 \)positive definite\( -I_2 \) has \( \det = 1 \)
eigenvalues of \( A \)coefficients after completing squaresonly their signs agree, not their values
real symmetric congruence (rank and signature)complex symmetric congruence (rank only)over \( \mathbb{C} \), \( -1 \) is a square
matrix of \( x^TMx \)\( M \) itselfthe form’s matrix is the symmetric part \( \frac{M + M^T}{2} \)

Common Mistakes

Practice

All questions below are original practice questions written for this page. They are not from any CSIR NET paper. In Level 3, as in Part C, one or more options may be correct.

Level 1: Foundation

  1. Write the symmetric matrix of \( Q = x^2 + 4xy + 3y^2 \).
  2. When is a real symmetric matrix positive definite, in terms of its eigenvalues?
  3. What is the signature (\( p - q \)) of \( x^2 - y^2 \)?
Answers
  1. \( \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix} \).
  2. When every eigenvalue is strictly positive.
  3. 0. \( p = q = 1 \).

Level 2: Part B Style

Practice Q1. The quadratic form \( Q = x^2 + 2xy + 2y^2 + 2yz + 2z^2 \) on \( \mathbb{R}^3 \) is:

(a) positive definite (b) positive semidefinite but not definite (c) indefinite (d) negative definite

Answer: (a)

Matrix \( \begin{pmatrix} 1 & 1 & 0 \\ 1 & 2 & 1 \\ 0 & 1 & 2 \end{pmatrix} \). Leading minors: \( 1 \); \( 2 - 1 = 1 \); \( 1(4 - 1) - 1(2 - 0) = 1 \). All positive. (Completing squares: \( Q = (x + y)^2 + (y + z)^2 + z^2 \).)

Practice Q2. The form \( x^2 + y^2 + z^2 + 2k(xy + yz + zx) \) is positive definite if and only if:

(a) \( \lvert k \rvert < 1 \) (b) \( -\frac{1}{2} < k < 1 \) (c) \( k > -\frac{1}{2} \) (d) \( 0 < k < 1 \)

Answer: (b)

The matrix \( (1 - k)I + kJ \) has eigenvalues \( 1 + 2k \) and \( 1 - k \) (twice). Both positive iff \( -\frac{1}{2} < k < 1 \). Option (a) comes from checking only \( \Delta_2 = 1 - k^2 > 0 \); at \( k = -0.6 \), \( 1 + 2k < 0 \).

Practice Q3. The maximum of \( 3x^2 + 2xy + 3y^2 \) on the circle \( x^2 + y^2 = 1 \) is:

(a) 2 (b) 3 (c) 4 (d) 6

Answer: (c)

Matrix \( \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} \), eigenvalues \( 3 \pm 1 \). The maximum is \( \lambda_{\max} = 4 \), at \( x = y = \pm\frac{1}{\sqrt{2}} \): \( \frac{3}{2} + 1 + \frac{3}{2} = 4 \).

Practice Q4. For \( Q = xy + yz + zx \) on \( \mathbb{R}^3 \), the rank and signature (\( p - q \)) are:

(a) rank 3, signature 1 (b) rank 3, signature \( -1 \) (c) rank 2, signature 0 (d) rank 3, signature 3

Answer: (b)

The matrix is \( \frac{1}{2}(J - I) \), with eigenvalues \( \frac{1}{2}(3 - 1) = 1 \) and \( \frac{1}{2}(0 - 1) = -\frac{1}{2} \) (twice). So \( p = 1 \), \( q = 2 \): rank 3, signature \( -1 \). (Check: \( Q(1, -1, 0) = -1 < 0 \) and \( Q(1, 1, 1) = 3 > 0 \), so it is indefinite.)

Level 3: Part C Style

Practice Q5. Let \( A \) be a real symmetric \( 3 \times 3 \) matrix with eigenvalues \( 2, 0, -1 \), and \( Q(x) = x^TAx \). Which statements are true?

(a) \( Q \) is indefinite. (b) \( Q \) has rank 3. (c) \( Q(x) = 0 \) for some non-zero \( x \). (d) \( A \) is congruent to \( \operatorname{diag}(1, 1, -1) \).

Answer: (a) and (c)

Inertia \( (p, q, z) = (1, 1, 1) \).

  • (a) True. One positive and one negative eigenvalue.
  • (b) False. Rank \( p + q = 2 \).
  • (c) True. Any eigenvector for eigenvalue 0 works (and so do isotropic vectors mixing the \( 2 \) and \( -1 \) directions).
  • (d) False. \( A \) is congruent to \( \operatorname{diag}(1, -1, 0) \); \( \operatorname{diag}(1, 1, -1) \) has rank 3 and signature 1.

Practice Q6. Let \( Q(x, y) = x^2 + 4xy + y^2 \). Which statements are true?

(a) \( Q \) is indefinite. (b) \( Q(1, -1) = -2 \). (c) The signature of \( Q \) is 2. (d) \( Q(x, y) \ge -(x^2 + y^2) \) for all \( (x, y) \in \mathbb{R}^2 \).

Answer: (a), (b) and (d)

The matrix \( \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix} \) has eigenvalues 3 and \( -1 \).

  • (a) True. Eigenvalues of both signs (or \( \det = -3 < 0 \)).
  • (b) True. \( 1 - 4 + 1 \).
  • (c) False. \( p = q = 1 \), signature 0.
  • (d) True. Rayleigh: \( Q(x) \ge \lambda_{\min}\lVert x \rVert^2 = -(x^2 + y^2) \). Directly, \( Q + x^2 + y^2 = 2(x + y)^2 \ge 0 \).

Practice Q7. Consider real symmetric \( 2 \times 2 \) matrices under congruence (\( A \mapsto P^TAP \), \( P \) real invertible). Which statements are true?

(a) There are exactly 6 congruence classes. (b) Two real symmetric \( 2 \times 2 \) matrices of the same rank are congruent. (c) Congruent matrices have the same eigenvalues. (d) Congruent matrices have the same rank and the same signature.

Answer: (a) and (d)
  • (a) True. Pairs \( (p, q) \) with \( p + q \le 2 \): \( (0,0), (1,0), (0,1), (2,0), (1,1), (0,2) \). That is \( \frac{3 \cdot 4}{2} = 6 \).
  • (b) False. \( I_2 \) and \( \operatorname{diag}(1, -1) \) both have rank 2.
  • (c) False. \( I \) and \( P^TP = \operatorname{diag}(4, 1) \) for \( P = \operatorname{diag}(2, 1) \) are congruent with different eigenvalues.
  • (d) True. Sylvester’s law of inertia.

Quick Revision Table

IdeaFact
Matrix of a formsquares on the diagonal, half the cross coefficient off it
Change of variables\( A \mapsto P^TAP \) (congruence)
Diagonaliseorthogonally (eigenvalues) or by completing squares
Inertia\( (p, q, z) \) = numbers of positive, negative, zero eigenvalues
Rank, signature\( p + q \), \( p - q \)
Sylvester’s lawreal symmetric congruent \( \iff \) same \( p \) and \( q \)
Classesreal: \( \frac{(n+1)(n+2)}{2} \); complex symmetric: \( n + 1 \)
Positive definiteall \( \lambda > 0 \) \( \iff \) all leading minors \( > 0 \) \( \iff A = B^TB \), \( B \) invertible
Semidefinite testall principal minors \( \ge 0 \)
\( 2 \times 2 \)\( ab - h^2 > 0 \) and \( a > 0 \): definite; \( ab - h^2 < 0 \): indefinite
Unit-sphere extremes\( \lambda_{\min} \le x^TAx \le \lambda_{\max} \)
Ellipse \( x^TAx = 1 \)area \( \frac{\pi}{\sqrt{\det A}} \)

Key Takeaways

What’s Next

Advertisement
Advertisement