5.1 The Scalar Product in n

Two vectors x and y in n may be regarded as n×1 matrices. We can then form the matrix product xTy. This product is a 1×1 matrix that may be regarded as a vector in 1 or, more simply, as a real number. The product xTy is called the scalar product of x and y. In particular, if x=(x1,,xn)T and y=(y1,,yn)T, then

xTy=x1y1+x2y2++xnyn

Example 1

If

x=[321]andy=[432]

then

xTy=(3,2,1)[432]=3423+12=8

The Scalar Product in 2 and 3

In order to see the geometric significance of the scalar product, let us begin by restricting our attention to 2 and 3. Vectors in 2 and 3 can be represented by directed line segments. Given a vector x in either 2 or 3, its Euclidean length can be defined in terms of the scalar product.

x=(xTx)1/2={x12+x22if x2x12+x22+x32if x3

Given two nonzero vectors x and y, we can think of them as directed line segments starting at the same point. The angle between the two vectors is then defined as the angle θ between the line segments. We can measure the distance between the vectors by measuring the length of the vector joining the terminal point of x to the terminal point of y (see Figure 5.1.1). Thus, we have the following definition.

Figure 5.1.1.

A vector diagram has three vectors forming a triangle.

Example 2

If x=(3,4)T and y=(1,7)T, then the distance between x and y is given by

yx=(13)2+(74)2=5

The angle between two vectors can be computed using the following theorem.

Theorem 5.1.1

If x and y are two nonzero vectors in either 2 or 3 and θ is the angle between them, then

xTy=x  ycosθ
(1)

Proof

The vectors x, y, and yx may be used to form a triangle as in Figure 5.1.1. By the law of cosines, we have

yx2=x2+y22x ycosθ

and hence it follows that

xy cosθ=12(x2+y2yx2)=12(x2+y2(yx)T(yx))=12(x2+y2(yTyyTxxTy+xTx))=xTy

 

If x and y are nonzero vectors, then we can specify their directions by forming unit vectors

u=1xxandv=1yy

If θ is the angle between x and y, then

cosθ=xTyxy=uTv

The cosine of the angle between the vectors x and y is the scalar product of the corresponding direction vectors u and v.

Example 3

Let x and y be the vectors in Example 2. The directions of these vectors are given by the unit vectors

u=1xx=[3545]andv=1yy=[152752]

The cosine of the angle θ between the two vectors is

cosθ=uTv=12

and hence θ=π4.

Corollary 5.1.2 Cauchy—Schwarz Inequality

If x and y are vectors in either 2 or 3, then

|xTy|x  y
(2)

with equality holding if and only if one of the vectors is 0 or one vector is a multiple of the other.

Proof

The inequality follows from (1). If one of the vectors is 0, then both sides of (2) are 0. If both vectors are nonzero, it follows from (1) that equality can hold in (2) if and only if cosθ=±1. But this would imply that the vectors are either in the same or opposite directions and hence that one vector must be a multiple of the other.

If xTy=0, it follows from Theorem 5.1.1 that either one of the vectors is the zero vector or cosθ=0. If cosθ=0, the angle between the vectors is a right angle.

Example 4

  1. The vector 0 is orthogonal to every vector in 2.

  2. The vectors [32] and [46] are orthogonal in 2.

  3. The vectors [231] and [111] are orthogonal in 3.

Scalar and Vector Projections

The scalar product can be used to find the component of one vector in the direction of another. Let x and y be nonzero vectors in either 2 or 3. We would like to write x as a sum of the form p+z, where p is in the direction of y and z is orthogonal to p (see Figure 5.1.2). To do this, let u=(1/y)y. Thus, u is a unit vector (length 1) in the

Figure 5.1.2.

A vector diagram has three vectors that forms a right triangle.

direction of y. We wish to find α such that p=αu is orthogonal to z=xαu. For p and z to be orthogonal, the scalar α must satisfy

α=xcosθ=xycosθy=xTyy

The scalar α is called the scalar projection of x onto y, and the vector p is called the vector projection of x onto y.

Scalar projection of x onto y:

α=xTyy

Vector projection of x onto y:

p=αu=α1yy=xTyyTyy

Example 5

The point Q in Figure 5.1.3 is the point on the line y=13x that is closest to the point (1, 4). Determine the coordinates of Q.

Figure 5.1.3.

A vector diagram illustrated in a graph has two vectors.

SOLUTION

The vector w=(3,1)T is a vector in the direction of the line y=13x. Let v=(1,4)T. If Q is the desired point, then QT is the vector projection of v onto w.

QT=(vTwwTw)w=710[31]=[2.10.7]

Thus, Q=(2.1,0.7) is the closest point.

Notation

If P1 and P2 are two points in 3-space, we will denote the vector from P1 to P2 by P1P2.

If N is a nonzero vector and P0 is a fixed point, the set of points P such that P0P is orthogonal to N forms a plane π in 3-space that passes through P0. The vector N and the plane π are said to be normal to each other. A point P=(x,y,z) will lie on π if and only if

(P0P)TN=0

If N=(a,b,c)T and P0=(x0,y0,z0), this equation can be written in the form

a(xx0)+b(yy0)+c(zz0)=0

Example 6

Find the equation of the plane passing through the point (2,1,3) and normal to the vector N=(2,3,4)T.

SOLUTION

P0P=(x2,y+1,z3)T. The equation is (P0P)TN=0, or

2(x2)+3(y+1)4(z3)=0

The span of two linearly independent vectors x and y in 3 corresponds to a plane through the origin in 3-space. To determine the equation of the plane, we must find a vector normal to the plane. In Section 2.3, it was shown that the cross product of the two vectors is orthogonal to each vector. If we take N=x×y as our normal vector, then the equation of the plane is given by

n1x+n2y+n3z=0

Example 7

Find the equation of the plane that passes through the points

P1(1,1,2),P2=(2,3,3),P3=(3,3,3)

SOLUTION

Let

x=P1P2=[121]andy=P1P3=[241]

The normal vector N must be orthogonal to both x and y. If we set

N=x×y=[618]

then N will be a normal vector to the plane that passes through the given points. We can then use any one of the points to determine the equation of the plane. Using the point P1, we see that the equation of the plane is

6(x1)+(y1)8(z2)=0

Example 8

Find the distance from the point (2, 0, 0) to the plane x+2y+2z=0.

SOLUTION

The vector N=(1,2,2)T is normal to the plane and the plane passes through the origin. Let v=(2,0,0)T. The distance d from (2, 0, 0) to the plane is simply the absolute value of the scalar projection of v onto N. Thus,

d=|vTN|N=23

If x and y are nonzero vectors in 3 and θ is the angle between the vectors, then

cosθ=xTyxy

It then follows that

sinθ=1cos2θ=1(xTy)2x2y2=x2y2(xTy)2xy

and hence

xysinθ=x2y2(xTy)2=(x12+x22+x32)(y12+y22+y32)(x1y1+x2y2+x3y3)2=(x2y3x3y2)2+(x3y1x1y3)2+(x1y2x2y1)2=x×y

Thus, we have, for any nonzero vectors x and y in 3,

x×y=xysinθ

If either x or y is the zero vector, then x×y=0 and hence the norm of x×y will be 0.

Orthogonality in n

The definitions that have been given for 2 and 3 can all be generalized to n. Indeed, if xn, then the Euclidean length of x is defined by

x=(xTx)1/2=(x12+x22++xn2)1/2

If x and y are two vectors in n, then the distance between the vectors is yx.

The Cauchy–Schwarz inequality holds in n. (We will prove this in Section 5.4.) Consequently,

1xTyxy1
(3)

for any nonzero vectors x and y in n. In view of (3), the definition of the angle between two vectors that was used for 2 can be generalized to n. Thus, the angle θ between two nonzero vectors x and y in n is given by

cosθ=xTyxy,0θπ

In talking about angles between vectors, it is usually more convenient to scale the vectors so as to make them unit vectors. If we set

u=1xxandv=1yy

then the angle θ between u and v is clearly the same as the angle between x and y, and its cosine can be computed simply by taking the scalar product of the two unit vectors:

cosθ=xTyxy=uTv

The vectors x and y are said to be orthogonal if xTy=0. Often the symbol ⊥ is used to indicate orthogonality. Thus, if x and y are orthogonal, we will write xy. Vector and scalar projections are defined in n in the same way that they were defined for 2.

If x and y are vectors in n, then

x+y2=(x+y)T(x+y)=x2+2xTy+y2
(4)

In the case that x and y are orthogonal, equation (4) becomes the Pythagorean law

x+y2=x2+y2

The Pythagorean law is a generalization of the Pythagorean theorem. When x and y are nonzero orthogonal vectors in 2, we can use these vectors and their sum x+y to form a right triangle as in Figure 5.1.4. The Pythagorean law relates the lengths of the sides of the triangle. Indeed, if we set

a=x,  b=y,c=x+y

Figure 5.1.4.

A vector diagram represents Pythagorean law.

then

c2=a2+b2(the famous Pythagorean theorem)

In many applications, the cosine of the angle between two nonzero vectors is used as a measure of how closely the directions of the vectors match up. If cos θ is near 1, then the angle between the vectors is small and hence the vectors are in nearly the same direction. A cosine value near zero would indicate that the angle between the vectors is nearly a right angle.

There are many other important applications involving angles between vectors. In particular, statisticians use the cosine of the angle between two vectors as a measure of how closely the two vectors are correlated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158