covered in last lecturerushworw/1zc3_notes/lecture21.pdfthese notions of vector addition,...

15
- MATH ZC Winter Lecture : Vectors in R n Instructor: Dr Rushworth February Covered in last lecture • Roots of complex numbers • Complex exponents • Vectors in R n Vectors in R n , continued (from Chapter . of Anton-Rorres) Operations on vectors These denitions are exactly equivalent to those given with respect to matrices earlier in the course. Denition .: Equality of vectors Two vectors u = ( u 1 , u 2 ,..., u n ) and v = ( v 1 , v 2 ,..., v n ) are equal , written u = v if u 1 = v 1 u 2 = v 2 . . . u n = v n That is, u and v are equal if their components are equal.

Upload: others

Post on 20-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

21-1

MATH 1ZC3 Winter 2020

Lecture 21: Vectors inRn

Instructor: Dr Rushworth February

Covered in last lecture

• Roots of complex numbers

• Complex exponents

• Vectors inRn

Vectors inRn , continued(from Chapter 3.1 of Anton-Rorres)

Operations on vectors

These de�nitions are exactly equivalent to those given with respect to matricesearlier in the course.

De�nition 21.1: Equality of vectors

Two vectors u = (u1, u2, . . . , un) and v = (v1, v2, . . . , vn) are equal,written u = v if

u1 = v1u2 = v2...

un = vn

That is, u and v are equal if their components are equal.

21-2

As we did with matrices, we de�ne the zero vector as 0 = (0, 0, . . . , 0).

De�nition 21.2: Operations on vectors

Let u = (u1, u2, . . . , un) and v = (v1, v2, . . . , vn) be vectors in Rn .De�ne

1. Addition:u + v = (u1 + v1, u2 + v2, . . . , un + vn)

2. Subtraction:

u − v = (u1 − v1, u2 − v2, . . . , un − vn)

3. Scalar multiplication: let k be a real number, known as a scalar

ku = (ku1, ku2, . . . , kun)

Fact 21.3

Let u, v, w be vectors inRn , and k, m scalars. Then

1. u + v = v + u

2. (u + v) + w = u + (v + w)

3. u + 0 = u

4. u + (−u) = 0

5. k (u + v) = ku + kv

6. (k +m)u = ku +mu

7. k (mu) = (k m)u

8. 1u = u

All of these facts can be proved directly from the de�nitions given above. As usual,use these facts to speed up your calculations with vectors. It is often quick to use

21-3

these properties and work with the vectors themselves, rather than their individualcomponents.

Vector operations inR2 andR3

When we are working inR2 orR3, we have the bene�t of being able to draw usefulpictures. In fact, the intuition gained in this way extends into the higher dimensionsalso.When we are in R2 we can add two vectors using the parallelogram rule. If thevectors have the same initial point, use them to form a parallelogram: their vectorsum is then the vector bisecting this parallelogram. For example, if u = (3, 5) andv = (2, −1) then

u=H3,5L

v=H2,-1L

u+v=H5,4L

1 2 3 4 5 6

-1

1

2

3

4

5

This is equivalent to vector addition de�ned above, so that

u + v = (3, 5) + (2, −1)= (5, 4)

If u and v are end to end, we can also express u + v as

21-4

u

v

u + v

1 2 3 4 5

1

2

3

4

5

We can also understand scalar multiplication this way. Let u = (6, 10) and k =1.5, then

1.5

u

k u

-20 -10 10 20

-20

-10

10

20

and when k = −1

21-5

-1.

u

k u

-20 -10 10 20

-20

-10

10

20

That is, multiplying a vector by a scalar does not change its direction, only itslength.Vector subtraction is similar, but here we need to be careful. Whenwriting a vectorin co-ordinates we always place its initial point at the origin i.e. at the zero vector.However, in certain situations we are permitted to think of vectors which do nothave their initial point at the origin.One such situation is as follows. Given vectors u and v, we can think of the vectoru−v as the vector which points from the terminal point of v to the terminal pointof u, even though the vector u − v actually has its initial point at the origin. Thisis justi�ed as the two vectors have the same direction and length.Therefore, if we were asked to �nd the distance between the terminal point of uand the terminal point of v, we could compute the length of the vector u−v, eventhough it does not lie between the desired points.For example, let u = (3, 5) and v = (2, −1) again, then

