SME
Linear Algebra

Symmetric matrices, quadratic forms and the SVD

Use this for “Classify Q = 5x² + 4xy + 2y² and find its principal axes.”

Diagram

−1.5−1−0.50.511.5−1.5−1−0.50.511.5xyθ = 26.57°x′y′5x² + 4xy + 2y² = 16x′² + y′² = 1
The
turn
has
tan
2θ
=
4
5 − 2
=
1.33,
so
2θ
=
53.13°
and
θ
=
26.57°.
In the turned axes the equation reads 6x′² + y′² = 1, with no x′y′ term: an ellipse, as B² − 4AC = −24 < 0 says.
Its
half-axes
are
√(
1
A′
)
=
0.41
along
x′
and
√(
1
C′
)
=
1
along
y′.
This is an example. Type your own values to start a new problem.
Q
=
a
x²
+
B
xy
+
c
y²
b
Half the number before xy
worked out (not typed)
det A
Determinant ac − b²
worked out (not typed)
λ₁
Larger eigenvalue
worked out (not typed)
λ₂
Smaller eigenvalue
worked out (not typed)
θ
Angle to turn the axes
worked out (not typed) · °
class
Class of the form
worked out (not typed)

Formulas

b
=
B
2
2
=
4
2
det
A
=
a
×
c
−
b
2
6
=
5
×
2
−
2
2
λ₁
=
(
a
+
c
+
√(
(
a
−
c
)
2
+
4
×
b
2
))
÷
2
6
=
(5
+
2
+
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
λ₂
=
(
a
+
c
−
√(
(
a
−
c
)
2
+
4
×
b
2
))
÷
2
1
=
(5
+
2
−
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
tan(2
×
θ
)
=
2
×
b
a
−
c
tan(2
×
26.5651°)
=
2
×
2
5 − 2
class
=
positive
definite
if
λ₂
>
0,
negative
definite
if
λ₁
<
0,
indefinite
if
λ₁
>
0
>
λ₂
,
else
semidefinite
1 > 0, so positive definite

Assumptions

•
Q = ax² + 2bxy + cy² = xᵀAx with the symmetric matrix A = [[a, b], [b, c]]: half the xy number goes in each corner.
•
A symmetric matrix has real eigenvalues and perpendicular eigenvectors, so turning the axes by θ onto them removes the xy term.
•
In the turned axes Q = λx′² + μy′², λ and μ the eigenvalues along x′ and y′; their signs name the class.

Step-by-step

WE KNOW
a = 5, B = 4, c = 2
FIND
half the number before xy (b), determinant ac − b² (det A), larger eigenvalue (λ₁), smaller eigenvalue (λ₂), angle to turn the axes (θ), class of the form (class)
Step 1 · Find half the number before xy (b)
Use b = B ÷ 2
Half the xy number goes in each corner of A: xᵀAx has bxy + byx = 2bxy.
b
=
4
2
b
=
2
Step 2 · Find determinant ac − b² (det A)
Use det A = a × c − b²
Down
the
main
diagonal,
take
away
the
other
diagonal:
b
×
b
.
det
A
=
5
×
2
−
2
2
det(A
−
λI)
=
(5
−
λ)(2
−
λ)
−
2
2
=
λ
2
−
7λ
+
6
det A = 6
Step 3 · Find larger eigenvalue (λ₁)
Use λ₁ = (a + c + √((a − c)² + 4 × b²)) ÷ 2
The
quadratic
formula
on
λ
2
−
(
a
+
c
)λ
+
ac
−
b
2
=
0.
Its
discriminant
is
(
a
−
c
)
2
+
4
b
²,
never
below
0,
so
λ
is
real.
λ₁
=
(5
+
2
+
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
√(
(5 − 2)
2
+
4
×
2
2
)
=
√
9 + 16
=
5
λ₁
=
6
Step 4 · Find smaller eigenvalue (λ₂)
Use λ₂ = (a + c − √((a − c)² + 4 × b²)) ÷ 2
The same formula with the − sign gives the smaller eigenvalue.
λ₂
=
(5
+
2
−
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
λ₂
=
7 − 5
2
=
1
check:
λ₁
×
λ₂
=
6
×
1
=
6
=
det
A
✓
λ₂
=
1
Step 5 · Find angle to turn the axes (θ)
Use tan(2 × θ) = 2 × b ÷ (a − c)
Turning
by
θ
makes
the
x′y′
term
(
c
−
a
)
sin
2
θ
+
2
b
cos
2
θ
,
which
is
0
when
tan
2
θ
=
2
b
a
−
c
.
Take
2
θ
from
0°
to
180°.
θ
=
tan⁻¹
2 ×
b
÷ (
a
−
c
)
2
θ
=
tan⁻¹
2 × 2 ÷ (5 − 2)
2
θ
=
53.1301°
÷
2
x′
runs
along
the
eigenvector
of
λ₁
,
y′
along
the
eigenvector
of
λ₂
.
θ
=
26.5651°
Step 6 · Find class of the form (class)
Use class = positive definite if λ₂ > 0, negative definite if λ₁ < 0, indefinite if λ₁ > 0 > λ₂, else semidefinite
Both eigenvalues are above 0, so Q > 0 at every point except the origin. Q = 1 is an ellipse.
1 > 0: positive definite
class
=
the
signs
of
λ₁
and
λ₂
class = the signs of 6 and 1
class = positive definite
Check
Put the numbers back in. Both sides should match.
2
=
4
2
✓
6
=
5
×
2
−
2
2
✓
6
=
(5
+
2
+
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
✓
1
=
(5
+
2
−
√(
(5 − 2)
2
+
4
×
2
2
))
÷
2
✓
tan(2
×
26.5651°)
=
2
×
2
5 − 2
✓
1 > 0, so positive definite ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

More problem types

© 2026 SME. All rights reserved.