Orthogonality Depends on the Inner Product
Orthogonality is not limited to arrows in \(\mathbb{R}^n\). It can also describe relationships between polynomials or matrices, provided the space has an inner product. The calculation always has the same basic shape: take the inner product of each pair of distinct elements and check whether the result is zero. What changes from space to space is how that inner product is defined.
For vectors in \(\mathbb{R}^n\), the standard dot product is \(\mathbf{u}\cdot\mathbf{v}=\mathbf{u}^{\top}\mathbf{v}=\sum_{k=1}^{n}u_kv_k\). For real polynomials, we will use an integral of the product. For real matrices, we will use a trace of a product involving a transpose. In each setting, a list is orthogonal when every pair of distinct entries has inner product zero, and it is orthonormal when it is orthogonal and every entry has norm \(1\). The norm induced by an inner product is \(\|\mathbf{u}\|=\sqrt{\langle\mathbf{u},\mathbf{u}\rangle}\), with the same definition applying when the objects are polynomials or matrices.
These conditions refer to a list: repeated entries are still separate positions, and each pair of distinct positions must be tested. An orthogonal list may contain the zero vector or a zero polynomial or matrix; an orthonormal list cannot, since every entry must have norm \(1\). Normalization means dividing a nonzero object by its norm. It changes its length to \(1\), but it does not, by itself, make two nonorthogonal objects orthogonal.
Examples with the Standard Dot Product
Worked Example: An Orthonormal List in \(\mathbb{R}^3\)
Consider the columns \(\mathbf{u}=(1,1,0)^{\top}\), \(\mathbf{v}=(1,-1,0)^{\top}\), and \(\mathbf{w}=(0,0,2)^{\top}\). First test the three pairs:
Thus the list is orthogonal. Its norms are found by taking the square roots of the self-dot-products:
Divide each vector by its norm. The resulting list is
Check: The first two normalized vectors have dot product \(1/2-1/2+0=0\). Each has squared norm \(1/2+1/2=1\), and the third has squared norm \(1\). Its dot product with either of the first two is zero because its first two entries are zero. The normalized list is therefore orthonormal.
The computations in this example rely on the standard dot product. Changing the inner product can change which objects are orthogonal, so a test must use the inner product specified for the space rather than an assumed formula.
An Integral Inner Product on Polynomials
This formula gives an inner product on each \(\mathcal{P}_n(\mathbb{R})\). Its symmetry follows from \(p(x)q(x)=q(x)p(x)\), and its linearity follows from the linearity of integration. For positive definiteness, the integral of \(p(x)^2\) is nonnegative, and it is positive for every nonzero polynomial: such a polynomial is nonzero at some point of \((-1,1)\), and continuity makes its square positive on an interval around that point. The fact used here—that a nonzero polynomial cannot vanish throughout an interval—follows, for example, from the factor theorem, which implies that a degree-\(d\) polynomial has at most \(d\) distinct roots.
Worked Example: Orthogonal Polynomials on \([-1,1]\)
In \(\mathcal{P}_2(\mathbb{R})\), consider \(p_1(x)=1\), \(p_2(x)=x\), and \(p_3(x)=3x^2-1\). Test each pair with the integral inner product. For the first pair, \(\int_{-1}^{1}x\,dx=0\), since \(x\) is odd. For the second pair,
For the remaining pair, the integrand \(x(3x^2-1)=3x^3-x\) is odd, so its integral over \([-1,1]\) is zero. All three pairwise inner products vanish; the list is orthogonal.
Now compute the norms. For \(p_1\),
For \(p_2\), and then \(p_3\), the calculations are
The norms are \(\sqrt{2}\), \(\sqrt{2/3}\), and \(\sqrt{8/5}\). Dividing each polynomial by its norm gives the orthonormal list
Check: The squared norm of each scaled polynomial is its original squared norm multiplied by the square of the scaling factor: \(2(1/2)=1\), \((2/3)(3/2)=1\), and \((8/5)(5/8)=1\). Scaling does not change the zero pairwise inner products, so the list is orthonormal.
A Trace Inner Product on Matrices
Here \(\operatorname{tr}\) denotes the sum of the diagonal entries of a square matrix. The product \(\mathbf{A}^{\top}\mathbf{B}\) is \(n\times n\), so its trace is defined even when \(\mathbf{A}\) and \(\mathbf{B}\) are not square. Expanding the diagonal entries gives a useful equivalent formula:
This is the sum of the products of corresponding entries. In particular, \(\|\mathbf{A}\|^2=\sum_{i=1}^{m}\sum_{j=1}^{n}a_{ij}^2\). The trace formula is symmetric and bilinear over \(\mathbb{R}\), and this sum-of-squares expression is positive unless every entry of \(\mathbf{A}\) is zero. Thus it gives an inner product.
Worked Example: Four Orthogonal Matrices
In the real \(2\times2\) matrices, take
Using the entrywise formula, the six pairwise inner products are
Each matrix has two entries whose squares are \(1\), and two entries equal to zero. Hence \(\|\mathbf{A}_i\|^2=2\) and \(\|\mathbf{A}_i\|=\sqrt{2}\) for each \(i\). The normalized matrices \(\mathbf{A}_i/\sqrt{2}\), for \(i=1,2,3,4\), form an orthonormal list.
Check: For example, \(\langle\mathbf{A}_3,\mathbf{A}_4\rangle\) is the sum of corresponding-entry products \(0(0)+1(1)+1(-1)+0(0)=0\), while \(\|\mathbf{A}_3/\sqrt{2}\|^2=(1+1)/2=1\). The other pairwise products and squared norms were computed above by the same entrywise formula.
Why Normalization Preserves Orthogonality
Proof. Each denominator is positive because each \(\mathbf{v}_i\) is nonzero and the inner product is positive definite. For distinct indices \(i\) and \(j\), bilinearity gives
because the original list is orthogonal. For each index \(i\),
Thus the normalized list is orthogonal and each of its vectors has norm \(1\), which is exactly the definition of orthonormal. \(\square\)
The theorem requires that every vector be nonzero: division by the norm of the zero vector is undefined. It also shows why normalization is the final step when a list is already orthogonal, not a method for removing nonzero inner products.
Common Mistake: Using the Wrong Matrix Product
A frequent error is to test matrix orthogonality with \(\operatorname{tr}(\mathbf{A}\mathbf{B})\) instead of \(\operatorname{tr}(\mathbf{A}^{\top}\mathbf{B})\). These expressions are not interchangeable. For instance, let \(\mathbf{A}=\begin{bmatrix}0&1\\0&0\end{bmatrix}\). Then \(\mathbf{A}^2=\mathbf{O}\), so the incorrect expression gives \(\operatorname{tr}(\mathbf{A}\mathbf{A})=0\). That would falsely suggest that \(\mathbf{A}\) is orthogonal to itself.
The correct self-inner-product is
Consequently \(\|\mathbf{A}\|=1\), not \(0\). Always use the inner product defined for the space, including its transpose, integration interval, or other specified details.
Check Your Understanding
For each question, use the stated inner product and show enough calculation to verify the result.
- Are \((1,2,0)^{\top}\) and \((2,-1,0)^{\top}\) orthogonal in \(\mathbb{R}^3\)? If so, give their normalized vectors.
- With \(\langle p,q\rangle=\int_{-1}^{1}p(x)q(x)\,dx\), compute \(\langle 1,x^2\rangle\) and \(\|x\|^2\).
- Using the trace inner product, find \(\left\langle\begin{bmatrix}1&2\\0&1\end{bmatrix},\begin{bmatrix}2&-1\\1&0\end{bmatrix}\right\rangle\).
- Explain why an orthogonal list containing a zero vector cannot be normalized entry by entry.
- For the matrices in the third worked example, verify directly that \(\|\mathbf{A}_2/\sqrt{2}\|=1\).