21-6

u=H3,5L

v=H2,-1L

''u-v''

u-v=H1,6L

0.5 1.0 1.5 2.0 2.5 3.0

2

4

6

Example 21.4

Question: Given u = (3, 5) and v = (2, −1) compute the distance betweenthe terminal point of u and the terminal point of vAnswer: The picture we need is given above. Although u−v does not strictlylie between the terminal points of u and v, it has the same length and dir-ection as the vector that we are interested in.Therefore the distance is given by the length of u − v = (1, 6)

√12 + 62 =

√37

These notions of vector addition, subtraction, and scalar multiplication can alsobe used in R3: when answering questions involving vectors in R2 or R3, drawpictures!

Vectors which do not start at the origin

Related to the discussion above, given a vector whose initial point is not at theorigin, we sometimes abuse notation and write this vector in terms of components(even though its initial point is not the origin).

21-7

De�nition 21.5: Vectors via their endpoints

Let P and Q be points in Rn . The vector with initial point Q and terminalpoint P is denoted by

u =→

Q P

Recipe 21.6: Finding the components of a vector away from theorigin

Given two points inRn ,Q and P , use this recipe to �nd the components of

the vector u =→

Q P .

Step 1: Let P = (p1, p2, . . . , pn) andQ = (q1, q2, . . . , qn). Then

P −Q = (p1 − q1, p2 − q2, . . . , pn − qn)

Step 2: The components of the vector u =→

Q P are then

u = (p1 − q1, p2 − q2, . . . , pn − qn)

Unless you are in this exact situation, and are speci�cally asked to compute thecomponents of a vector with initial point away from the origin, you can assumethat any vector written in terms of components, such as

u = (u1, u2, . . . , un)

has its initial point at the origin.

Example 21.7

Question: Find the components of the vector starting atQ = (−5, 2, 4) andending at P = (9, 0, −4).

21-8

Answer: We haveu =

Q P= (9, 0, −4) − (−5, 2, 4)= (14, −2, −8)

Example 21.8

Question: Let P be the point (5, 2), andQ the point (−7, 0).Find the co-ordinates of the midpoint of the line joining P andQ .Answer: Draw a picture:

Q

P

midpoint

-6 -4 -2 2 4

0.5

1.0

1.5

2.0

LetO denote the origin, and let p =→

OP , and q =→

OQ .The vector fromQ to P is given by

Q P = (5, 2) − (−7, 0)= (12, 2)

21-9

Let M denote the midpoint of→

Q P . Then

Q M =12(12, 2) = (6, 1)

Therefore the co-ordinates of the midpoint of→

Q P are given by

q + (6, 1) = (−1, 1)

Generalizing distance: length of vectors inRn

(from Chapter 3.2 of Anton-Rorres)

Recall that the magnitude (a.k.a. the length) of the vectoru = (x, y ) inR2 is givenby

| |u| | =√

x2 + y 2.

A very similar formula allows us to compute the length of a vector inRn :

De�nition 21.9: Norm of a vector

Let u = (u1, u2, . . . , un) be a vector inRn .The norm of u is denoted | |u| | and is de�ned to be

| |u| | =√

u21 + u2

2 + · · ·u2n

The norm of a vector is also known as the magnitude.

Example 21.10

Ifu = (1, −1, 4, 2)

21-10

then| |u| | =

√1 + 1 + 16 + 4

=√22

Notice that the norm takes a vector as input, and outputs a scalar. When workingwith vectors it is crucial to keep track of which quantities are scalars, and whichquantities are vectors.

Question 21.11

Let u and v be vectors inRn . Which of the following are well-de�ned?

u + vu + | |v | || |u| | + | |v | |

Fact 21.12: Properties of the norm

Let u be a vector inRn , and k a scalar. Then

• | |u| | ≥ 0

• | |u| | = 0 if and only if u = 0

• | |ku| | = |k | | |u| |

De�nition 21.13: Unit vector

A unit vector is a vector u inRn such that

| |u| | = 1

Given any vector u inRn we can always produce a unit vector which points in the

21-11

same direction as u: the vector

v =1| |u| |

u

is a unit vector, but as it is a scalar multiple ofu it must point in the same direction.The process of producing the vector v is known as normalizing u.

