A quadratic form in two variables is
- Q(x, y) = ax² + 2bxy + cy² = xᵀAx, where A is the symmetric matrix with the rows (a, b) and (b, c)
The cross term is 2bxy, so b is half the coefficient of xy. The card above computes Q at a point, and states
what kind of form it is, from a, b and c alone:
| Condition |
Kind |
Q |
| a > 0 and ac − b² > 0 |
positive definite |
Q > 0 for every point except the origin |
| a < 0 and ac − b² > 0 |
negative definite |
Q < 0 for every point except the origin |
| ac − b² < 0 |
indefinite |
both signs occur |
| ac − b² = 0 |
semidefinite |
one sign or 0, and Q = 0 along at least one line through the origin |
The same thing in eigenvalues: the form is positive definite when both eigenvalues of A are positive, negative
definite when both are negative, and indefinite when they have different signs. The eigenvalues multiply to
the determinant ac − b² and add up to the trace a + c, which is why the table works; see
eigenvalues of a 2×2 matrix.
Holds for a symmetric matrix, which is what a quadratic form always has when the cross term is split evenly.
Worked example
Q(x, y) = 3x² − 2xy + 2y² has a = 3, b = −1 and c = 2. At the point (2, 1) its value is
3·4 − 2·2·1 + 2·1 = 12 − 4 + 2 = 10.
The determinant is ac − b² = 6 − 1 = 5 and a > 0, so the form is positive definite. The eigenvalues are the roots of
λ² − 5λ + 5, which are (5 ± √5)/2, about 3.62 and 1.38, both positive. Completing the square agrees:
Q = 3(x − y/3)² + (5/3)y², a sum of two squares with positive coefficients.
A second example: indefinite
Q(x, y) = x² + 4xy + y² has a = 1, b = 2 and c = 1, and ac − b² = 1 − 4 = −3. The form is indefinite. Q(1, 1) = 6
is positive and Q(1, −1) = 1 − 4 + 1 = −2 is negative. The eigenvalues are 3 and −1, with the eigenvectors
(1, 1) and (1, −1). In the orthonormal basis of those directions, u = (x + y)/√2 and w = (x − y)/√2, the form
is Q = 3u² − w², which shows both signs at once. Changing to that basis is
change of basis.
Q(x, y) = x² + 2xy + y² = (x + y)² has ac − b² = 0. It is semidefinite: Q ≥ 0 everywhere, and Q = 0 on the line
y = −x.
Common mistakes
- Using the whole cross coefficient as b. In 2x² + 2xy + 2y² the number in front of xy is 2 and b is 1:
ac − b² = 4 − 1 = 3, so the form is positive definite. With b = 2 the determinant is 0 and the verdict is
wrongly semidefinite.
- Judging by the determinant alone. ac − b² > 0 holds for both the positive and the negative definite form.
The sign of a (or of the trace) separates them.
- Calling a form positive definite because its coefficients are positive. x² + 4xy + y² has a = c = 1 and is
indefinite.
- Testing a few points. Positive values at some points do not rule out negative values elsewhere; the
determinant test is for all points.
Frequently asked questions
What does positive definite mean?
Q(x) > 0 for every x other than the zero vector. For the form xᵀAx that is the same as all eigenvalues of A
being positive.
How is this used?
A positive definite Hessian, the matrix of second-order partial derivatives, at a stationary point means a
local minimum, and an indefinite one a saddle point. The principal axes of an ellipse Q(x, y) = 1 lie along
the eigenvectors of A.
Does the test work for three variables?
Not in this form. For a 3×3 symmetric matrix, all eigenvalues positive is the test, or the first, the 2×2 and the
3×3 leading determinants all positive (Sylvester’s criterion).