Quadratic forms
Write a quadratic form as Q(x) = xᵀAx with A symmetric, remove its cross term by the change of variable x = Py with P orthogonal, and classify it as positive definite, negative definite or indefinite from the eigenvalues of A, with its level curves.
It opens on
The level curves of Q(x) = 3x₁² + 2x₁x₂ + 3x₂² are tilted ovals, because of the cross term 2x₁x₂. Is there a way to turn the axes so the cross term disappears and the shape can be read straight off?
Why it matters
Quadratic forms are the energy of a spring system, the curvature term of a function near a critical point (the second derivative test), the variance of a combination of data features and the shape of every conic; the eigenvalues read all of these at a glance.
Good to know first
- Symmetric matrices and the spectral theorem: A = PDPᵀ with P orthogonal
- Orthogonal matrices: P⁻¹ = Pᵀ and lengths are kept
- Positive definite matrices: xᵀAx > 0 for x ≠ 0
Step by step
Quadratic forms and their matrices
Write a quadratic form as xᵀAx with A symmetric and evaluate it.
For Q = 3x₁² + 2x₁x₂ + 3x₂², A = [[3, 1], [1, 3]]; check: xᵀAx = 3x₁² + x₁x₂ + x₂x₁ + 3x₂².
A common mix-up
The matrix of 3x₁² + 2x₁x₂ + 3x₂² is [[3, 2], [0, 3]] or [[3, 2], [2, 3]].
In fact: The symmetric matrix splits the 2 into 1 and 1; [[3, 2], [2, 3]] would give 4x₁x₂.
Removing the cross term
Use the eigenvectors of A as new orthogonal axes, x = Py, to turn Q into λ₁y₁² + λ₂y₂².
For A = [[3, 1], [1, 3]], λ₁ = 4 on (1, 1)/√2 and λ₂ = 2 on (1, −1)/√2, so P = (1/√2)[[1, 1], [1, −1]] and D = [[4, 0], [0, 2]].
A common mix-up
Removing the cross term changes the values of the form.
In fact: Q at a point is the same number in both coordinates (19 at x = (1, 2)); only the axes we describe it with turn.
Classifying by eigenvalues
Classify a quadratic form as positive definite, negative definite or indefinite from the signs of the eigenvalues, and see each type in its graph and level curves.
The thread form has λ = 4 and 2, both positive: positive definite, a bowl with elliptical level curves.
A common mix-up
A form whose square terms both have positive coefficients is positive definite.
In fact: The cross term can win: x₁² + 4x₁x₂ + x₂² has Q(1, −1) = −2, and an eigenvalue −1.
Try it
Write the matrix of Q(x) = x₁² − 6x₁x₂ + 2x₂² + 4x₂x₃ − x₃² on ℝ³.Answer
[[1, −3, 0], [−3, 2, 2], [0, 2, −1]]
Hint: The x₁x₃ term is missing, so those entries are 0
Remove the cross term of Q = 2x₁² + 6x₁x₂ + 2x₂².Answer
A = [[2, 3], [3, 2]] has λ = 5 on (1, 1) and −1 on (1, −1); with P = (1/√2)[[1, 1], [1, −1]], Q = 5y₁² − y₂²
Hint: Trace 4, det −5
Classify Q = −x₁² + 2x₁x₂ − 2x₂².Answer
A = [[−1, 1], [1, −2]] has trace −3 and det 1, so both eigenvalues are negative: negative definite
Hint: Use the trace and determinant
Write the symmetric matrix of 5x₁² − 4x₁x₂ + x₂².Answer
[[5, −2], [−2, 1]]
Write Q in the new variables.Answer
Q = 4y₁² + 2y₂²
