Skip to main content

Section 24 Orthogonal and Orthonormal Bases in Rn

Subsection Application: Rotations in 3D

An aircraft in flight, like a plane or the space shuttle, can perform three independent rotations: roll, pitch, and yaw. Roll is a rotation about the axis through the nose and tail of the aircraft, pitch is rotation moving the nose of the aircraft up or down through the axis from wingtip to wingtip, and yaw is the rotation when the nose of the aircraft turns left or right about the axis though the plane from top to bottom. These rotations take place in 3-space and the axes of the rotations change as the aircraft travels through space. To understand how aircraft maneuver, it is important to know about general rotations in space. These are more complicated than rotations in 2-space, and, as we will see later in this section, involve orthogonal sets.

Subsection Introduction

If B={v1,v2,…,vm} is a basis for a subspace W of Rn, we know that any vector w in W can be written uniquely as a linear combination of the vectors in B. In the past, the way we have found the coordinates of x with respect to B, i.e. the weights needed to write a vector x as a linear combination of the elements in B, has been to row reduce the matrix [v1 v2 β‹― vm | x] to solve the corresponding system. This can be a cumbersome process, especially if we need to do it many times. This process also forces us to determine all of the weights at once. For certain types of bases, namely the orthogonal and orthonormal bases, there is a much easier way to find individual weights for this linear combination.

Recall that two nonzero vectors u and v in Rn are orthogonal if uβ‹…v=0. We can extend this idea to an entire set. For example, the standard basis S={e1,e2,e3} for R3 has the property that any two distinct vectors in S are orthogonal to each other. The basis vectors in S make a very nice coordinate system for R3, where the basis vectors provide the directions for the coordinate axes. We could rotate this standard basis, or multiply any of the vectors in the basis by a nonzero constant, and retain a basis in which all distinct vectors are orthogonal to each other (e.g., {[2 0 0]T,[0 3 0]T,[0 0 1]T}). We define this idea of having all vectors be orthogonal to each other for sets, and then for bases.

Definition 24.1.

A non-empty subset S of Rn is orthogonal if uβ‹…v=0 for every pair of distinct vectors u and v in S.

Preview Activity 24.1.

(a)

Determine if the set S={[1 2 1]T,[2 βˆ’1 0]T} is an orthogonal set.

(b)

Orthogonal bases are especially important.

Definition 24.2.

An orthogonal basis B for a subspace W of Rn is a basis of W that is also an orthogonal set.

Let B={v1,v2,v3}, where v1=[1 2 1]T, v2=[2 βˆ’1 0]T, and v3=[1 2 βˆ’5]T.

(i)

Explain why B is an orthogonal basis for R3.

(ii)

Suppose x has coordinates x1,x2,x3 with respect to the basis B, i.e.

x=x1v1+x2v2+x3v3.

Substitute this expression for x in xβ‹…v1 and use the orthogonality property of the basis B to show that x1=xβ‹…v1v1β‹…v1. Then determine x2 and x3 similarly. Finally, calculate the values of x1, x2, and x3 if x=[1 1 1]T.

(iii)

Find components of x=[1 1 1]T by reducing the augmented matrix [v1 v2 v3 | x]. Does this result agree with your work from the previous part?

Subsection Orthogonal Sets

We defined orthogonal sets in Rn and bases of subspaces of Rn in Definitions 24.1 and Definition 24.2. We saw that the standard basis in R3 is an orthogonal set and an orthogonal basis of R3 β€” there are many other examples as well.

Activity 24.2.

Let w1=[βˆ’21βˆ’1], w2=[011], and w3=[11βˆ’1]. In the same manner as in Preview Activity 24.1, we can show that the set S1={w1,w2,w3} is an orthogonal subset of R3.

(a)

Is the set S2={[βˆ’21βˆ’1],[011],[11βˆ’1],[120]} an orthogonal subset of R3?

(b)

Suppose a vector v is a vector so that S1βˆͺ{v} is an orthogonal subset of R3. Then wiβ‹…v=0 for each i. Explain why this implies that v is in Nul A, where A=[βˆ’21βˆ’101111βˆ’1].

(c)

Assuming that the reduced row echelon form of the matrix A is I3, explain why it is not possible to find a nonzero vector v so that S1βˆͺ{v} is an orthogonal subset of R3.

