21. Orthonormal Bases

The canonical/standard

1 0 0       0 1 0 e1 = . , e2 = . , . . . , en = . . . . . . . 0 0 1 has many useful properties.

• Each of the vectors has unit length: q √ T ||ei|| = ei ei = ei ei = 1.

• The standard basis vectors are orthogonal (in other words, at right or ).

T ei ej = ei ej = 0 when i 6= j

This is summarized by ( 1 i = j eT e = δ = , i j ij 0 i 6= j where δij is the . Notice that the Kronecker delta gives the entries of the identity . Given column vectors v and w, we have seen that the dot v w is the same as the matrix vT w. This is the inner product on n T . We can also form the vw , which gives a matrix.

1 The outer product on the standard basis vectors is interesting.

T Π1 = e1e1 1   0   = . 1 0 ... 0 . . 0 1 0 ... 0   0 0 ... 0 = . . . . . . 0 0 ... 0 . . T Πn = enen 0   0   = . 0 0 ... 1 . . 1 0 0 ... 0   0 0 ... 0 = . . . . . . 0 0 ... 1

In short, Πi is the diagonal with a 1 in the ith diagonal and zeros everywhere else. 1 T T T Notice that ΠiΠj = eiei ejej = eiδijej . Then: ( Π i = j Π Π = i . i j 0 i 6= j

Moreover, for a D with diagonal entries λ1, . . . , λn, we can write D = λ1Π1 + ... + λnΠn. Other bases that share these properties should behave in many of the same ways as the standard basis. As such, we will study:

1This is reminiscent of an older notation, where vectors are written in juxtaposition. This is called a ‘dyadic ,’ and is still used in some applications.

2 • Orthogonal bases {v1, . . . , vn}:

vi vj = 0 if i 6= j

In other words, all vectors in the basis are perpendicular.

• Orthonormal bases {u1, . . . , un}:

ui uj = δij.

In to being orthogonal, each vector has unit length.

n Suppose T = {u1, . . . , un} is an for R . Since T is a basis, we can write any vector v uniquely as a of the vectors in T : 1 n v = c u1 + . . . c un. Since T is orthonormal, there is a very easy way to find the coefficients of this linear combination. By taking the of v with any of the vectors in T , we get:

1 i n v ui = c u1 ui + ... + c ui ui + ... + c un ui = c1 · 0 + ... + ci · 1 + ... + cn · 0 = ci, i ⇒ c = v ui

⇒ v = (v u1)u1 + ... + (v un)un X = (v ui)ui. i This proves the theorem:

Theorem. For an orthonormal basis {u1, . . . , un}, any vector v can be ex- pressed X v = (v ui)ui. i

Relating Orthonormal Bases

Suppose T = {u1, . . . , un} and R = {w1, . . . , wn} are two orthonormal bases n for R . Then:

3 w1 = (w1 u1)u1 + ... + (w1 un)un . .

wn = (wn u1)u1 + ... + (wn un)un X ⇒ wi = uj(uj wi) j

As such, the matrix for the from T to R is given by j P = (Pi ) = (uj wi). Consider the product PP T in this case.

T j X (PP )k = (uj wi)(wi uk) i X T T = (uj wi)(wi uk) i " # T X T = uj (wiwi ) uk i T = uj Inuk (∗) T = uj uk = δjk. In the equality (∗) is explained below. So assuming (∗) holds, we have shown T that PP = In, which implies that P T = P −1.

P T The equality in the line (∗) says that i wiwi = In. To see this, we P T j examine ( i wiwi )v for an arbitrary vector v. We can find constants c P j such that v = j c wj, so that:

X T X T X j ( wiwi )v = ( wiwi )( c wj) i i j X j X T = c wiwi wj j i X j X = c wiδij j i X j = c wj since all terms with i 6= j vanish j = v.

4 P T Then as a linear transformation, i wiwi = In fixes every vector, and thus must be the identity In.

Definition A matrix P is orthogonal if P −1 = P T .

Then to summarize,

Theorem. A change of basis matrix P relating two orthonormal bases is an . i.e. P −1 = P T .

3 Example Consider R with the orthonormal basis

  2     1   √ 0 √   6 3   √1   √1   √−1  S = u1 =   , u2 =   , u3 =   .  6   2   3   √−1 √1 √1   6 2 3 

Let R be the standard basis {e1, e2, e3}. Since we are changing from the standard basis to a new basis, then the columns of the change of basis matrix are exactly the images of the standard basis vectors. Then the change of basis matrix from R to S is given by:   e1 u1 e1 u2 e1 u3 j   P = (Pi ) = (ejui) = e2 u1 e2 u2 e2 u3 e3 u1 e3 u2 e3 u3  √2 0 √1    6 3  √1 √1 √−1  = u1 u2 u3 =   .  6 2 3  √−1 √1 √1 6 2 3

From our theorem, we observe that:

 T  u1 −1 T  T  P = P = u2  T u3  √2 √1 √−1  6 6 6  1 1  =  0 √ √  .  2 2  √1 √−1 √1 3 3 3

5 T We can check that P P = In by a lengthy computation, or more simply, notice that

uT  1   T  T  (P P )ij = u2  u1 u2 u3 T u3 1 0 0   = 0 1 0 . 0 0 1

We are using of the ui for the above.

Orthonormal Change of Basis and Diagonal Matrices. Suppose D is a diagonal matrix, and we use an orthogonal matrix P to change to a new basis. Then the matrix M of D in the new basis is:

M = PDP −1 = PDP T .

Now we calculate the of M.

M T = (PDP T )T = (P T )T DT P T = PDP T = M

So we see the matrix PDP T is symmetric!

References

• Hefferon, Chapter Three, Section V: Change of Basis

Wikipedia:

• Orthogonal Matrix

• Similar Matrix

6 Review Questions ! λ 0 1. Let D = 1 . 0 λ2

i. Write D in terms of the vectors e1 and e2, and their transposes. ! a b ii. Suppose P = is invertible. Show that D is similar to c d

! 1 λ1ad − λ2bc (λ1 − λ2)bd M = . ad − bc (λ1 − λ2)ac −λ1bc + λ2ad

    iii. Suppose the vectors a b and c d are orthogonal. What can you say about M in this case?

2. Suppose S = {v1, . . . , vn} is an orthogonal (not orthonormal) basis for n P i R . Then we can write any vector v as v = i c vi for some constants ci. Find a formula for the constants ci in terms of v and the vectors in S.

3 3. Let u, v be independent vectors in R , and P = span{u, v} be the spanned by u and v.

⊥ u·v i. Is the vector v = v − u·u u in the plane P ? ii. What is the between v⊥ and u? iii. Given your solution to the above, how can you find a third vector perpendicular to both u and v⊥? 3 iv. Construct an orthonormal basis for R from u and v. v. Test your abstract formulae starting with     u = 1 2 0 and v = 0 1 1 .

7