What Orthogonality Means
In ordinary Euclidean geometry, two nonzero vectors are perpendicular when the angle between them is a right angle. An inner product extends this idea to vector spaces where there may be no familiar picture of perpendicular directions. The test is numerical: compute the inner product and check whether it is zero. The chosen inner product matters, so the same pair of coordinate columns can be orthogonal under one inner product and not under another.
Throughout this tutorial the scalars are real. A real inner product space is a real vector space \(V\) equipped with a function \(\langle\cdot,\cdot\rangle:V\times V\to\mathbb{R}\) that is bilinear, symmetric, and positive definite. Bilinearity means it is linear in each argument; symmetry means \(\langle\mathbf{u},\mathbf{v}\rangle=\langle\mathbf{v},\mathbf{u}\rangle\); positive definiteness means \(\langle\mathbf{v},\mathbf{v}\rangle\ge 0\), with equality exactly when \(\mathbf{v}=\mathbf{0}\). The induced norm is \(\|\mathbf{v}\|=\sqrt{\langle\mathbf{v},\mathbf{v}\rangle}\).
Orthogonality is a relation between a pair of vectors in a specified inner product space. It does not mean that corresponding coordinates multiply to zero, nor does it always use the ordinary dot product. In \(\mathbb{R}^n\) with the standard inner product, \(\langle\mathbf{u},\mathbf{v}\rangle=\mathbf{u}^{\top}\mathbf{v}\), so the test is the familiar sum of coordinate products. Other inner products can change that calculation.
Orthogonality and Angles
For nonzero vectors in a real inner product space, the angle \(\theta\in[0,\pi]\) is defined by \(\cos\theta=\frac{\langle\mathbf{u},\mathbf{v}\rangle}{\|\mathbf{u}\|\|\mathbf{v}\|}\). The Cauchy–Schwarz inequality ensures that this quotient lies in \([-1,1]\), so it specifies an angle in the stated interval. The nonzero condition is essential: if either vector is zero, the denominator vanishes, and the angle is not defined by this formula.
Proof. Since both vectors are nonzero, positive definiteness gives \(\|\mathbf{u}\|>0\) and \(\|\mathbf{v}\|>0\), so their product is nonzero. If \(\mathbf{u}\perp\mathbf{v}\), then \(\langle\mathbf{u},\mathbf{v}\rangle=0\), and the angle formula gives \(\cos\theta=0\). The only \(\theta\in[0,\pi]\) with \(\cos\theta=0\) is \(\theta=\frac{\pi}{2}\). Conversely, if \(\theta=\frac{\pi}{2}\), then \(\cos\theta=0\). The angle formula gives \(\langle\mathbf{u},\mathbf{v}\rangle=0\), so the vectors are orthogonal. \(\square\)
This theorem makes the inner-product test a precise version of perpendicularity, but only for nonzero vectors does the right-angle interpretation apply. For example, the zero vector satisfies the orthogonality definition with every vector, while no angle involving the zero vector is defined here.
Worked Example: Orthogonality in the Standard Inner Product
In \(\mathbb{R}^2\) with the standard inner product, test \(\mathbf{u}=\begin{bmatrix}1\\2\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}2\\-1\end{bmatrix}\) for orthogonality, and interpret the result.
Compute the inner product by multiplying corresponding entries and adding:
Therefore \(\mathbf{u}\perp\mathbf{v}\). Both vectors are nonzero. Their squared norms are \(\|\mathbf{u}\|^2=1^2+2^2=5\) and \(\|\mathbf{v}\|^2=2^2+(-1)^2=5\), so the angle formula gives \(\cos\theta=0/(\sqrt{5}\sqrt{5})=0\), hence \(\theta=\frac{\pi}{2}\).
Check: Substitution into the definition gives \(\langle\mathbf{u},\mathbf{v}\rangle=0\), confirming orthogonality; the angle calculation independently confirms a right angle.
Using a Nonstandard Inner Product
A nonstandard inner product may weight or mix coordinates. A common construction on \(\mathbb{R}^n\) is \(\langle\mathbf{x},\mathbf{y}\rangle=\mathbf{x}^{\top}\mathbf{W}\mathbf{y}\), where \(\mathbf{W}\) is a symmetric positive-definite matrix. Symmetry of \(\mathbf{W}\) gives symmetry of the inner product, and positive definiteness means \(\mathbf{x}^{\top}\mathbf{W}\mathbf{x}>0\) for every nonzero \(\mathbf{x}\). Under this inner product, orthogonality must be tested using \(\mathbf{W}\); the ordinary dot product is not a substitute.
Worked Example: A Weighted Inner Product on \(\mathbb{R}^2\)
Use \(\langle\mathbf{x},\mathbf{y}\rangle=\mathbf{x}^{\top}\mathbf{W}\mathbf{y}\), where \(\mathbf{W}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\), to test \(\mathbf{u}=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}-1\\2\end{bmatrix}\).
This matrix does define an inner product. It is symmetric, and for \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\),
This is positive for every nonzero \(\mathbf{x}\), because \(x_1^2+x_2^2>0\) in that case. Now calculate the test value:
Thus \(\mathbf{u}\perp\mathbf{v}\) in this weighted inner product. The vectors are nonzero, so they make a right angle as measured by this inner product. As a comparison, their ordinary dot product is \(1(-1)+0(2)=-1\), not zero. The two tests differ because they use different inner products.
Check: Direct multiplication gives \(\mathbf{W}\mathbf{v}=\begin{bmatrix}2(-1)+1(2)\\1(-1)+2(2)\end{bmatrix}=\begin{bmatrix}0\\3\end{bmatrix}\); its inner product with \(\mathbf{u}\) is indeed zero.
The calculation has a useful interpretation: the matrix \(\mathbf{W}\) changes how coordinate directions contribute to inner products. A zero result in one inner product does not assert a zero result in every inner product. When a problem specifies a nonstandard inner product, use its formula from the first step and carry it through the angle calculation as well.
Worked Example: Orthogonality of Polynomials
On the real vector space of polynomials of degree at most one, define \(\langle p,q\rangle=\int_{-1}^{1}p(x)q(x)\,dx\). Test \(p(x)=1+x\) and \(q(x)=1-3x\).
This formula is an inner product on this space. It is bilinear and symmetric by the corresponding properties of multiplication and integration. For any polynomial \(r\), \(\langle r,r\rangle=\int_{-1}^{1}r(x)^2\,dx\ge0\). If \(r\) is nonzero, it is nonzero at some point of \([-1,1]\), or at an endpoint with nonzero values nearby inside the interval. By continuity, \(r(x)^2\) is positive on an interval of positive length, so its integral is strictly positive.
For the given pair, multiply first and then integrate:
So \(p\perp q\) in this polynomial inner product. Neither polynomial is zero. For a direct angle check, their squared norms are
Thus \(\|p\|\|q\|=\sqrt{\frac{8}{3}}\sqrt{8}=\frac{8}{\sqrt{3}}\), which is nonzero, and the angle formula gives \(\cos\theta=0/(\frac{8}{\sqrt{3}})=0\). Hence \(\theta=\frac{\pi}{2}\).
Check: The exact integral of the product is \(2-3\cdot\frac23=0\), so substitution into the defining orthogonality test confirms the result.
Consequences of Bilinearity and Symmetry
The zero test interacts simply with linear combinations. For example, if \(\mathbf{u}\perp\mathbf{v}\) and \(\mathbf{u}\perp\mathbf{w}\), then \(\mathbf{u}\) is also orthogonal to every linear combination of \(\mathbf{v}\) and \(\mathbf{w}\). This follows from bilinearity, not from a geometric assumption about the directions.
Proof. The hypotheses give \(\langle\mathbf{u},\mathbf{v}\rangle=0\) and \(\langle\mathbf{u},\mathbf{w}\rangle=0\). By symmetry, \(\langle\mathbf{v},\mathbf{u}\rangle=0\) and \(\langle\mathbf{w},\mathbf{u}\rangle=0\). Bilinearity in the first argument then gives \(\langle a\mathbf{v}+b\mathbf{w},\mathbf{u}\rangle=a\langle\mathbf{v},\mathbf{u}\rangle+b\langle\mathbf{w},\mathbf{u}\rangle=a(0)+b(0)=0\). Therefore \(a\mathbf{v}+b\mathbf{w}\perp\mathbf{u}\). \(\square\)
The same properties show that reversing the order of an orthogonal pair does not change the result, and that scaling either vector by any real scalar preserves orthogonality: \(\langle a\mathbf{u},\mathbf{v}\rangle=a\langle\mathbf{u},\mathbf{v}\rangle=0\). The scalar can be zero; in that case the scaled vector is the zero vector, which remains orthogonal by definition. These statements concern the inner product equation, so they remain valid even when an angle is not defined.
Common Pitfall: Using the Wrong Inner Product
A frequent error is to compute the standard dot product when the problem gives a different inner product. In the weighted example, the incorrect calculation would be \(\mathbf{u}^{\top}\mathbf{v}=(1)(-1)+(0)(2)=-1\), followed by the claim that \(\mathbf{u}\) and \(\mathbf{v}\) are not orthogonal. That conclusion uses the wrong test. With the specified matrix, the correct calculation is \(\mathbf{u}^{\top}\mathbf{W}\mathbf{v}=[1\;0]\begin{bmatrix}0\\3\end{bmatrix}=0\); the vectors are orthogonal in the weighted inner product.
Another important check is whether both vectors are nonzero before talking about their angle. A zero inner product always establishes orthogonality, including when one vector is zero. But the angle formula divides by both norms, and the norm of the zero vector is zero. Thus the orthogonality definition applies more broadly than the right-angle interpretation.
Check Your Understanding
For each question, state which inner product is being used and show the calculation that supports your conclusion.
- In the standard inner product on \(\mathbb{R}^2\), are \(\begin{bmatrix}3\\1\end{bmatrix}\) and \(\begin{bmatrix}1\\-3\end{bmatrix}\) orthogonal? If so, what is their angle?
- For \(\mathbf{W}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\), compute the weighted inner product of \(\begin{bmatrix}1\\1\end{bmatrix}\) and \(\begin{bmatrix}1\\-1\end{bmatrix}\). Are they orthogonal in this inner product?
- Using \(\langle p,q\rangle=\int_{-1}^{1}p(x)q(x)\,dx\), test \(p(x)=1\) and \(q(x)=x\) for orthogonality.
- Why does the statement “\(\mathbf{u}\perp\mathbf{v}\) if and only if their angle is \(\frac{\pi}{2}\)” require both vectors to be nonzero?
- If \(\mathbf{u}\perp\mathbf{v}\) and \(\mathbf{u}\perp\mathbf{w}\), explain using bilinearity why \(\mathbf{u}\perp(2\mathbf{v}-3\mathbf{w})\).