The example from Activity 24.2 suggests that we can have three orthogonal nonzero vectors in R3, but no more. Orthogonal vectors are, in a sense, as far apart as they can be. So we might expect that there is no linear relationship between orthogonal vectors. The following theorem makes this clear.

Proof.

Let S={v1,v2,…,vm} be a set of nonzero orthogonal vectors in Rn. To show that v1, v2, …, vm are linearly independent, assume that

(24.1)x1v1+x2v2+β‹―+xmvm=0

for some scalars x1, x2, …, xm. We will show that xi=0 for each i from 1 to m. Since the vectors in S are orthogonal to each other, we know that viβ‹…vj=0 whenever iβ‰ j. Fix an index k between 1 and m. We evaluate the dot product of both sides of (24.1) with vk and simplify using the dot product properties:

vkβ‹…(x1v1+x2v2+β‹―+xmvm)=vkβ‹…0(vkβ‹…x1v1)+(vkβ‹…x2v2)+β‹―+(vkβ‹…xmvm)=0(24.2)x1(vkβ‹…v1)+x2(vkβ‹…v2)+β‹―+xm(vkβ‹…vm)=0.

Now all of the dot products on the left are 0 except for vkβ‹…vk, so (24.2) becomes

xk(vkβ‹…vk)=0.

We assumed that vk≠0 and since vk⋅vk=||vk||2≠0, we conclude that xk=0. We chose k arbitrarily, so we have shown that xk=0 for each k between 1 and m. Therefore, the only solution to equation (24.1) is the trivial solution with x1=x2=⋯=xm=0 and the set S is linearly independent.

Subsection Properties of Orthogonal Bases

Orthogonality is a useful and important property for a basis to have. In Preview Activity 24.1 we saw that if a vector x in the span of an orthogonal basis {v1,v2,v3} could be written as a linear combination of the basis vectors as x=x1v1+x2v2+x3v3, then x1=xβ‹…v1v1β‹…v1. If we continued that same argument we could show that

x=(xβ‹…v1v1β‹…v1)v1+(xβ‹…v2v2β‹…v2)v2+(xβ‹…v3v3β‹…v3)v3.

We can apply this idea in general to see how the orthogonality of an orthogonal basis allows us to quickly and easily determine the weights to write a given vector as a linear combination of orthogonal basis vectors. To see why, let B={v1,v2,…,vm} be an orthogonal basis for a subspace W of Rn and let x be any vector in W. We know that

x=x1v1+x2v2+β‹―+xmvm

for some scalars x1, x2, …, xm. Let 1≀k≀m. Then, using orthogonality of vectors v1,v2,…,vm, we have

vkβ‹…x=x1(vkβ‹…v1)+x2(vkβ‹…v2)+β‹―+xm(vkβ‹…vm)=xkvkβ‹…vk.

So

xk=xβ‹…vkvkβ‹…vk.

Thus, we can calculate each weight individually with two simple dot products. We summarize this discussion in the next theorem.

Activity 24.3.

Let v1=[1 0 1]T, v2=[0 1 0]T, and v3=[0 0 1]T. The set B={v1,v2,v3} is a basis for R3. Let x=[1 0 0]T. Calculate

xβ‹…v1v1β‹…v1v1+xβ‹…v2v2β‹…v2v2+xβ‹…v3v3β‹…v3v3.

Compare to x. Does this violate Theorem 24.4? Explain.

Subsection Orthonormal Bases

The decomposition (24.3) is even simpler if vkβ‹…vk=1 for each k, that is, if vk is a unit vector for each k. In this case, the denominators are all 1 and we don't even need to consider them. We have a familiar example of such a basis for Rn, namely the standard basis S={e1,e2,…,en}.

Recall that

vβ‹…v=||v||2,

so the condition vβ‹…v=1 implies that the vector v has norm 1. An orthogonal basis with this additional condition is a very nice basis and is given a special name.

Definition 24.5.

An orthonormal basis B={u1,u2,…,um} for a subspace W of Rn is an orthogonal basis such that ||uk||=1 for 1≀k≀m.

In other words, an orthonormal basis is an orthogonal basis in which every basis vector is a unit vector. A good question to ask here is how we can construct an orthonormal basis from an orthogonal basis.

