Contents  |  ‹ Previous  |  Next ›  |  Download EPUB  |  PDF

Appendix D
n

D.1 Vectors in n

Learning Outcomes

A.
Find the position vector of a point in n.

The notation n refers to the collection of ordered lists of n real numbers, that is

n = { (x 1xn) : xj  for j = 1,,n}

In this chapter, we take a closer look at vectors in n. First, we will consider what n looks like in more detail. Recall that the point given by 0 = (0,,0) is called the origin.

Now, consider the case of n for n = 1. Then from the definition we can identify with points in 1 as follows:

= 1 = { (x 1) : x1 }

Hence, is defined as the set of all real numbers and geometrically, we can describe this as all the points on a line.

Now suppose n = 2. Then, from the definition,

2 = { (x 1,x2) : xj  for j = 1,2}

Consider the familiar coordinate plane, with an x axis and a y axis. Any point within this coordinate plane is identified by where it is located along the x axis, and also where it is located along the y axis. Consider as an example the following diagram.

Two-dimensional plot of the xy-plane showing two points P = (2,1) and Q = (-3,4) marked as red dots, with light helper lines dropped to the axes to indicate each point's coordinates.

Figure D.1: Two-dimensional plot of the xy-plane showing two points P = (2,1) and Q = (-3,4) marked as red...

Hence, every element in 2 is identified by two components, x and y, in the usual manner. The coordinates x,y (or x1, x2) uniquely determine a point in the plan. Note that while the definition uses x1 and x2 to label the coordinates and you may be used to x and y, these notations are equivalent.

Now suppose n = 3. You may have previously encountered the 3-dimensional coordinate system, given by

3 = { (x 1,x2,x3) : xj  for j = 1,2,3}

Points in 3 will be determined by three coordinates, often written (x,y,z) which correspond to the x, y, and z axes. We can think as above that the first two coordinates determine a point in a plane. The third component determines the height above or below the plane, depending on whether this number is positive or negative, and all together this determines a point in space. You see that the ordered triples correspond to points in space just as the ordered pairs correspond to points in a plane and single real numbers correspond to points on a line.

The idea behind the more general n is that we can extend these ideas beyond n = 3. This discussion regarding points in n leads into a study of vectors in n. While we consider n for all n, we will largely focus on n = 2,3 in this section.

Consider the following definition.

Definition D.1: The Position Vector

Let P = (p1,,pn) be the coordinates of a point in n. Then the vector 0P with its tail at 0 = (0,,0) and its tip at P is called the position vector of the point P. We write

0P = [ p1 p n ]

For this reason we may write both P = (p1,,pn) n and 0P = [p1pn] T n.

This definition is illustrated in the following picture for the special case of 3.

Three-dimensional diagram of the position vector 0P: a thick blue arrow from the origin along the x-, y-, z-axes to a red point P=(p_1,p_2,p_3), labelled with the column-vector form [p_1,p_2,p_3]^T.

Figure D.2: Three-dimensional diagram of the position vector 0P: a thick blue arrow from the origin along the...

Thus every point P in n determines its position vector 0P. Conversely, every such position vector 0P which has its tail at 0 and point at P determines the point P of n.

Now suppose we are given two points, P,Q whose coordinates are (p1,,pn) and (q1,,qn) respectively. We can also determine the position vector from P to Q (also called the vector from P to Q) defined as follows.

PQ = [ q1 p1 q n pn ] = 0Q0P

Now, imagine taking a vector in n and moving it around, always keeping it pointing in the same direction as shown in the following picture.

Three-dimensional diagram with two parallel blue arrows of equal length and direction: the position vector 0P from the origin and a translated copy AB from point A to point B, illustrating that translating a vector preserves its identity.

Figure D.3: Three-dimensional diagram with two parallel blue arrows of equal length and direction: the position...

After moving it around, it is regarded as the same vector. Each vector, 0P and AB has the same length (or magnitude) and direction. Therefore, they are equal.

Consider now the general definition for a vector in n.

Definition D.2: Vectors in n

Let n = { (x1,,xn) : xj  for j = 1,,n}. Then,

