Finding the coordinates of a vector in a basis usually means row reducing an augmented matrix. But if the basis vectors are mutually perpendicular, like the standard basis, each coordinate comes from a single inner product. That is why orthogonal bases are the preferred bases throughout applied math, from signal processing to statistics.
Orthogonal sets
Definition
Orthogonal set
A set of vectors {u1,…,up} in Rn is an orthogonal set if every pair of distinct vectors in it is orthogonal: ui⋅uj=0 whenever i=j.
To check a set of p vectors, you check all (2p) pairs. For three vectors that is three inner products.
Worked example: Checking an orthogonal set
Is {u1,u2,u3} orthogonal, where u1=(1,1,1), u2=(1,−2,1) and u3=(1,0,−1)?
u1⋅u2=1−2+1=0,u1⋅u3=1+0−1=0,u2⋅u3=1+0−1=0.
All three pairs are orthogonal, so yes.
Orthogonal sets are independent
Orthogonality implies independence
If S={u1,…,up} is an orthogonal set of nonzero vectors, then S is linearly independent, so it is a basis for the subspace it spans.
Here is why. Suppose c1u1+⋯+cpup=0. Take the inner product of both sides with u1. Every term cjuj⋅u1 with j=1 vanishes, leaving
c1(u1⋅u1)=0.
Since u1=0, u1⋅u1>0, so c1=0. The same argument with u2,…,up shows every weight is 0.
So the set in the example above is a basis for R3: three independent vectors in a 3-dimensional space. An orthogonal basis for a subspace W is a basis of W that is also an orthogonal set.
Coordinates in an orthogonal basis
The same trick of "dot with uj" also computes coordinates. If y=c1u1+⋯+cpup, dotting with uj kills every term but one: y⋅uj=cj(uj⋅uj).
Weights in an orthogonal basis
If {u1,…,up} is an orthogonal basis for W and y is in W, then
y=c1u1+⋯+cpup,where cj=uj⋅ujy⋅uj.
No row reduction, and each weight is computed independently of the others.
Worked example: Coordinates without row reduction
Write y=(5,−1,2) as a combination of the orthogonal basis u1=(1,1,1), u2=(1,−2,1), u3=(1,0,−1).
So y=2u1+23u2+23u3. Check: 2(1,1,1)+23(1,−2,1)+23(1,0,−1)=(2+1.5+1.5,2−3+0,2+1.5−1.5)=(5,−1,2).
Common mistake
The denominator is uj⋅uj=∥uj∥2, not ∥uj∥. Forgetting the square is the most common slip. And the formula only works when the basis is orthogonal; for any other basis you must solve a system.
Orthonormal sets
Definition
Orthonormal set
An orthogonal set of unit vectors is orthonormal. An orthonormal basis of W is a basis that is an orthonormal set.
With an orthonormal basis every denominator is 1, so the weights are simply cj=y⋅uj. The standard basis {e1,…,en} is the most familiar example. To turn an orthogonal set of nonzero vectors into an orthonormal one, normalize each vector; scaling doesn't affect orthogonality.
Normalizing the basis from the examples gives the orthonormal basis
31(1,1,1),61(1,−2,1),21(1,0,−1).
Matrices with orthonormal columns
Let U=[u1⋯up]. The (i,j) entry of UTU is row i of UT times column j of U, which is ui⋅uj. So the columns are orthonormal exactly when those entries are 1 on the diagonal and 0 elsewhere.
Orthonormal columns
An m×n matrix U has orthonormal columns if and only if UTU=I. Such a matrix preserves lengths and inner products: for all x,y in Rn,
∥Ux∥=∥x∥and(Ux)⋅(Uy)=x⋅y.
The proof is one line: (Ux)⋅(Uy)=(Ux)T(Uy)=xTUTUy=xTy. Taking y=x gives the length statement. Since angles are computed from inner products and lengths, U preserves angles too, and in particular it sends orthogonal vectors to orthogonal vectors.
A square matrix with orthonormal columns is called an orthogonal matrix. For such a matrix, UTU=I means U−1=UT: the inverse costs nothing to compute. Rotations and reflections of Rn are orthogonal matrices. (The name is traditional; "orthonormal matrix" would be more accurate.)
Worked example: An orthogonal matrix
Let Q=51[34−43]. Show that Q is orthogonal, find Q−1, and check that ∥Qx∥=∥x∥ for x=(2,1).
The columns (53,54) and (−54,53) each have length 259+16=1, and their inner product is −2512+2512=0. So Q is orthogonal and
Q−1=QT=51[3−443].
Next, Qx=51(6−4,8+3)=(52,511), with length 254+121=5. And ∥x∥=4+1=5. They match: Q is a rotation.
Tip
A non-square matrix U with orthonormal columns still has UTU=I, but UUT=I. You will meet UUT in the next lesson: it is the matrix of an orthogonal projection.
Practice
Practice 1
Which set is orthogonal?
Practice 2
Find k so that {(1,k,2),(3,−1,k)} is an orthogonal set.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 3
The vectors u1=(2,1) and u2=(−1,2) form an orthogonal basis for R2. Find the weights (c1,c2) with (4,7)=c1u1+c2u2.
Enter a point like (2, -3)
Practice 4
The vectors u1=(1,2,2), u2=(2,1,−2) and u3=(2,−2,1) form an orthogonal basis for R3. Find the weights (c1,c2,c3) that express y=(2,1,7) in this basis.
Enter a point like (2, -3)
Practice 5
The vectors (1,1,1) and (1,−1,0) are orthogonal. Find a and b so that (a,b,1) is orthogonal to both, and enter the vector (a,b,1).
Enter a point like (2, -3)
Practice 6
U is a 5×3 matrix with orthonormal columns and x=(1,2,−2). Find ∥Ux∥.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 7
Q=[3/54/5−4/53/5] is an orthogonal matrix. Find the (1,2) entry of Q−1.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.