Activity 24.4.

(a)

Let v1 and v2 be orthogonal vectors. Explain how we can obtain unit vectors u1 in the direction of v1 and u2 in the direction of v2.

(b)

Show that u1 and u2 from the previous part are orthogonal vectors.

(c)

Use the ideas from this problem to construct an orthonormal basis for R3 from the orthogonal basis S={[βˆ’21βˆ’1],[011],[11βˆ’1]}.

In general, we can construct an orthonormal basis {u1,u2,…,um} from an orthogonal basis B={v1,v2,…,vm} by normalizing each vector in B (that is, dividing each vector by its norm).

Subsection Orthogonal Matrices

We have seen in the diagonalization process that we diagonalize a matrix A with a matrix P whose columns are linearly independent eigenvectors of A. In general, calculating the inverse of the matrix whose columns are eigenvectors of A in the diagonalization process can be time consuming, but if the columns form an orthonormal set, then the calculation is very straightforward.

Activity 24.5.

Let u1=13[2 1 2]T, u2=13[βˆ’2 2 1]T, and u3=13[1 2 βˆ’2]T. It is not difficult to see that the set {u1,u2,u3} is an orthonormal basis for R3. Let

A=[u1 u2 u3]=13[2βˆ’2112221βˆ’2].
(a)

Use the definition of the matrix-matrix product to find the entries of the second row of the matrix product ATA. Why should you have expected the result?

Hint.

How are the rows of AT related to the columns of A?

(b)

With the result of part (a) in mind, what is the matrix product ATA? What does this tell us about the relationship between AT and Aβˆ’1? Use technology to calculate Aβˆ’1 and confirm your answer.

(c)

Suppose P is an nΓ—n matrix whose columns form an orthonormal basis for Rn. Explain why PTP=In.

The result of Activity 24.5 is that if the columns of a square matrix P form an orthonormal set, then Pβˆ’1=PT. This makes calculating Pβˆ’1 very easy. Note, however, that this only works if the columns of P form an orthonormal basis for Col P. You should also note that if P is an nΓ—n matrix satisfying PTP=In, then the columns of P must form an orthonormal set. Matrices like this appear quite often and are given a special name.

Activity 24.6.

As a special case, we apply the result of Activity 24.5 to a 2Γ—2 rotation matrix P=[cos⁑(ΞΈ)βˆ’sin⁑(ΞΈ)sin⁑(ΞΈ)cos⁑(ΞΈ)].

(a)

Show that the columns of P form an orthonormal set.

(b)

Use the fact that Pβˆ’1=PT to find Pβˆ’1. Explain how this shows that the inverse of a rotation matrix by an angle ΞΈ is just another rotation matrix but by the angle βˆ’ΞΈ.

Orthogonal matrices are useful because they satisfy some special properties. For example, if P is an orthogonal nΓ—n matrix and x,y∈Rn, then

(Px)β‹…(Py)=(Px)T(Py)=xTPTPy=xTy=xβ‹…y.

This property tells us that the matrix transformation T defined by T(x)=Px preserves dot products and, hence, orthogonality. In addition,

||Px||2=Pxβ‹…Px=xβ‹…x=||x||2,

so ||Px||=||x||. This means that T preserves length. Such a transformation is called an isometry and it is convenient to work with functions that don't expand or contract things. Moreover, if x and y are nonzero vectors, then

Pxβ‹…Py||Px|| ||Py||=xβ‹…y||x|| ||y||.

Thus T also preserves angles. Transformations defined by orthogonal matrices are very well behaved transformations. To summarize,

We have discussed orthogonal and orthonormal bases for subspaces of Rn in this section. There are reasonable questions that follow, such as

  • Can we always find an orthogonal (or orthonormal) basis for any subspace of Rn?

  • Given a vector v in W, can we find an orthogonal basis of W that contain v?

We will answer these questions in subsequent sections.

Subsection Examples

What follows are worked examples that use the concepts from this section.

Example 24.8.

Let S={v1,v2,v3}, where v1=[1 1 βˆ’4]T, v2=[2 2 1]T, and v3=[1 βˆ’1 0]T.

(a)

Show that S is an orthogonal set.

Solution.

