The idea: turn, slide, divide, then read the signs
A quadric is the set of points (x, y, z) with
Ax2 + By2 + Cz2 + Dxy + Eyz + Fzx + Gx + Hy + Iz + J = 0.
Ten numbers, but only a handful of shapes (the nine quadric surfaces). The shape is hidden by two things: the cross terms Dxy, Eyz, Fzx mean the surface is tilted, and the linear terms Gx, Hy, Iz mean it is moved away from the origin. Three moves undo that:
- Turn the axes onto the surface's own axes: the cross terms vanish.
- Slide the origin to the surface's centre (complete the square): the linear terms vanish.
- Divide by the constant: the right side becomes 1 (or stays 0).
What is left is a standard form, and the signs of its coefficients name the surface. The page does this in six steps; press Next Step to go one at a time, or Run All.
Step 2: the matrix of a quadric
The second-degree part is a product with a symmetric matrix M:
Ax2 + By2 + Cz2 + Dxy + Eyz + Fzx = xTMx, M = [[A, D/2, F/2], [D/2, B, E/2], [F/2, E/2, C]].
The squares go on the diagonal. A cross term is split in half: xy shows up twice in xTMx (row x, column y and row y, column x), so each place gets D/2. The rest of the equation is linear, bTx + J with b = (G, H, I). (Demo: 1: 5x² + 5y² + 4z² − 6xy − 8z − 4 = 0, step 2: M has rows (5, −3, 0), (−3, 5, 0), (0, 0, 4).)
Step 3: eigenvectors are the principal axes
An eigenvector v of M is a direction that M only stretches: Mv = λv. The numbers λ come from det(M − λI) = 0, a cubic with three roots. For a symmetric matrix the spectral theorem (the principal axis theorem) promises more:
- all three eigenvalues λ1, λ2, λ3 are real;
- the eigenvectors v1, v2, v3 can be chosen of length 1 and perpendicular to each other.
They are the surface's principal axes: the arrows on the canvas. Two quick checks catch arithmetic slips: λ1 + λ2 + λ3 = A + B + C (the trace) and λ1λ2λ3 = det M.
Step 4: turning removes the cross terms
Put the eigenvectors side by side as the columns of Q = [v1 v2 v3] (flip one of them if needed so that det Q = +1: then Q is a rotation, not a mirror). New coordinates u, v, w measure along the eigenvectors: (x, y, z) = Q(u, v, w). Because MQ = QΛ and QTQ = I,
xTMx = (u, v, w) QTMQ (u, v, w)T = λ1u2 + λ2v2 + λ3w2.
No cross terms are left. The linear part only gets new numbers, bTx = (QTb) · (u, v, w), and J does not change. On the canvas the surface turns until v1, v2, v3 lie on x, y, z. (Demo: 2: 2y² + z² + 4yz − 4zx − 4x + 4y + 6z + 3 = 0 turns 60° about the line through (1, 1, 1): its eigenvectors are (2, 2, −1)/3, (−1, 2, 2)/3, (2, −1, 2)/3.)
Step 5: completing the square moves the centre
Each letter whose square is there gets its linear term folded in:
λu2 + pu = λ(u + p/(2λ))2 − p2/(4λ).
For Example 2: u2 − 2u = (u − 1)2 − 1 and 4v2 + 8v = 4(v + 1)2 − 4, so the equation is (u − 1)2 + 4(v + 1)2 − 2w2 − 2 = 0 and the centre is (u, v, w) = (1, −1, 0). With u′ = u − 1, v′ = v + 1, w′ = w the surface slides to the origin: u′2 + 4v′2 − 2w′2 = 2.
If an eigenvalue is 0, that letter has no square to fold into. Its linear term stays; it soaks up the constant and fixes a vertex instead of a centre. That is how paraboloids appear.
Step 6: divide and read the signs
Move the constant to the right and divide by it (put the positive eigenvalues first). Leaving out the stretches a, b, c, every real quadric surface is one of these:
| λ signs | standard form | surface | on the page |
|---|---|---|---|
| + + + | u² + v² + w² = 1 | ellipsoid | Example 1 |
| + + − | u² + v² − w² = 1 | hyperboloid of one sheet | Example 2 |
| + + − | u² + v² − w² = −1 | hyperboloid of two sheets | Example 3 |
| + + − | u² + v² − w² = 0 | elliptic cone | Example 4 |
| + + 0 | u² + v² = w | elliptic paraboloid | Example 5 |
| + − 0 | u² − v² = w | hyperbolic paraboloid | Example 6 |
| + + 0 | u² + v² = 1 | elliptic cylinder | – |
| + − 0 | u² − v² = 1 | hyperbolic cylinder | – |
| + 0 0 | u² = w (or u² = 1) | parabolic cylinder (or two parallel planes) | – |
Read it in two passes. The signs of the eigenvalues come first, in step 3: + + − already means one sheet, two sheets or a cone (the blue rows on the canvas). The constant decides between them in step 6: right side 1, −1 or 0. (Demo: 3: x² + 4yz + 2x + 3 = 0 has the same signs as Example 2 but ends at −1: two sheets.)
A zero eigenvalue: paraboloid or cylinder
When λ3 = 0, w has no square. After step 5 two cases are left:
- w still has a linear term: λ1u′2 + λ2v′2 = c·w′, a paraboloid (elliptic if λ1, λ2 have the same sign, hyperbolic if not). (Demo: 5: 2x² + 4y² + 3z² + 4yz − 4zx − 6y − 12z = 0, Demo: 6: x² − z² + 4xy − 4yz − 6x − 3y = 0)
- w is gone completely: λ1u′2 + λ2v′2 = d, a cylinder: the same curve at every w.
The count of non-zero eigenvalues is the rank of M: rank 3 gives the centred surfaces (ellipsoid, hyperboloids, cone), rank 2 the paraboloids and cylinders, rank 1 the parabolic cylinder and pairs of planes.
Worked example
5x2 + 5y2 + 4z2 − 6xy − 8z − 4 = 0 (Example 1):
- M = [[5, −3, 0], [−3, 5, 0], [0, 0, 4]].
- λ = 2, 8, 4 with v1 = (1, 1, 0)/√2, v2 = (−1, 1, 0)/√2, v3 = (0, 0, 1). Check: 2 + 8 + 4 = 14 = 5 + 5 + 4 and 2 · 8 · 4 = 64 = det M.
- Turn 45° about the z-axis: 2u2 + 8v2 + 4w2 − 8w − 4 = 0.
- Complete the square: 4w2 − 8w = 4(w − 1)2 − 4, so the centre is (0, 0, 1) and 2u′2 + 8v′2 + 4w′2 = 8.
- Divide by 8: u′2/4 + v′2 + w′2/2 = 1. Signs + + +, right side 1: an ellipsoid with semi-axes 2, 1, √2.
See also Quadric Surfaces for the nine standard shapes and what a, b, c do, Eigenvectors for Mv = λv in 2D, and Rotate and Scale in 3D for the rotation matrix itself.
What the page leaves out
How to solve the cubic det(M − λI) = 0 by hand (the examples are built so that the roots are whole numbers); repeated eigenvalues, where any perpendicular pair in the eigen-plane works and the surface is round; the cases with no real points (− − − = 1, u2 + v2 = −1) and the degenerate ones (a single point, a line, a pair of planes); which axis to call w (the page puts the odd one out last); and the rank-and-signature test that classifies a quadric from the 4 × 4 matrix of all ten coefficients without turning it at all.