x = [ x1 x n ]

is called a vector. Vectors have both size (magnitude) and direction. The numbers xj are called the components of x.

Using this notation, we may use p to denote the position vector of point P. Notice that in this context, p = 0P. These notations may be used interchangeably.

You can think of the components of a vector as directions for obtaining the vector. Consider n = 3. Draw a vector with its tail at the point (0,0,0) and its tip at the point (a,b,c). This vector it is obtained by starting at (0,0,0), moving parallel to the x axis to (a,0,0) and then from here, moving parallel to the y axis to (a,b,0) and finally parallel to the z axis to (a,b,c). Observe that the same vector would result if you began at the point (d,e,f ), moved parallel to the x axis to (d + a,e,f ), then parallel to the y axis to (d + a,e + b,f ), and finally parallel to the z axis to (d + a,e + b,f + c). Here, the vector would have its tail sitting at the point determined by A = (d,e,f ) and its point at B = (d + a,e + b,f + c). It is the same vector because it will point in the same direction and have the same length. It is like you took an actual arrow, and moved it from one location to another keeping it pointing the same direction.

We conclude this section with a brief discussion regarding notation. In previous sections, we have written vectors as columns, or n × 1 matrices. For convenience in this chapter we may write vectors as the transpose of row vectors, or 1 × n matrices. These are of course equivalent and we may move between both notations. Therefore, recognize that

[ 2 3 ] = [ 2 3 ]T

Notice that two vectors u = [u1un] T and v = [v1vn] T are equal if and only if all corresponding components are equal. Precisely,

u = vif and only if uj = vjfor allj = 1,,n

Thus [ 1 2 4 ]T 3 and [ 2 1 4 ]T 3 but [ 1 2 4 ]T [ 2 1 4 ]T because, even though the same numbers are involved, the order of the numbers is different.

For the specific case of 3, there are three special vectors which we often use. They are given by

i = [ 1 0 0 ]T
j = [ 0 1 0 ]T
k = [ 0 0 1 ]T

We can write any vector u = [ u1 u2 u3 ] T as a linear combination of these vectors, written as u = u1i + u2j + u3k. This notation will be used throughout this chapter.

D.2 Algebra in n

Learning Outcomes

A.
Understand vector addition and scalar multiplication, algebraically.
B.
Introduce the notion of linear combination of vectors.

Addition and scalar multiplication are two important algebraic operations done with vectors. Notice that these operations apply to vectors in n, for any value of n. We will explore these operations in more detail in the following sections.

D.2.1 Addition of Vectors in n

Addition of vectors in n is defined as follows.

Definition D.3: Addition of Vectors in n

If u = [ u1 u n ] ,v = [ v1 v n ] n then u + v n and is defined by

u + v = [ u1 u n ] + [ v1 v n ] = [ u1 + v1 u n + vn ]

To add vectors, we simply add corresponding components. Therefore, in order to add vectors, they must be the same size.

Addition of vectors satisfies some important properties which are outlined in the following theorem.

Theorem D.4: Properties of Vector Addition

The following properties hold for vectors u,v,w n.

The additive identity shown in equation D.1 is also called the zero vector, the n × 1 vector in which all components are equal to 0. Further, u is simply the vector with all components having same value as those of u but opposite sign; this is just (1)u. This will be made more explicit in the next section when we explore scalar multiplication of vectors. Note that subtraction is defined as u v = u + (v) .

D.2.2 Scalar Multiplication of Vectors in n

Scalar multiplication of vectors in n is defined as follows.

Definition D.5: Scalar Multiplication of Vectors in n

If u n and k is a scalar, then ku n is defined by

ku = k [ u1 u n ] = [ ku1 ku n ]

Just as with addition, scalar multiplication of vectors satisfies several important properties. These are outlined in the following theorem.

Theorem D.6: Properties of Scalar Multiplication

The following properties hold for vectors u,v n and k,p scalars.

We now present a useful notion you may have seen earlier combining vector addition and scalar multiplication

Definition D.7: Linear Combination

A vector v is said to be a linear combination of the vectors u1,,un if there exist scalars, a1,,an such that