Using the dot product formula, we see that v1β‹…v2=0, v1β‹…v3=0, and v2β‹…v3=0. Thus, the set S is an orthogonal set.

(b)

Create an orthonormal set Sβ€²={u1,u2,u3} from the vectors in S.

Solution.

To make an orthonormal set Sβ€²={u1,u2,u3} from S, we divide each vector in S by its magnitude. This gives us

u1=118[1 1 βˆ’4]T, u2=13[2 2 1]T,  and  u3=12[1 βˆ’1 0]T.
(c)

Just by calculating dot products, write the vector w=[2 1 βˆ’1]T as a linear combination of the vectors in Sβ€².

Solution.

Since Sβ€² is an orthonormal basis for R3, we know that

w=(wβ‹…u1)u1+(wβ‹…u2)u2+(wβ‹…u3)u3=718[1 1 βˆ’4]T+53[2 2 1]T+12[1 βˆ’1 0]T.

Example 24.9.

Let u1=13[1 1 1]T, u2=12[1 βˆ’1 0]T, and u3=16[1 1 βˆ’2]T. Let B={u1,u2,u3}.

(a)

Show that B is an orthonormal basis for R3.

Solution.

Using the dot product formula, we see that ui⋅uj=0 if i≠j and that ui⋅ui=1 for each i. Since orthogonal vectors are linearly independent, the set B is a linearly independent set with 3 vectors in a 3-dimensional space. It follows that B is an orthonormal basis for R3.

(b)

Let w=[1 2 1]T. Find [w]B.

Solution.

Since B is an orthonormal basis for R3, we know that

w=(wβ‹…u1)u1+(wβ‹…u2)u2+(wβ‹…u3)u3.

Therefore,

[w]B=[(wβ‹…u1) (wβ‹…u2) (wβ‹…u3)]T=[43 βˆ’12 16]T.
(c)

Calculate ||w|| and ||[w]B||. What do you notice?

Solution.

Using the definition of the norm of a vector we have

||w||=12+22+12=6||[w]|CB||=(43)2+(βˆ’12)2+(16)2=6.

So in this case we have ||w||=||[w]B||.

(d)

Show that the result of part (c) is true in general. That is, if S={v1,v2,…,vn} is an orthonormal basis for Rn, and if z=c1v1+c2v2+β‹―+cnvn, then

||z||=c12+c22+β‹―+cn2.
Solution.

Let S={v1,v2,…,vn} be an orthonormal basis for Rn, and suppose that z=c1v1+c2v2+β‹―+cnvn. Then

||z||=zβ‹…z(24.4)=(c1v1+c2v2+β‹―+cnvn)β‹…(c1v1+c2v2+β‹―+cnvn).

Since S is an orthonormal basis for Rn, it follows that vi⋅vj=0 if i≠j and v⋅vi=1. Expanding the dot product in (24.4), the only terms that won't be zero are the ones that involve vi⋅vi. This leaves us with

||z||=(c1v1+β‹―+cnvn)β‹…(c1v1+β‹―+cnvn)=c1c1(v1β‹…v1)+c2c2(v2β‹…v2)+β‹―+cncn(vnβ‹…vn)=c12+c22+β‹―+cn2.

Subsection Summary

  • A subset S of Rn is an orthogonal set if uβ‹…v=0 for every pair of distinct vector u and v in S.

  • Any orthogonal set of nonzero vectors is linearly independent.

  • A basis B for a subspace W of Rn is an orthogonal basis if B is also an orthogonal set.

  • An orthogonal basis B for a subspace W of Rn is an orthonormal basis if each vector in B has unit length.

  • If B={v1,v2,…,vm} is an orthogonal basis for a subspace W of Rn and x is any vector in W, then

    x=βˆ‘i=1mcivi

    where ci=xβ‹…viviβ‹…vi.

  • An nΓ—n matrix P is an orthogonal matrix if PTP=In. Orthogonal matrices are important, in part, because the matrix transformations they define are isometries.

Exercises Exercises

1.

Find an orthogonal basis for the subspace W={[x y z]:4xβˆ’3z=0} of R3.

2.

Let {v1,v2,…,vn} be an orthogonal basis for Rn and, for some k between 1 and n, let W=Span{v1,v2,…,vk}. Show that {vk+1,vk+2,…,vn} is a basis for WβŠ₯.

