Quadratic Forms and Definiteness

A homogeneous degree-two expression written as x T A x with A symmetric. The spectral theorem diagonalises it by an orthogonal change of variables, so the eigenvalues of A decide whether the form is always positive, always negative, or takes both signs.

Definition

A quadratic form on R n is a function Q ( x ) = x T A x with A an n × n symmetric matrix. Written out,

Q ( x ) = ∑ i a i i x i 2 + 2 ∑ i < j a i j x i x j ,

so the diagonal entries carry the squared terms and each cross term x i x j is split evenly between a i j and a j i .

Why symmetric. Any square M gives a form, but x T M x = x T M T x for every x , so M and its transpose define the same function, as does their average. Every form therefore has exactly one symmetric representative, A = 1 2 ( M + M T ) , and taking it is what makes the matrix a property of the form rather than of how it was written.

Spectral theorem. A real symmetric matrix has an orthonormal basis of eigenvectors and real eigenvalues, so A = P D P T with P orthogonal and D = diag ⁡ ( λ 1 , … , λ n ) . Substituting y = P T x ,

Q ( x ) = x T P D P T x = y T D y = λ 1 y 1 2 + ⋯ + λ n y n 2 .

In these principal axes the cross terms vanish and the form is a weighted sum of squares. Since P is orthogonal the substitution is a rotation or reflection: lengths and angles are preserved, so the geometry of the form is unchanged.

Definiteness. Classify by the signs of the eigenvalues:

All eigenvaluesForm is Q ( x ) for x ≠ 0
> 0 positive definite > 0
≥ 0 , some = 0 positive semidefinite ≥ 0 , zero on the kernel
< 0 negative definite < 0
≤ 0 , some = 0 negative semidefinite ≤ 0
mixed signsindefiniteboth signs occur

The classification is immediate once the eigenvalues are known, because Q ( P e i ) = λ i : each eigenvalue is the value of the form on its own unit eigenvector.

For 2 × 2 . With tr ⁡ A = λ 1 + λ 2 and det A = λ 1 λ 2 : positive definite iff det A > 0 and a 11 > 0 ; indefinite iff det A < 0 ; semidefinite iff det A = 0 .

Completing the square. An alternative route to the same verdict, expressing Q as a sum of squares with coefficients. Unlike the spectral route it uses a non-orthogonal change of variables, so it distorts lengths. The signs of the coefficients are still correct, but the axes it produces are not the principal ones.

Assumptions and scope

  • The matrix must be symmetric for the eigenvalue classification to apply. A non-symmetric matrix defines the same form as its symmetric part, and the eigenvalues of the non-symmetric version say nothing about definiteness.

  • Definiteness is a property of the form, not of a coordinate system. An orthogonal change of variables leaves the eigenvalues unchanged, which is why the classification is well defined.

  • A zero eigenvalue makes the form semidefinite rather than definite: it vanishes on a nonzero vector, so the strict inequality fails while the weak one holds.

  • Completing the square gives the correct signature but not the principal axes, since its change of variables is not orthogonal. Sylvester's law guarantees the counts of positive, negative and zero coefficients agree with the eigenvalue signs whichever route is taken.

  • The 2 × 2 determinant shortcuts do not extend directly to larger matrices. For n × n the analogous test is that all leading principal minors are positive, which is Sylvester's criterion.

  • Real symmetry is what the spectral theorem needs. A complex matrix requires Hermitian symmetry, A = A ¯ T , for the same conclusions.

Forms this is expressed in

The same content in several forms. Each makes something visible that the others leave implicit, so moving between them is part of understanding the topic rather than a presentation choice.

geometric

the sign of the eigenvalues decides the shape

A quadratic form drawn as its level sets x T A x = c , which is where its classification becomes a shape rather than a sign computation.

Positive definite. The form is positive for every nonzero x , so the level sets are nested closed ellipses and the origin is a strict minimum. 5 x 2 + 4 x y + 5 y 2 is this case: eigenvalues 7 and 3 , both positive.

Indefinite. The form takes both signs, so the level sets are hyperbolas opening along the directions where it is positive, with the zero set a pair of crossing lines. x 2 − y 2 is this case, and the origin is a saddle rather than an extremum.

Semidefinite. One eigenvalue vanishes, so the form is flat along that eigenvector and the level sets degenerate into parallel lines.

The principal axes are the eigenvectors, which is the geometric content of the spectral theorem: a rotation removes the cross term, and the eigenvalues are the stretch along each axis. The axis lengths go as 1 / λ , so a small eigenvalue is a long axis.

Translates into: geometric

Worked material

Example

One of each class

Positive definite, despite a negative cross term. Q = 2 x 2 − 4 x y + 5 y 2 has matrix ( 2 − 2 − 2 5 ) , trace 7 and determinant 10 − 4 = 6 . The characteristic polynomial λ 2 − 7 λ + 6 factors as ( λ − 6 ) ( λ − 1 ) , so the eigenvalues are 6 and 1: positive definite.