v = a1u1 + + anun

For example,

3 [ 4 1 0 ]+2 [ 3 0 1 ] = [ 18 3 2 ].

Thus we can say that

v = [ 18 3 2 ]

is a linear combination of the vectors

u1 = [ 4 1 0 ] and u2 = [ 3 0 1 ]

D.3 Geometric Meaning of Vector Addition

Learning Outcomes

A.
Understand vector addition, geometrically.

Recall that an element of n is an ordered list of numbers. For the specific case of n = 2,3 this can be used to determine a point in two or three dimensional space. This point is specified relative to some coordinate axes.

Consider the case n = 3. Recall that taking a vector and moving it around without changing its length or direction does not change the vector. This is important in the geometric representation of vector addition.

Suppose we have two vectors, u and v in 3. Each of these can be drawn geometrically by placing the tail of each vector at 0 and its point at (u1,u2,u3) and (v1,v2,v3) respectively. Suppose we slide the vector v so that its tail sits at the point of u. We know that this does not change the vector v. Now, draw a new vector from the tail of u to the point of v. This vector is u + v.

The geometric significance of vector addition in n for any n is given in the following definition.

Definition D.8: Geometry of Vector Addition

Let u and v be two vectors. Slide v so that the tail of v is on the point of u. Then draw the arrow which goes from the tail of u to the point of v. This arrow represents the vector u + v.

Two-dimensional vector diagram illustrating the tip-to-tail rule for vector addition: arrow u along the x-axis, arrow v starting at the tip of u and going to the upper right, and a third arrow from the tail of u to the tip of v labelled u+v.

Figure D.4: Two-dimensional vector diagram illustrating the tip-to-tail rule for vector addition: arrow u along...

This definition is illustrated in the following picture in which u + v is shown for the special case n = 3.

PICT

Figure D.5: Vector addition in three dimensions: u + v as the diagonal of the parallelepiped.
Notice the parallelogram created by u and v in the above diagram. Then u + v is the directed diagonal of the parallelogram determined by the two vectors u and v.

When you have a vector v, its additive inverse v will be the vector which has the same magnitude as v but the opposite direction. When one writes u v, the meaning is u + (v) as with real numbers. The following example illustrates these definitions and conventions.

Example D.9: Graphing Vector Addition

Consider the following picture of vectors u and v.

Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as separate arrows, presented as the setup for graphing the linear combinations u+2v and u-1/2 v.

Figure D.6: Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as...

Sketch a picture of u + v,u v.

Solution

We will first sketch u + v. Begin by drawing u and then at the point of u, place the tail of v as shown. Then u + v is the vector which results from drawing a vector from the tail of u to the tip of v.

Two-dimensional vector diagram of u+v drawn tip-to-tail: blue u from the origin to the upper right, red v continuing from the tip of u, and the purple resultant u+v drawn from the tail of u to the tip of v.

Figure D.7: Two-dimensional vector diagram of u+v drawn tip-to-tail: blue u from the origin to the upper right...

Next consider u v. This means u + (v). From the above geometric description of vector addition, v is the vector which has the same length but which points in the opposite direction to v. Here is a picture.

Two-dimensional vector diagram of u-v: blue u from the origin, red -v starting at the tip of u and pointing in the reverse direction of v, and a purple arrow from the origin to the tip of -v representing u-v=u+(-v).

Figure D.8: Two-dimensional vector diagram of u-v: blue u from the origin, red -v starting at the tip of u and...

D.4 Length of a Vector

Learning Outcomes

A.
Find the length of a vector and the distance between two points in n.
B.
Find the corresponding unit vector to a vector in n.

In this section, we explore what is meant by the length of a vector in n. We develop this concept by first looking at the distance between two points in n.

First, we will consider the concept of distance for , that is, for points in 1. Here, the distance between two points P and Q is given by the absolute value of their difference. We denote the distance between P and Q by d(P,Q) which is defined as

d(P,Q) = (P Q ) 2 (D.2)

Consider now the case for n = 2, demonstrated by the following picture.

PICT

