Let \(Q(x)=x^T A x\) be a quadratic form with real symmetric matrix \(A\). Then by the spectral theorem there exists an orthogonal matrix \(P\) (i.e. \(P^T P=I\)) such that
\[ P^T A P = D = \operatorname{diag}(\lambda_1,\dots,\lambda_n), \]and under the orthonormal change of variables \(x=Py\) we have the canonical form (principal axes):
\[ Q(x)=y^T D y = \lambda_1 y_1^2 + \dots + \lambda_n y_n^2. \]This representation is called the canonical form of the quadratic form under orthogonal transformations. The \(\lambda_i\) are real and are the eigenvalues of \(A\).
Remarks: Orthogonal transformations preserve lengths and angles, so this reduction preserves geometric features; it is numerically stable compared to arbitrary similarity transformations.
Reduce \(Q(x,y)=5x^2-6xy+5y^2\) to canonical form by orthogonal transformation and classify.
Matrix: \(A=\begin{pmatrix}5 & -3\\-3 & 5\end{pmatrix}\) (since cross-term -6xy -> -3 above and below diagonal).
Compute eigenvalues: characteristic polynomial:
\[\det(A-\lambda I)=(5-\lambda)^2-9=\lambda^2-10\lambda+16.\]Solve \(\lambda^2-10\lambda+16=0\): \(\lambda=\frac{10\pm\sqrt{100-64}}{2}=\frac{10\pm6}{2}\) so \(\lambda_1=8,\ \lambda_2=2\).
Eigenvectors: for \(\lambda=8\), solve \((A-8I)v=0\): \(\begin{pmatrix}-3&-3\\-3&-3\end{pmatrix}v=0\) so take \(v_1=(1,-1)^T\). For \(\lambda=2\), \(v_2=(1,1)^T\).
Normalize: \(u_1=\frac{1}{\sqrt{2}}(1,-1)^T,\ u_2=\frac{1}{\sqrt{2}}(1,1)^T\). Take \(P=[u_1\ u_2]\).
Then \(D=P^T A P=\operatorname{diag}(8,2)\). Change variables \(x=Py\) gives canonical form \(Q=8y_1^2+2y_2^2\); classification: positive definite (both eigenvalues positive).
Reduce \(Q(x)=2x_1^2 + 2x_2^2 + 2x_3^2 + 2x_1x_2 - 4x_1x_3\).
Matrix form (symmetric):
\[ A=\begin{pmatrix}2 & 1 & -2\\1 & 2 & 0\\-2 & 0 & 2\end{pmatrix}. \]We compute eigenvalues by solving \(\det(A-\lambda I)=0\). For brevity we show steps:
Form orthonormal \(u_i\) and set \(P=[u_1\ u_2\ u_3]\). Then \(P^TAP=\operatorname{diag}(4,2,2)\) and canonical form is \(4y_1^2+2y_2^2+2y_3^2\) — positive definite.
Discuss reduction when eigenvalues repeat (choose orthonormal basis of eigenspace).
If an eigenvalue has multiplicity >1, its eigenspace has dimension equal to its geometric multiplicity. Any orthonormal basis of that eigenspace may be chosen as corresponding columns of \(P\). Orthogonality between different eigenspaces is automatic for symmetric matrices.
Matrix: \(A=\begin{pmatrix}3&1\\1&3\end{pmatrix}\).
Characteristic polynomial: \((3-\lambda)^2-1=\lambda^2-6\lambda+8\). Roots: \(\lambda=2,4\).
Eigenvectors: for \(\lambda=4\): \((A-4I)v=0\Rightarrow(-1,1)^T\). For \(\lambda=2\): \((1,1)^T\).
Orthonormal basis: \(u_1=\frac{1}{\sqrt{2}}( -1,1)^T,\ u_2=\frac{1}{\sqrt{2}}(1,1)^T\). Canonical form: \(4y_1^2+2y_2^2\) — positive definite.
Matrix: \(A=\begin{pmatrix}1&-2\\-2&1\end{pmatrix}\). Char poly: \((1-\lambda)^2-4=\lambda^2-2\lambda-3=(\lambda-3)(\lambda+1)\). Eigenvalues: 3 and -1.
Eigenvectors: for 3: (1,-1)^T; for -1: (1,1)^T. Canonical form: \(3y_1^2-1y_2^2\) — indefinite (saddle).
A=\(\begin{pmatrix}6&2.5\\2.5&6\end{pmatrix}\). Characteristic polynomial: compute \((6-\lambda)^2-6.25=\lambda^2-12\lambda+29.75\). Discriminant negative? \(144-119=25\) so eigenvalues real: \(\lambda=\frac{12\pm5}{2}=8.5,3.5\).
Both positive → positive definite. (Eigenvectors orthogonal; canonical form \(8.5 y_1^2 + 3.5 y_2^2\).)
Observe block structure: first coord decouples with eigenvalue 2 (evec e1). The 2×2 block \(\begin{pmatrix}3&1\\1&3\end{pmatrix}\) has eigenvalues 4 and 2 with eigenvectors (1,1) and (1,-1).
Full eigenvalues: 2 (twice), 4. Choose orthonormal evecs: \(u_1=(1,0,0),\ u_2=\frac{1}{\sqrt{2}}(0,1,1),\ u_3=\frac{1}{\sqrt{2}}(0,1,-1)\). Canonical: \(4y_1^2+2y_2^2+2y_3^2\) — positive definite.
2×2 block \(\begin{pmatrix}0&1\\1&0\end{pmatrix}\) has eigenvalues 1 and -1 with evecs (1,1,0) and (1,-1,0). Third coordinate eigenvalue -2.
Eigenvalues: 1,-1,-2 so canonical form: \(1y_1^2 -1 y_2^2 -2 y_3^2\) — signature (1,2,0) — indefinite.
Symmetric matrix with constant diagonal and equal off-diagonals. Vector (1,1,1) is eigenvector with eigenvalue 6. Any vector orthogonal to (1,1,1) has eigenvalue 3 (multiplicity 2).
Canonical form: \(6y_1^2+3y_2^2+3y_3^2\) — positive definite.
eigh in NumPy which uses symmetric routines).Paste a symmetric 2×2 or 3×3 matrix (rows separated by semicolons; entries by spaces or commas). The tool computes eigenvalues, orthonormal eigenvectors, the diagonal matrix \(D\), and the canonical form \(\sum \lambda_i y_i^2\).