The sign of the cross term was irrelevant. Checking a few values: Q ( 1 , 0 ) = 2 , Q ( 0 , 1 ) = 5 , Q ( 1 , 1 ) = 2 − 4 + 5 = 3 , all positive, and the minimum over the unit circle is 1, the smaller eigenvalue.

Its principal axes are 1 5 ( 1 , − 2 ) for λ = 6 and 1 5 ( 2 , 1 ) for λ = 1 , perpendicular as the theorem requires, and Q evaluates to exactly 6 and 1 on them.

Indefinite. Q = x 2 − y 2 has matrix diag ⁡ ( 1 , − 1 ) , eigenvalues 1 and − 1 . Already diagonal, so the standard axes are the principal ones. Q ( 1 , 0 ) = 1 > 0 , Q ( 0 , 1 ) = − 1 < 0 , and Q ( 1 , 1 ) = 0 . The form vanishes on the lines y = ± x without being semidefinite, because it takes both signs elsewhere. Its level set Q = 1 is a hyperbola.

Negative definite. Q = − 3 x 2 − 2 x y − 3 y 2 has matrix ( − 3 − 1 − 1 − 3 ) , trace − 6 , determinant 9 − 1 = 8 , eigenvalues − 2 and − 4 . Every value is negative: Q ( 1 , 0 ) = − 3 , Q ( 1 , 1 ) = − 8 , Q ( 1 , − 1 ) = − 4 . Note the determinant is positive here, for a 2 × 2 , a positive determinant means same-signed eigenvalues, and the diagonal entry settles which sign.

Positive semidefinite in three variables. Q = x 2 + y 2 + z 2 + 2 x y has matrix

( 1 1 0 1 1 0 0 0 1 ) ,

which is block diagonal: the 2 × 2 block has eigenvalues 2 and 0, and the isolated entry gives 1. So the eigenvalues are 2, 1, 0, semidefinite, not definite.

The zero eigenvalue's eigenvector is ( 1 , − 1 , 0 ) , and indeed Q ( 1 , − 1 , 0 ) = 1 + 1 + 0 − 2 = 0 with the vector nonzero. Along the whole line through it the form vanishes; everywhere off that line it is strictly positive, as Q ( 1 , 1 , 0 ) = 4 , Q ( 0 , 0 , 3 ) = 9 and Q ( 1 , − 1 , 5 ) = 25 show.

Cross terms decide as much as squared ones; a positive determinant does not mean positive definite; and the gap between definite and semidefinite is a single nonzero vector on which the form vanishes. None of this is visible without the eigenvalues.

Non-example

Five ways a classification goes wrong

Reading definiteness off the squared coefficients. " x 2 + 4 x y + y 2 has positive coefficients on x 2 and y 2 , so it is positive definite." Its matrix is ( 1 2 2 1 ) with det = 1 − 4 = − 3 < 0 , so the eigenvalues are 3 and − 1 : indefinite. Evaluating confirms it, Q ( 1 , 1 ) = 6 > 0 and Q ( 1 , − 1 ) = 1 − 4 + 1 = − 2 < 0 .

The converse error is just as common: 2 x 2 − 4 x y + 5 y 2 has a negative cross term and is positive definite, with eigenvalues 6 and 1 .

Forgetting to halve the cross coefficient. Writing ( 5 4 4 5 ) for 5 x 2 + 4 x y + 5 y 2 . That matrix represents 5 x 2 + 8 x y + 5 y 2 , whose eigenvalues are 9 and 1 rather than 7 and 3 . The verdict happens to survive here, both are still positive, but the axes, the level set and any quantitative conclusion are wrong.

Using a non-symmetric matrix's eigenvalues. ( 5 4 0 5 ) defines the same form as ( 5 2 2 5 ) , as evaluating at any point confirms. Its eigenvalues are both 5, which are neither 7 nor 3 and say nothing about this form. Definiteness is a property of the symmetric representative; the eigenvalues of any other representative are an artefact of how it was written.

Calling a semidefinite form definite. ( x + y ) 2 has matrix ( 1 1 1 1 ) with eigenvalues 2 and 0 . It is never negative, but it is not positive definite: Q ( 1 , − 1 ) = 0 with ( 1 , − 1 ) ≠ 0 . The distinction is the difference between > and ≥ , and it matters. A positive semidefinite Hessian does not establish a strict minimum.

Taking completing-the-square coefficients as eigenvalues. From 5 ( x + 2 5 y ) 2 + 21 5 y 2 , reporting the eigenvalues as 5 and 21 / 5 . They are 7 and 3 . Sylvester's law guarantees only that the signs match; the values differ because the change of variables was not orthogonal.

The first three mistake a representation for the object, coefficients, an unhalved matrix, an asymmetric one. The last two mistake a weaker conclusion for a stronger one. All five are caught by the same habit: build the symmetric matrix, take its eigenvalues, and test the verdict on a concrete vector.

Common errors

Common misconception

A quadratic form is positive definite when the coefficients of its squared terms are positive, since those are the diagonal entries of its matrix and the cross terms only shift the value slightly.

Related units

Requires

Connected

Learn this topic

Used in

Sources

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.