Figure D.9: The distance between two points in the plane.
There are two points P = (p1,p2) and Q = (q1,q2) in the plane. The distance between these points is shown in the picture as a solid line. Notice that this line is the hypotenuse of a right triangle which is half of the rectangle shown in dotted lines. We want to find the length of this hypotenuse which will give the distance between the two points. Note the lengths of the sides of this triangle are |p1 q1| and |p2 q2|, the absolute value of the difference in these values. Therefore, the Pythagorean Theorem implies the length of the hypotenuse (and thus the distance between P and Q) equals
( |p1q1| 2 + |p 2q2| 2)12 = ( (p 1 q1) 2 + (p 2 q2) 2) 12 (D.3)

Now suppose n = 3 and let P = (p1,p2,p3) and Q = (q1,q2,q3) be two points in 3. Consider the following picture in which the solid line joins the two points and a dotted line joins the points (q1,q2,q3) and (p1,p2,q3) .

PICT

Figure D.10: The distance between two points in three dimensions.
Here, we need to use Pythagorean Theorem twice in order to find the length of the solid line. First, by the Pythagorean Theorem, the length of the dotted line joining (q1,q2,q3) and (p1,p2,q3) equals
( (p1 q1) 2 + (p 2 q2) 2) 12

while the length of the line joining (p1,p2,q3) to (p1,p2,p3) is just |p3 q3| . Therefore, by the Pythagorean Theorem again, the length of the line joining the points P = (p1,p2,p3) and Q = (q1,q2,q3) equals

( ( ( (p1 q1) 2 + (p 2 q2) 2) 12) 2 + (p 3 q3) 2) 12
= ( (p1 q1) 2 + (p 2 q2) 2 + (p 3 q3) 2) 12 (D.4)

This discussion motivates the following definition for the distance between points in n.

Definition D.10: Distance Between Points

Let P = (p1,,pn) and Q = (q1,,qn) be two points in n. Then the distance between these points is defined as

 distance between P and Q  = d(P,Q) = ( k=1n |p k qk| 2) 12

This is called the distance formula. We may also write |P Q| as the distance between P and Q.

From the above discussion, you can see that Definition D.10 holds for the special cases n = 1,2,3, as in Equations D.2, D.3, D.4. In the following example, we use Definition D.10 to find the distance between two points in 4.

Example D.11: Distance Between Points

Find the distance between the points P and Q in 4, where P and Q are given by

P = (1,2,4,6)

and

Q = (2,3,1,0)

Solution

We will use the formula given in Definition D.10 to find the distance between P and Q. Use the distance formula and write

d(P,Q) = ( (1 2)2 + (2 3)2 + (4 (1))2 + (6 0)2) 1 2 = 47

Therefore, d(P,Q) = 47.

There are certain properties of the distance between points which are important in our study. These are outlined in the following theorem.

Theorem D.12: Properties of Distance

Let P and Q be points in n, and let the distance between them, d(P,Q), be given as in Definition D.10. Then, the following properties hold .

There are many applications of the concept of distance. For instance, given two points, we can ask what collection of points are all the same distance between the given points. This is explored in the following example.

Example D.13: The Plane Between Two Points

Describe the points in 3 which are at the same distance between (1,2,3) and (0,1,2).

Solution

Let P = (p1,p2,p3) be such a point. Therefore, P is the same distance from (1,2,3) and (0,1,2). Then by Definition D.10,

(p1 1 ) 2 + (p2 2 ) 2 + (p3 3 ) 2 = (p1 0 ) 2 + (p2 1 ) 2 + (p3 2 ) 2

Squaring both sides we obtain

(p1 1)2 + (p 2 2)2 + (p 3 3)2 = p 12 + (p 2 1)2 + (p 3 2)2

and so

p12 2p 1 + 14 + p22 4p 2 + p32 6p 3 = p12 + p 22 2p 2 + 5 + p32 4p 3

Simplifying, this becomes

2p1 + 14 4p2 6p3 = 2p2 + 5 4p3

which can be written as

2p1 + 2p2 + 2p3 = 9 (D.5)