Question 21.14Why is

v =1| |u| |

u

a unit vector for any vector u?

De�nition 21.15: The standard unit vectorsThe vectors

i = (1, 0), j = (0, 1)are the standard unit vectors in R2 (do not confuse this with the complexnumber i ).The vectors

i = (1, 0, 0), j = (0, 1, 0), k = (0, 0, 1)

are the standard unit vectors inR3

The vectors

e1 = (1, 0, . . . , 0), e1 = (0, 1, . . . , 0), . . . , en = (0, 0, . . . , 1)

are the standard unit vectors inRn .

De�nition 21.16: Linear combinationLet v1, v2, . . . , vk be a collection of vectors inRn . A linear combination ofthese vectors is a new vector

v = a1v1 + a2v2 + · · · + akvk

21-12

for a1, a2, . . . , ak scalars.

Notice that every vector inRn can be written as a linear combination of the stand-ard unit vectors. For example

(4, −2, 0, 1) = 4(1, 0, 0, 0) − 2(0, 1, 0, 0) + 0(0, 0, 1, 0) + (0, 0, 0, 1)= 4e1 − 2e2 + e4

Distance between two points

We can use the norm to compute the distance between the terminal points of twovectors.

Fact 21.17: Distance between two points

Let u and v be vectors inRn . The distance between the endpoints of u andv is given by

| |u − v | |

Example 21.18

Question: Find the distance between the points (0, −1, 3, −3) and(2, −1, −2, 4).Answer: We have

| |u − v | | = | |(0, −1, 3, −3) − (2, −1, −2, 4)| |= | |(−2, 0, 5, −7)| |=√4 + 25 + 49

=√78

21-13

The dot product

The norm takes a vector as input and outputs a scalar. We can de�ne anotheroperation which takes as input two vectors, and outputs a scalar. This operation isknown as the dot product.

De�nition 21.19: The dot product

Let u = (u1, u2, . . . , un) and v = (v1, v2, . . . , vn) be vectors in Rn . Thedot product of u and v is denoted u • v and de�ned

u • v = u1v1 + u2v2 + . . . + unvn

Example 21.20

Let u = (4, −1, 1, 4) v = (0, 8, −3, 2). Then

u • v = (4)(0) + (−1)(8) + (1)(−3) + (4)(2)= −8 − 3 + 8= −3

Fact 21.21Let u be a vector inRn . Then

u • u = | |u| |2

What is the dot product of u and v? It measures how much the vectors “overlap".This can be made precise as follows.Given two vectors u and v we can compute the angle between them, denoted θ:we will always pick the angle so that 0 ≤ θ ≤ π. That is,

21-14

θθ

Fact 21.22Let u and v be vectors and θ the angle between them. Then

u • v = | |u| | | |v | | cos (θ)

Proof: This can be proved in R2 using Pythagoras. The proof in Rn can then bereduced to theR2 case.As mentioned previously, when working with vectors is it very important to keeptrack of what is a vector and what is a scalar, to make sure what you are computingis well-de�ned. The formula given in Fact 21.22 is well de�ned as on the left, wehave u • v, which is de�ned to be a scalar. On the right we have the product ofthree scalars | |u| |, | |v | |, and cos (θ), which is still a scalar. Therefore what we havewritten is well-de�ned.By rearranging the formula in Fact 21.22 we can compute the angle between twogiven vectors.

Example 21.23

Question: Given u = (3, 0, 1) and v = (−1, −1, 0) compute the anglebetween u and v.

21-15

Answer: Compute the required quantities

| |u| | =√9 + 1 =

√10

| |v | | =√1 + 1 =

√2

u • v = (3)(−1) + (0)(1) + (1)(0)= −3

Then by Fact 21.22 we have

cos (θ) =u • v| |u| | | |v | |

= −3

√2√10

= −3

2√5

Then

θ = arccos(−

32√5

)u 2.31 radu 132.1 degrees

(1)

Suggested Problems

Practice the material covered in this lecture by attempting the following questionsfrom Chapter 3.1 of Anton-Rorres, starting on page 141

• Questions 7, 13, 17, 19, 21, 23, 27

and from Chapter 3.2 of Anton-Rorres, starting on page 153

• Questions 7, 13, 15, 17, 27

• True/False (d), (e), (g), (h)