Symmetric matrices: test the eigenvector directions
The question
For the matrix with rows (3, 1) and (1, 3), how much freedom do you have when choosing two eigenvector directions?
Try a pair, check what the matrix does, then change the matrix.
- 1 SeeTry to break the pattern.
- 2 TryTest a repeated eigenvalue.
- 3 ProveExplain the direction constraint.
- 4 ApplyCompute in an eigenvector basis.
Before you start · 3 quick checks on eigenvectors, dot products and unit vectors
Two ideas before you start
2 ideasTranspose swaps row and column
A matrix and its transpose, with the off-diagonal entries exchanged.
A matrix is symmetric when transposing it changes nothing. Compare entries across the main diagonal.
Exact definition
For a real square matrix \(A\), the transpose satisfies \((A^T)_{ij}=A_{ji}\). The matrix is symmetric when \(A^T=A\). In the plane, that means
\[A=\begin{pmatrix}a&b\\b&d\end{pmatrix}.\]The diagonal entries need not match. Symmetry is a statement about entries in an orthonormal coordinate system, not a promise that the map preserves lengths or keeps every vector on its own line.
A dot product compares directions
Two vectors from the origin, with their dot product computed below.
Multiply matching coordinates and add. A zero dot product means perpendicular directions when both vectors are nonzero.
Exact definition
Write \(u^Tv=u\cdot v=\sum_i u_iv_i\). Its associated length is \(\|u\|=\sqrt{u^Tu}\). Vectors are orthogonal if their dot product vanishes; an orthonormal set also gives each vector unit length. For nonzero vectors, \(u^Tv=\|u\|\|v\|\cos\theta\), where \(\theta\) is their angle.
The lesson on dot products and projection explains this geometric test. Here it will test eigenvector directions, not find a closest point.
Notation: eigenvectors, bases and coordinates
An eigenvector is nonzero and satisfies \(Au=\lambda u\). The multiplier \(\lambda\) can be positive, negative or zero. See eigenvectors for how to find one. Scaling an eigenvector by a nonzero number preserves its eigenvalue.
A basis gives a unique linear combination for every vector. Put its vectors in the columns of a square matrix \(Q\). If the columns are orthonormal, \(Q^TQ=I\), so \(Q^{-1}=Q^T\). This follows by taking each pair of column dot products. The lesson on diagonalization explains the more general expression \(A=PDP^{-1}\).
Try to find an exception
- Choose a symmetric matrix. Its solid vector \(u\) is already an eigenvector.
- Turn the dashed unit vector \(v\). Try to make it an eigenvector on a different line, without making it perpendicular to \(u\).
- Press Check this pair, or decide that no such pair exists. A checked attempt opens the eigen-directions and their angle.
What the check measures
For unit \(v\), the number \(r=v^TAv\) is the component of \(Av\) along \(v\). The residual \(\|Av-rv\|\) measures the part left over. It vanishes exactly for an eigenvector, including one with eigenvalue zero. The controls use a fixed angle grid; all eigen-directions of these examples lie on that grid. The implementation allows floating-point roundoff when testing zero. A small displayed residual alone is not a proof.
The angle readout uses the smaller angle between the two lines, so reversing a vector changes neither line nor angle. Stage 3 explains why the observed pattern is forced by symmetry.
Change the eigenvalue condition
The preceding search required different eigenvalues. Test the boundary of that condition before drawing a broader conclusion.
For the identity, applying the matrix leaves every vector unchanged. The explorer fixes \(u=(1,0)\) and turns a unit vector \(v\). Every displayed candidate is now an eigenvector. Your task is to distinguish a basis from an orthonormal basis.
How to replace an oblique eigenvector pair
Suppose \(u,v\) are independent eigenvectors for the same eigenvalue \(\lambda\). Subtract the projection of \(v\) onto \(u\):
\[w=v-\frac{u^Tv}{u^Tu}u.\]Then \(u^Tw=0\). Independence ensures \(w\ne0\). Also \(Aw=\lambda w\), because every linear combination stays in the same eigenspace. Normalize \(u\) and \(w\) to obtain an orthonormal pair. This subtraction is the Gram–Schmidt step; it changes the basis without changing its span.
Do this only within a repeated eigenspace when building an eigenvector basis. Combining vectors from different eigenvalues usually loses the eigenvector property. They are already orthogonal for a symmetric matrix.
Move the matrix across the dot product
Let \(A\) be a real symmetric square matrix. Let \(u,v\ne0\) satisfy \(Au=\lambda u\) and \(Av=\mu v\), with real \(\lambda\ne\mu\). Then \(u^Tv=0\). This statement does not require positive eigenvalues, an invertible matrix, or unit eigenvectors.
In the builder, write \(s=u^Tv\) and \(c=\|u\|\|v\|\). Since neither vector is zero, \(c\gt0\). Pick the true statement at each step.
Why there are enough eigenvectors
The short proof above only compares eigenvectors that already exist. It does not establish their existence or show that they span the space. In the real plane, those remaining points follow directly from the characteristic polynomial:
\[\begin{aligned}p(t)&=t^2-(a+d)t+ad-b^2,\\\Delta&=(a-d)^2+4b^2.\end{aligned}\]For a symmetric matrix, the discriminant is nonnegative, so both roots of \(p\) are real: a real symmetric matrix has real eigenvalues. If the discriminant is positive, there are two distinct real roots. Each root makes \(A-tI\) singular and therefore supplies a nonzero eigenvector. The theorem makes the two vectors orthogonal; after normalization they form a basis.
If the discriminant vanishes, both squares vanish, giving \(a=d\) and \(b=0\). Thus \(A=aI\). Every nonzero vector is an eigenvector, so the standard coordinate vectors supply an orthonormal eigenbasis. This also covers the zero matrix.
Every real symmetric matrix in finite dimension admits
\[A=QDQ^T,\qquad Q^TQ=I,\]where \(D\) is real diagonal and the columns of \(Q\) are orthonormal eigenvectors, ordered to match the diagonal of \(D\). The planar argument above proves this in the dimension used by the figures.
Why the higher-dimensional statement also holds
Here is an outline using one additional calculus fact: a continuous function attains a maximum on a closed bounded sphere in finite dimension. Maximize \(x^TAx\) over unit vectors and call a maximizer \(q\). For any unit \(w\) perpendicular to \(q\), vary along \(x(t)=q\cos t+w\sin t\). The derivative at the maximum is zero, so symmetry gives \(w^TAq=0\). Thus \(Aq\) is a real multiple of \(q\), possibly zero: \(q\) is an eigenvector.
The space perpendicular to \(q\) is preserved by \(A\), since \(q^TAw=(Aq)^Tw=0\) whenever \(q^Tw=0\). Restrict the map to that space. It is still symmetric in orthonormal coordinates. Repeat in one fewer dimension until no directions remain. The resulting unit eigenvectors form the required basis. The calculus fact is used only in this optional outline.
What the factorization does
Read \(QDQ^Tx\) from right to left. First, \(Q^Tx\) takes dot products with the unit eigenvectors to find coordinates. Next, \(D\) scales each coordinate by its eigenvalue. Finally, \(Q\) returns the vector to the original coordinates. An orthogonal change of coordinates preserves lengths; the diagonal scaling need not. Negative eigenvalues reverse their coordinate direction.
Conversely, if a real matrix has this factorization with real diagonal \(D\) and orthogonal \(Q\), transposing gives \((QDQ^T)^T=QD Q^T\). It is symmetric. Ordinary diagonalization alone is weaker, because its basis matrix need not be orthogonal.
Compute with an orthonormal eigenbasis
Each problem has hints and a worked solution. Enter a decimal without units. The stated tolerance applies to the unrounded answer; keep intermediate calculations unrounded.
Further reading
- G. Strang, Introduction to Linear Algebra, chapter 6, Eigenvalues and Eigenvectors.
- S. Axler, Linear Algebra Done Right, chapter 7, Operators on Inner Product Spaces.