Therefore, the points P = (p1,p2,p3) which are the same distance from each of the given points form a plane whose equation is given by D.5.

We can now use our understanding of the distance between two points to define what is meant by the length of a vector. Consider the following definition.

Definition D.14: Length of a Vector

Let u = [u1un] T be a vector in n. Then, the length of u, written u is given by

u = u1 2 + + un 2

This definition corresponds to Definition D.10, if you consider the vector u to have its tail at the point 0 = (0,,0) and its tip at the point U = (u1,,un). Then the length of u is equal to the distance between 0 and U, d(0,U). In general, d(P,Q) = PQ.

Consider Example D.11. By Definition D.14, we could also find the distance between P and Q as the length of the vector connecting them. Hence, if we were to draw a vector PQ with its tail at P and its point at Q, this vector would have length equal to 47.

We conclude this section with a new definition for the special case of vectors of length 1.

Definition D.15: Unit Vector

Let u be a vector in n. Then, we call u a unit vector if it has length 1, that is if

u = 1

Let v be a vector in n. Then, the vector u which has the same direction as v but length equal to 1 is the corresponding unit vector of v. This vector is given by

u = 1 vv

We often use the term normalize to refer to this process. When we normalize a vector, we find the corresponding unit vector of length 1. Consider the following example.

Example D.16: Finding a Unit Vector

Let v be given by

v = [ 1 3 4 ]T

Find the unit vector u which has the same direction as v .

Solution

We will use Definition D.15 to solve this. Therefore, we need to find the length of v which, by Definition D.14 is given by

v = v1 2 + v2 2 + v3 2

Using the corresponding values we find that

v = 12 + (3 ) 2 + 42 = 1 + 9 + 16 = 26

In order to find u, we divide v by 26. The result is

u = 1 vv = 1 26 [ 1 3 4 ]T = [ 1 26 3 26 4 26 ] T

You can verify using the Definition D.14 that u = 1.

D.5 Geometric Meaning of Scalar Multiplication

Learning Outcomes

A.
Understand scalar multiplication, geometrically.

Recall that the point P = (p1,p2,p3) determines a vector p from 0 to P. The length of p, denoted p, is equal to p1 2 + p2 2 + p3 2 by Definition D.10.

Now suppose we have a vector u = [ u1 u2 u3 ] T and we multiply u by a scalar k. By Definition D.5, ku = [ ku1 ku2 ku3 ] T. Then, by using Definition D.10, the length of this vector is given by

( (ku1 ) 2 + (ku2 ) 2 + (ku3 ) 2 ) = |k|u1 2 + u2 2 + u3 2

Thus the following holds.

ku = |k|u

In other words, multiplication by a scalar magnifies or shrinks the length of the vector by a factor of |k|. If |k| > 1, the length of the resulting vector will be magnified. If |k| < 1, the length of the resulting vector will shrink. Remember that by the definition of the absolute value, |k| > 0.

What about the direction? Draw a picture of u and ku where k is negative. Notice that this causes the resulting vector to point in the opposite direction while if k > 0 it preserves the direction the vector points. Therefore the direction can either reverse, if k < 0, or remain preserved, if k > 0.

Consider the following example.

Example D.17: Graphing Scalar Multiplication

Consider the vectors u and v drawn below.

Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as separate arrows, presented as the setup for graphing the linear combinations u+2v and u-1/2 v.

Figure D.11: Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as...

Draw u, 2v, and 1 2v.

Solution

In order to find u, we preserve the length of u and simply reverse the direction. For 2v, we double the length of v, while preserving the direction. Finally 1 2v is found by taking half the length of v and reversing the direction. These vectors are shown in the following diagram.

Two-dimensional diagram showing scalar multiples of two vectors: blue vector u and its negative -u (same length, opposite direction), plus red vector v together with 2v (twice as long, same direction) and -1/2 v (half-length, reversed).

Figure D.12: Two-dimensional diagram showing scalar multiples of two vectors: blue vector u and its negative -u...

