1.1.18 · D5Linear Algebra Essentials

Question bank — Quadratic forms

2,447 words11 min readBack to topic

Before we start, one reminder of the objects we keep referring to, so no symbol is unearned:

Two more pieces of vocabulary are used constantly below, so let us earn them before any classification uses them.

Before the traps, a visual atlas of every shape a -variable quadratic form can take — refer back to it whenever an item mentions "bowl", "saddle", "dome", "trough", "ridge" or "flat". Each panel plots as a height surface, its contour lines (level curves), and the eigen-axes (principal directions). Read the panels left-to-right, top-to-bottom: top-left = bowl (positive definite), top-right = dome (negative definite), bottom-left = saddle (indefinite), bottom-right = trough (positive semidefinite, flat along one eigen-axis). The white dashed lines in every panel are the eigenvectors — the principal axes.

Figure — Quadratic forms

Now the contour view. Each panel shows the same surfaces from directly above, so height becomes colour-free level curves. Read them left-to-right, top-to-bottom: top-left = positive definite (closed ellipses hugging the minimum), top-right = indefinite (hyperbolas that open both ways — the saddle's signature), bottom-left = positive semidefinite (parallel straight lines: no bending along the flat eigen-axis), bottom-right = the zero matrix (a single flat plane, everywhere). The dashed white lines are again the eigen-axes, labelled with their eigenvalue.

Figure — Quadratic forms

True or false — justify

A symmetric matrix reads off a polynomial as for . Keep that picture in mind for every "true/false" below.

The matrix is positive definite because both diagonal entries are positive.
False. Its determinant is , so the eigenvalues have opposite signs — it is indefinite. Positive diagonal never guarantees positive definiteness because a large off-diagonal can tilt one axis downward.
If at the specific point , then is positive definite.
False. Definiteness demands for every non-zero ; one lucky sample proves nothing, since another direction could give a negative value.
For any square matrix (not necessarily symmetric), still equals where .
True. The skew part satisfies , and is a single number so it equals its own transpose: . A number equal to its own negative must be , so only the symmetric part survives — that is why we symmetrize.
The polynomial coefficient of equals the matrix entry .
False. The cross term is counted twice (from and ), so the coefficient equals . You must halve the coefficient to fill .
A quadratic form can contain a term like or a constant .
False. Every term of is degree 2 (a product of exactly two components). Linear and constant terms belong to affine/general functions, not to a pure quadratic form.
If all eigenvalues of are positive, then for all .
True. In eigen-coordinates ; with every this is a sum of positive-weighted squares that vanishes only when all , i.e. .
A positive semidefinite matrix is automatically positive definite.
False. Semidefinite allows for some non-zero (a zero eigenvalue / flat direction). Definite is strictly stronger: except at the origin.
Negating a matrix, , turns a positive definite form into a negative definite one.
True. becomes , flipping every eigenvalue's sign, so the upward bowl becomes a downward dome — see the dome panel (atlas top-right).
A negative definite matrix has all negative leading principal minors.
False. For negative definiteness the leading minors alternate in sign, starting negative: , (for ). Equivalently, is positive definite. Example: has but .
The eigenvectors of point along the directions where the quadratic surface curves most sharply.
True. Eigenvectors are the principal axes; each eigenvalue is the curvature along its axis (largest = sharpest upward bend, most negative = sharpest downward bend).
A negative semidefinite form (a "ridge") can still take a strictly positive value somewhere.
False. Negative semidefinite means everywhere; along its zero-eigenvalue direction , and in every other direction . It never rises above zero — that is exactly the upside-down trough.

Spot the error

", so ."
The off-diagonal must be halved: , giving . The uncorrected version would double-count the cross term.
" has positive diagonal, therefore , so gradient descent has a unique minimum."
Two errors chained. Positive diagonal does not imply (positive definite; off-diagonals can dominate), so the definiteness conclusion is unjustified — check leading minors or eigenvalues first.
" is negative somewhere and positive somewhere, so it must be positive semidefinite."
Taking both signs means it is indefinite (a saddle), which is the opposite of semidefinite. Semidefinite would require to never change sign.
" is indefinite because everything is negative."
No — every non-zero gives and the sign never flips, so it is negative definite (a dome with a unique maximum), not indefinite. Indefinite requires both signs to occur.
" gives the form ."
This is not symmetric, so first symmetrize: . The cross coefficient is — the number happens to match, but the reasoning must go through the symmetric part , not the raw entries.
"Since , the matrix is positive definite."
For , only says the two eigenvalues share a sign — they could both be negative. Sylvester needs and together; has yet is negative definite.
"Completing the square gave , and squares are non-negative, so : positive semidefinite."
The second square carries a negative coefficient. Taking kills the first square and leaves , so is actually indefinite. Signs of the square coefficients decide everything.

Why questions

Why do we insist be symmetric when defining a quadratic form?
Because the skew-symmetric part contributes exactly zero to (a scalar equalling its own negative must be ), symmetrizing loses nothing and makes diagonalizable by an orthonormal basis (Spectral Theorem), which is what lets us read off definiteness cleanly.
Why does the cross-term coefficient get halved to build ?
The double sum hits the pair twice — once as and once as . With symmetric these add to , so is half the visible coefficient.
Why is definiteness a property of 's eigenvalues rather than of sampled points?
The Spectral theorem rewrites as in rotated coordinates, so the sign behaviour over all directions is completely captured by the signs of the — samples only probe individual directions.
Why does a positive-definite Hessian guarantee a nice minimum in optimization?
A positive-definite Hessian means the loss curves upward in every direction, so locally it is a convex bowl with a single lowest point — exactly the situation Convex optimization and gradient descent handle well.
Why does completing the square give exactly the / Cholesky factors?
Walk the algebra on step by step. Step 1 — collect the terms: , because expanding overshoots by exactly , which we subtract back. Step 2 — the shift inside the square is a row of : the combination inside is , and that multiplier is precisely — it records "how much to add to to complete the square". Step 3 — combine leftovers: . Step 4 — the coefficient in front of each finished square is a diagonal entry of : here and , so . Assembling, , and indeed . Cholesky simply folds into , so every algebraic shift you performed is a matrix entry — the procedure is bookkeeping made mechanical.
Why can't a saddle surface have a unique minimum at the origin?
An indefinite form curves up along one eigenvector and down along another, so moving along the downhill axis decreases below zero — the origin is a stationary point but not a minimum.
Why is invariant under the rotation from the spectral decomposition?
The Spectral theorem writes where is the orthonormal matrix of eigenvectors and holds the eigenvalues. Since , the rotation preserves length, and substituting gives ; the same surface is merely viewed along its principal axes, so its shape and definiteness are unchanged.

Edge cases

What is the definiteness of the zero matrix ?
for every , so it is both positive semidefinite and negative semidefinite, but neither strictly definite nor indefinite — a completely flat plane (bottom-right panel of the contour atlas).
If has one positive eigenvalue and one zero eigenvalue, what shape is ?
Positive semidefinite: it is a trough (a valley flat along the zero-eigenvalue direction), non-negative everywhere but equal to zero along a whole line, not just the origin — see the trough panel (surface atlas bottom-right).
If has one negative eigenvalue and one zero eigenvalue, what shape is ?
Negative semidefinite — a ridge, the mirror image of the trough: flat along the zero-eigenvalue direction and sloping downward everywhere else, so with equality only along that flat line.
For a matrix and scalar , what does reduce to?
, the familiar parabola — positive definite iff , showing the quadratic form is literally the matrix generalization of .
What is at the origin , and what does that tell you about classification?
always, for every matrix, so the origin never distinguishes definiteness types — you must examine non-zero directions.
Can an indefinite matrix have a positive determinant in dimension ?
No. In , ; indefinite means opposite signs, forcing . (In higher dimensions a positive determinant can still hide mixed signs, so this shortcut is -only.)
What does a negative definite matrix look like as a surface, and how do its minors behave?
A downward dome with a unique maximum at the origin (its contours are still closed ellipses, but height decreases outward). Its leading minors alternate: for — equivalently is positive definite.
If every leading principal minor of is positive, is positive definite even when is large?
Yes — that is exactly Sylvester's criterion, which extends to all : positive definiteness holds iff all leading minors are positive, not just the determinant.
Is a diagonal matrix with entries definite, semidefinite, or indefinite?
Indefinite, because the eigenvalues (the diagonal entries) contain both a positive and a negative ; the zero merely adds a flat direction but the mixed signs dominate the classification.

Recall One-line self-test

Cover every answer, run the list top to bottom, and re-read only the ones whose reason you couldn't state cleanly.


Connections