Quadratic Forms
From polynomial to matrix and back — eigenvalues, principal axes, definiteness, and the geometry of second-degree surfaces
1. What Is a Quadratic Form?
1.1 The Object
A quadratic form is a homogeneous polynomial of degree two in several variables. "Homogeneous" means every term has total degree exactly 2 — there are no linear terms and no constant.
$$ Q(x_1,x_2) = 3x_1^2 - 4x_1 x_2 + 5x_2^2 $$ $$ Q(x_1,x_2,x_3) = x_1^2 + 2x_2^2 + 3x_3^2 - 6x_1 x_2 + 4x_1 x_3 - 2x_2 x_3 $$
You first met these as the pure-quadratic parts of conic equations. For instance, the equation $3x^2 - 4xy + 5y^2 + 2x - 7y + 1 = 0$ has the quadratic form $3x^2 - 4xy + 5y^2$ sitting inside it. Studying that quadratic part tells you whether the conic is an ellipse, hyperbola, or parabola.
1.2 The Matrix Representation — The Entry Ritual
Every quadratic form can be written compactly as:
$$ Q(\mathbf{x}) = \mathbf{x}^T A\, \mathbf{x} $$where $A$ is a symmetric $n \times n$ matrix and $\mathbf{x} = \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{pmatrix}$.
- The coefficient of $x_i^2$ goes on the diagonal entry $a_{ii}$.
- The coefficient of the cross-term $x_i x_j$ (with $i \neq j$) is split in half: put $\frac{\text{coefficient}}{2}$ in position $(i,j)$ and in position $(j,i)$.
This guarantees $A = A^T$ (symmetric). The halving is the entry ritual — never skip it.
Why symmetric? Any matrix $B$ gives the same quadratic form as its symmetric part $A = \frac{B + B^T}{2}$, because $\mathbf{x}^T B \mathbf{x} = \mathbf{x}^T A \mathbf{x}$. So we always use the symmetric representative — the entire theory (eigenvalues, spectral theorem, definiteness) depends on symmetry.
1.3 Polynomial → Matrix (Two Variables)
Given $Q(x_1,x_2) = ax_1^2 + bx_1 x_2 + cx_2^2$, the matrix is:
$$ A = \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix} $$Concrete example: $Q = 5x_1^2 - 6x_1 x_2 + 2x_2^2$
$$ A = \begin{pmatrix} 5 & -3 \\ -3 & 2 \end{pmatrix} $$Check: $\begin{pmatrix} x_1 & x_2 \end{pmatrix}\begin{pmatrix} 5 & -3 \\ -3 & 2 \end{pmatrix}\begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = 5x_1^2 - 3x_1 x_2 - 3x_2 x_1 + 2x_2^2 = 5x_1^2 - 6x_1 x_2 + 2x_2^2$. ✓
1.4 Matrix → Polynomial (Three Variables)
Given $A = \begin{pmatrix} 1 & -2 & 3 \\ -2 & 4 & 0 \\ 3 & 0 & -1 \end{pmatrix}$, read off:
- Diagonal entries give squared terms: $1 \cdot x_1^2 + 4 \cdot x_2^2 + (-1) \cdot x_3^2$
- Off-diagonal entry $a_{12} = -2$ gives cross-term coefficient $2 \times (-2) = -4$ for $x_1 x_2$
- $a_{13} = 3$ gives $2 \times 3 = 6$ for $x_1 x_3$
- $a_{23} = 0$ gives $0$ for $x_2 x_3$