Now that we have studied both vector addition and scalar multiplication, we can combine the two actions. Recall Definition D.7 of linear combinations of column matrices. We can apply this definition to vectors in n. A linear combination of vectors in n is a sum of vectors multiplied by scalars.

In the following example, we examine the geometric meaning of this concept.

Example D.18: Graphing a Linear Combination of Vectors

Consider the following picture of the vectors u and v

Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as separate arrows, presented as the setup for graphing the linear combinations u+2v and u-1/2 v.

Figure D.13: Two-dimensional sketch of vectors u (blue, up and right) and v (red, down and right) drawn as...

Sketch a picture of u + 2v,u 1 2v.

Solution

The two vectors are shown below.

Two-dimensional vector diagram of the linear combination u + 2v: blue vector u from the origin, red vector 2v drawn tip-to-tail starting at u's head, and the purple resultant u+2v from the origin to the final tip.

Figure D.14: Two-dimensional vector diagram of the linear combination u + 2v: blue vector u from the origin, red...

Two-dimensional vector diagram of the linear combination u - 1/2 v: blue u from the origin, the short red vector -1/2 v placed tip-to-tail at u's head, and the purple resultant u - 1/2 v drawn from the origin to the final tip.

Figure D.15: Two-dimensional vector diagram of the linear combination u - 1/2 v: blue u from the origin, the...

D.6 The Dot Product

Learning Outcomes

A.
Compute the dot product of vectors, and use this to compute vector projections.

D.6.1 The Dot Product

There are two ways of multiplying vectors which are of great importance in applications. The first of these is called the dot product. When we take the dot product of vectors, the result is a scalar. For this reason, the dot product is also called the scalar product and sometimes the inner product. The definition is as follows.

Definition D.19: Dot Product

Let u,v be two vectors in n. Then we define the dot product u v as

u v = k=1nu kvk

The dot product u v is sometimes denoted as (u,v) where a comma replaces . It can also be written as u,v. If we write the vectors as column or row matrices, it is equal to the matrix product vwT.

Consider the following example.

Example D.20: Compute a Dot Product

Find u v for

u = [ 1 2 0 1 ],v = [ 0 1 2 3 ]

Solution

By Definition D.19, we must compute

u v = k=14u kvk

This is given by

u v = (1)(0) + (2)(1) + (0)(2) + (1)(3) = 0 + 2 + 0 + 3 = 1

With this definition, there are several important properties satisfied by the dot product.

Proposition D.1. Properties of the Dot Product Let k and p denote scalars and u,v,w denote vectors. Then the dot product u v satisfies the following properties.

The proof is left as an exercise. This proposition tells us that we can also use the dot product to find the length of a vector.

Example D.21: Length of a Vector

Find the length of

u = [ 2 1 4 2 ]

That is, find u.

Solution

By Proposition D.1, u2 = u u. Therefore, u = u u. First, compute u u.

This is given by

u u = (2)(2) + (1)(1) + (4)(4) + (2)(2) = 4 + 1 + 16 + 4 = 25

Then,

u = u u = 25 = 5

You may wish to compare this to our previous definition of length, given in Definition D.14.

The Cauchy Schwarz inequality is a fundamental inequality satisfied by the dot product. It is given in the following theorem.

Theorem D.22: Cauchy Schwarz Inequality

The dot product satisfies the inequality

|uv|uv (D.6)

Furthermore equality is obtained if and only if one of u or v is a scalar multiple of the other.

Notice that this proof was based only on the properties of the dot product listed in Proposition D.1. This means that whenever an operation satisfies these properties, the Cauchy Schwarz inequality holds. There are many other instances of these properties besides vectors in n.

The Cauchy Schwarz inequality provides another proof of the triangle inequality for distances in n.

Theorem D.23: Triangle Inequality

For u,v n

u + vu + v (D.7)

and equality holds if and only if one of the vectors is a non-negative scalar multiple of the other.

Also

|uv|u v (D.8)

D.6.2 The Geometric Significance of the Dot Product

Given two vectors, u and v, the included angle is the angle between these two vectors which is given by 𝜃 such that 0 𝜃 π. The dot product can be used to determine the included angle between two vectors. Consider the following picture where 𝜃 gives the included angle.