3.

Let W be a subspace of Rn for some n, and let {w1,w2,…,wk} be an orthogonal basis for W. Let x be a vector in Rn. and define w as

w=xβ‹…w1w1β‹…w1w1+xβ‹…w2w2β‹…w2w2+β‹―+xβ‹…wkwkβ‹…wkwk.
(a)

Explain why w is in W.

Hint.

Where are w1, w2, …, wk?

(b)

Let z=xβˆ’w. Show that z is in WβŠ₯.

Hint.

Take the dot product of z with wi.

(c)

Explain why x can be written as a sum of vectors, one in W and one in WβŠ₯.

Hint.

Use parts (a) and (b).

(d)

Suppose x=w+w1 and x=u+u1, where w and u are in W and w1 and u1 are in WβŠ₯. Show that w=u and w1=u1, so that the representation of x as a sum of a vector in W and a vector in WβŠ₯ is unique.

Hint.

Collect terms in W and in WβŠ₯.

4.

Use the result of problem Exercise 3 above and that W∩WβŠ₯={0} to show that dim⁑(W)+dim⁑(WβŠ₯)=n for a subspace W of Rn. (See Exercise 13 in Section 12 for the definition of the sum of subspaces.)

5.

Let P be an nΓ—n matrix. We showed that if P is an orthogonal matrix, then (Px)β‹…(Py)=xβ‹…y for any vectors x and y in Rn. Now we ask if the converse of this statement is true. That is, determine the validity of the following statement: if (Px)β‹…(Py)=xβ‹…y for any vectors x and y in Rn, then P is an orthogonal matrix? Verify your answer.

Hint.

Consider (Pei)β‹…(Pej) where et is the tth standard basis vector for Rn.

6.

In this exercise we examine reflection matrices. In the following exercise we will show that the reflection and rotation matrices are the only 2Γ—2 orthogonal matrices. We will determine how to represent the reflection across a line through the origin in R2 as a matrix transformation. The setup is as follows. Let L(ΞΈ) be the line through the origin in R2 that makes an angle ΞΈ with the positive x-axis as illustrated in Figure 24.10.

Figure 24.10. Reflecting across a line L(ΞΈ).
(a)

Find a unit vector u in the direction of the line L(ΞΈ).

(b)

Let v=[ab] be an arbitrary vector in R2 as represented in Figure 24.10. Determine the components of the vectors projuv and projβŠ₯uv. Reproduce Figure 24.10 and draw the vectors projuv and projβŠ₯uv in your figure.

(c)

The vector labeled w is the reflection of the vector v across the line L(ΞΈ). Write w in terms of v and projuv. Clearly explain your method.

(d)

Finally, show that the matrix A such that Av=w is given by

A=[cos⁑(2ΞΈ)sin⁑(2ΞΈ)sin⁑(2ΞΈ)βˆ’cos⁑(2ΞΈ)].

The matrix A is the reflection matrix across the line L(ΞΈ). (You will want to look up some appropriate trigonometric identities.)

7.

In this exercise we will show that the only orthogonal 2Γ—2 matrices are the rotation matrices [cos⁑(ΞΈ)βˆ’sin⁑(ΞΈ)sin⁑(ΞΈ)cos⁑(ΞΈ)] and the reflection matrices [cos⁑(ΞΈ)sin⁑(ΞΈ)sin⁑(ΞΈ)βˆ’cos⁑(ΞΈ)] (see Exercise 6). Throughout this exercise let a, b, c, and d be real numbers such that M=[abcd] is an orthogonal 2Γ—2 matrix. Let v1=[ac] and v2=[bd] be the columns of M.

(a)

Explain why the terminal point of v1 in standard position lies on the unit circle. Then explain why there is an angle θ such that a=cos⁑(θ) and c=sin⁑(θ). What angle, specifically, is θ? Draw a picture to illustrate.

Hint.

Think polar coordinates.

(b)

A similar argument to (b) shows that there is an angle α such that v2=[bd]=[cos⁑(α)sin⁑(α)]. Given that M is an orthogonal matrix, how must α be related to θ? Use this result to find the two possibilities for v2 as a vector in terms of cos⁑(θ) and sin⁑(θ). (You will likely want to look up some trigonometric identities for this part of the problem.)