Two-dimensional sketch of two vectors emanating from a common origin: a blue vector v pointing up and to the right and a red vector u pointing down and to the right, with the included angle theta marked between them.

Figure D.16: Two-dimensional sketch of two vectors emanating from a common origin: a blue vector v pointing up...

Proposition D.2. The Dot Product and the Included Angle Let u and v be two vectors in n, and let 𝜃 be the included angle. Then the following equation holds.

u v = uvcos 𝜃

In words, the dot product of two vectors equals the product of the magnitude (or length) of the two vectors multiplied by the cosine of the included angle. Note this gives a geometric description of the dot product which does not depend explicitly on the coordinates of the vectors.

Consider the following example.

Example D.24: Find the Angle Between Two Vectors

Find the angle between the vectors given by

u = [ 2 1 1 ],v = [ 3 4 1 ]

Solution

By Proposition D.2,

u v = uvcos 𝜃

Hence,

cos 𝜃 = u v uv

First, we can compute u v. By Definition D.19, this equals

u v = (2)(3) + (1)(4) + (1)(1) = 9

Then,

u = (2)(2) + (1)(1) + (1)(1) = 6 v = (3)(3) + (4)(4) + (1)(1) = 26

Therefore, the cosine of the included angle equals

cos 𝜃 = 9 266 = 0.7205766...

With the cosine known, the angle can be determined by computing the inverse cosine of that angle, giving approximately 𝜃 = 0.76616 radians.

Another application of the geometric description of the dot product is in finding the angle between two lines. Typically one would assume that the lines intersect. In some situations, however, it may make sense to ask this question when the lines do not intersect, such as the angle between two object trajectories. In any case we understand it to mean the smallest angle between (any of) their direction vectors. The only subtlety here is that if u is a direction vector for a line, then so is any multiple ku, and thus we will find complementary angles among all angles between direction vectors for two lines, and we simply take the smaller of the two.

Example D.25: Find the Angle Between Two Lines

Find the angle between the two lines

L1 : [ x y z ] = [ 1 2 0 ]+t [ 1 1 2 ]

and

L2 : [ x y z ] = [ 0 4 3 ]+s [ 2 1 1 ]

Solution

You can verify that these lines do not intersect, but as discussed above this does not matter and we simply find the smallest angle between any directions vectors for these lines.

To do so we first find the angle between the direction vectors given above:

u = [ 1 1 2 ],v = [ 2 1 1 ]

In order to find the angle, we solve the following equation for 𝜃

u v = uvcos 𝜃

to obtain cos 𝜃 = 1 2 and since we choose included angles between 0 and π we obtain 𝜃 = 2π 3 .

Now the angles between any two direction vectors for these lines will either be 2π 3 or its complement ϕ = π 2π 3 = π 3 . We choose the smaller angle, and therefore conclude that the angle between the two lines is π 3 .

We can also use Proposition D.2 to compute the dot product of two vectors.

Example D.26: Using Geometric Description to Find a Dot Product

Let u,v be vectors with u = 3 and v = 4. Suppose the angle between u and v is π3. Find u v.

Solution

From the geometric description of the dot product in Proposition D.2

u v = (3)(4)cos (π3) = 3 × 4 × 12 = 6

Two nonzero vectors are said to be perpendicular, sometimes also called orthogonal, if the included angle is π2 radians ( 90).

Consider the following proposition.

Proposition D.3. Perpendicular Vectors Let u and v be nonzero vectors in n. Then, u and v are said to be perpendicular exactly when

u v = 0

Consider the following example.

Example D.27: Determine if Two Vectors are Perpendicular

Determine whether the two vectors,

u = [ 2 1 1 ],v = [ 1 3 5 ]

are perpendicular.

Solution

In order to determine if these two vectors are perpendicular, we compute the dot product. This is given by

u v = (2)(1) + (1)(3) + (1)(5) = 0

Therefore, by Proposition D.3 these two vectors are perpendicular.

© 2026 Robert Hildebrand and contributors · Licensed CC BY-SA 4.0 · Sources and attribution · Book home