Hint.

What properties do the columns of an orthogonal matrix have?

(c)

By considering the two possibilities from part (c), show that M is either a rotation matrix or a reflection matrix. Conclude that the only 2Γ—2 orthogonal matrices are the reflection and rotation matrices.

8.

Suppose A,B are orthogonal matrices of the same size.

(a)

Show that AB is also an orthogonal matrix.

(b)

Show that AT is also an orthogonal matrix.

(c)

Show that Aβˆ’1 is also an orthogonal matrix.

9.

Label each of the following statements as True or False. Provide justification for your response.

(a) True/False.

Any orthogonal subset of Rn is linearly independent.

(b) True/False.

Every single vector set is an orthogonal set.

(c) True/False.

If S is an orthogonal set in Rn with exactly n nonzero vectors, then S is a basis for Rn.

(d) True/False.

Every set of three linearly independent vectors in R3 is an orthogonal set.

(e) True/False.

If A and B are nΓ—n orthogonal matrices, then A+B must also be an orthogonal matrix.

(f) True/False.

If the set S={v1,v2,…,vn} is an orthogonal set in Rn, then so is the set {c1v1,c2v2,…,cnvn} for any scalars c1, c2, …, cn.

(g) True/False.

If B={v1,v2,…,vn} is an orthogonal basis of Rn, then so is {c1v1, c2v2, …, cnvn} for any nonzero scalars c1, c2, …, cn.

(h) True/False.

If A is an nΓ—n orthogonal matrix, the rows of A form an orthonormal basis of Rn.

(i) True/False.

If A is an orthogonal matrix, any matrix obtained by interchanging columns of A is also an orthogonal matrix.

Subsection Project: Understanding Rotations in 3-Space

Recall that a counterclockwise rotation of 2-space around the origin by an angle ΞΈ is accomplished by left multiplication by the matrix [cos⁑(ΞΈ)βˆ’sin⁑(ΞΈ)sin⁑(ΞΈ)cos⁑(ΞΈ)]. Notice that the columns of this rotation matrix are orthonormal, so this rotation matrix is an orthogonal matrix. As the next activity shows, rotation matrices in 3D are also orthogonal matrices.

Project Activity 24.7.

Let R be a rotation matrix in 3D. A rotation does not change lengths of vectors, nor does it change angles between vectors. Let e1=[1 0 0]T, e2=[0 1 0]T, and e3=[0 0 1]T be the standard unit vectors in R3.

(a)

Explain why the columns of R form an orthonormal set.

Hint.

How are Re1, Re2, and Re3 related to the columns of R?

(b)

Explain why R is an orthogonal matrix. What must be true about det(R)?

Hint.

What is RT and what is det(RTR)?

By Project Activity 24.7 we know that the determinant of any rotation matrix is either 1 or βˆ’1. Having a determinant of 1 preserves orientation, and we will identify these rotations as being counterclockwise, and we will identify the others with determinant of βˆ’1 as being clockwise. We will set the convention that a rotation is always measured counterclockwise (as we did in R2), and so every rotation matrix will have determinant 1.

Returning to the counterclockwise rotation of 2-space around the origin by an angle ΞΈ determined by left multiplication by the matrix [cos⁑(ΞΈ)βˆ’sin⁑(ΞΈ)sin⁑(ΞΈ)cos⁑(ΞΈ)], we can think of this rotation in 3-space as the rotation that keeps points in the xy plane in the xy plane, but rotates these points counterclockwise around the z axis. In other words, in the standard xyz coordinate system, with standard basis e1, e2, e3, our rotation matrix R has the property that Re3=e3. Now Re3 is the third column of R, so the third column of R is e3. Similarly, Re1 is the first column of R and Re2 is the second column of R. Since R is a counterclockwise rotation of the xy plane space around the origin by an angle ΞΈ it follows that this rotation is given by the matrix

(24.5)Re3(ΞΈ)=[cos⁑(ΞΈ)βˆ’sin⁑(ΞΈ)0sin⁑(ΞΈ)cos⁑(ΞΈ)0001].

In this notation in (24.5), the subscript gives the direction of the line fixed by the rotation and the angle provides the counterclockwise rotation in the plane perpendicular to this vector. This vector is called a normal vector for the rotation. Note also that the columns of Re3(ΞΈ) form an orthogonal set such that each column vector has norm 1.

This idea describes a general rotation matrix Rn(ΞΈ) in 3D by specifying a normal vector n and an angle ΞΈ. For example, with roll, a normal vector points from the tail of the aircraft to its tip. It is our goal to understand how we can determine an arbitrary rotation matrix of the form Rn(ΞΈ). We can accomplish this by using the rotation around the z axis and change of basis matrices to find rotation matrices around other axes. Let S={e1,e2,e3} be the standard basis for R3

Project Activity 24.8.

In this activity we see how to determine the rotation matrix around the x axis using the matrix Re3(ΞΈ) and a change of basis.

(a)

Define a new ordered basis B so that our axis of rotation is the third vector. So in this case the third vector in B will be e1. The other two vectors need to make B an orthonormal set. So we have plenty of choices. For example, we could set B={e2,e3,e1}. Find the change of basis matrix PS←B from B to S.

(b)

Use the change of basis matrix from part (a) to find the change of basis matrix PB←S from S to B.

(c)

To find our rotation matrix around the x axis, we can first change basis from S to B, then perform a rotation around the new z axis using (24.5), then changing basis back from B to S. In other words,

Re1(ΞΈ)=PS←BRe3(ΞΈ)PB←S.

Find the entries of this matrix Re1(ΞΈ).

IMPORTANT NOTE.

We could have considered using B1={e3,e2,e1} in Project Activity 24.8 instead of B={e2,e3,e1}. Then we would have

PS←B1=[001010100].

The difference between the two options is that, in the first we have det(PS←B1)=βˆ’1 while det(PS←B)=1 in the second. Using B1 will give clockwise rotations while B gives counterclockwise rotations (this is the difference between a left hand system and a right hand system). So it is important to ensure that our change of basis matrix is one with determinant 1.

We do one more example to illustrate the process before tackling the general case.

Project Activity 24.10.

In this activity we find the rotation around the axis given by the line x=y/2=z. This line is in the direction of the vector n=[1 2 1]T. So we start with making a unit vector in the direction of n as the third vector in an ordered basis B. The other two vectors need to make B an orthonormal set with det(PS←B)=1.

(a)

Find a unit vector w in the direction of n.

(b)

Show that [2 βˆ’1 0]T is orthogonal to the vector w from part (a). Then find a unit vector v that is in the same direction as [2 βˆ’1 0]T.

(c)

Let v be as in the previous part. Now the trick is to find a third unit vector u so that B={u,v,w} is an orthonormal set. This can be done with the cross product. If a=[a1 a2 a3]T and b=[b1 b2 b3]T, then the cross product aΓ—b of a and b is the vector

aΓ—b=(a2b3βˆ’a3b2)e1βˆ’(a1b3βˆ’a3b1)e2+(a1b2βˆ’a2b1)e3.

(You can check that {aΓ—b,a,b} is an orthogonal set that gives the correct determinant for the change of basis matrix.) Use the cross product to find a unit vector u so that B={u,v,w} is an orthonormal set.

(d)

Find the entries of the matrix Rw(ΞΈ).

In the next activity we summarize the general process to find a 3D rotation matrix Rn(ΞΈ) for any normal vector n. There is a GeoGebra applet at geogebra.org/m/n9gbjhfx that allows you to visualize rotation matrices in 3D.

Project Activity 24.11.

Let n=[n1 n2 n3]T be a normal vector (nonzero) for our rotation. We need to create an orthonormal basis B={u,v,w} where w is a unit vector in the direction of n so that the change of basis matrix PS←B has determinant 1.

(a)

Find, by inspection, a vector y that is orthogonal to n.

Hint.

You may need to consider some cases to ensure that v is not the zero vector.

(b)

Once we have a normal vector n and a vector y orthogonal to n, the vector z=yΓ—n gives us an orthogonal set {z,y,n}. We then normalize each vector to create our orthonormal basis B={u,v,w}. Use this process to find the matrix that produces a 45∘ counterclockwise rotation around the normal vector [1 0 βˆ’1]T.

It isn't clear why such matrices are called orthogonal since the columns are actually orthonormal, but that is the standard terminology in mathematics.