Linear algebra and differential equations (Math 54): Lecture 15 - - PowerPoint PPT Presentation

linear algebra and differential equations math 54 lecture
SMART_READER_LITE
LIVE PREVIEW

Linear algebra and differential equations (Math 54): Lecture 15 - - PowerPoint PPT Presentation

Linear algebra and differential equations (Math 54): Lecture 15 Vivek Shende March 11, 2019 Hello and welcome to class! Hello and welcome to class! Last time Hello and welcome to class! Last time We discussed when a matrix has a basis of


slide-1
SLIDE 1

Linear algebra and differential equations (Math 54): Lecture 15

Vivek Shende March 11, 2019

slide-2
SLIDE 2

Hello and welcome to class!

slide-3
SLIDE 3

Hello and welcome to class!

Last time

slide-4
SLIDE 4

Hello and welcome to class!

Last time

We discussed when a matrix has a basis of real eigenvectors.

slide-5
SLIDE 5

Hello and welcome to class!

Last time

We discussed when a matrix has a basis of real eigenvectors.

This time

We talk a bit about the complex numbers

slide-6
SLIDE 6

Hello and welcome to class!

Last time

We discussed when a matrix has a basis of real eigenvectors.

This time

We talk a bit about the complex numbers and discuss their uses in finding eigenvalues and eigenvectors.

slide-7
SLIDE 7

Hello and welcome to class!

Last time

We discussed when a matrix has a basis of real eigenvectors.

This time

We talk a bit about the complex numbers and discuss their uses in finding eigenvalues and eigenvectors. Then we’ll move on to the next chapter, about orthogonality.

slide-8
SLIDE 8

The complex numbers

slide-9
SLIDE 9

The complex numbers

The negative real numbers have no square-roots.

slide-10
SLIDE 10

The complex numbers

The negative real numbers have no square-roots. We just invent them: introduce a symbol i, whose square is −1.

slide-11
SLIDE 11

The complex numbers

The negative real numbers have no square-roots. We just invent them: introduce a symbol i, whose square is −1. Now all real numbers have square-roots: √−7 = i √ 7.

slide-12
SLIDE 12

The complex numbers

slide-13
SLIDE 13

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers,

slide-14
SLIDE 14

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers, and i squares to −1.

slide-15
SLIDE 15

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers, and i squares to −1. We write C for the set of these numbers.

slide-16
SLIDE 16

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers, and i squares to −1. We write C for the set of these numbers. They add and multiply just like you think they do:

slide-17
SLIDE 17

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers, and i squares to −1. We write C for the set of these numbers. They add and multiply just like you think they do: (a + bi) + (c + di) = (a + c) + (b + d)i

slide-18
SLIDE 18

The complex numbers

Definition

The complex numbers are the collection of expressions a + bi, where a, b are real numbers, and i squares to −1. We write C for the set of these numbers. They add and multiply just like you think they do: (a + bi) + (c + di) = (a + c) + (b + d)i (a + bi)(c + di) = ac + bci + adi + bdi2 = (ac − bd) + (ad + bc)i

slide-19
SLIDE 19

The complex numbers

A useful fact:

slide-20
SLIDE 20

The complex numbers

A useful fact: observe (a + bi)(a − bi) = a2 + b2

slide-21
SLIDE 21

The complex numbers

A useful fact: observe (a + bi)(a − bi) = a2 + b2 This is nonzero so long as a + bi = 0.

slide-22
SLIDE 22

The complex numbers

A useful fact: observe (a + bi)(a − bi) = a2 + b2 This is nonzero so long as a + bi = 0. Thus any nonzero complex number has an inverse:

slide-23
SLIDE 23

The complex numbers

A useful fact: observe (a + bi)(a − bi) = a2 + b2 This is nonzero so long as a + bi = 0. Thus any nonzero complex number has an inverse: 1 a + bi = a − bi a2 + b2 = a a2 + b2 + b a2 + b2 i

slide-24
SLIDE 24

Is that really ok?

slide-25
SLIDE 25

Is that really ok?

For a long time, even many mathematicians didn’t think so.

slide-26
SLIDE 26

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you.

slide-27
SLIDE 27

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count.

slide-28
SLIDE 28

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division.

slide-29
SLIDE 29

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division. But, in terms of counting numbers, the questions “what is 1 − 2” and “what is 1/2” didn’t have answers.

slide-30
SLIDE 30

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division. But, in terms of counting numbers, the questions “what is 1 − 2” and “what is 1/2” didn’t have answers. So we just invented some.

slide-31
SLIDE 31

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division. But, in terms of counting numbers, the questions “what is 1 − 2” and “what is 1/2” didn’t have answers. So we just invented some. Now you have fractions and negative numbers, but still questions like “what number squares to two” or “what is the ratio of the circumference of the circle to its diameter” do not have answers.

slide-32
SLIDE 32

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division. But, in terms of counting numbers, the questions “what is 1 − 2” and “what is 1/2” didn’t have answers. So we just invented some. Now you have fractions and negative numbers, but still questions like “what number squares to two” or “what is the ratio of the circumference of the circle to its diameter” do not have answers. So we just invented some.

slide-33
SLIDE 33

Is that really ok?

For a long time, even many mathematicians didn’t think so. The following may reassure you. At some point, you learned to count. Then, addition, multiplication, subtraction, division. But, in terms of counting numbers, the questions “what is 1 − 2” and “what is 1/2” didn’t have answers. So we just invented some. Now you have fractions and negative numbers, but still questions like “what number squares to two” or “what is the ratio of the circumference of the circle to its diameter” do not have answers. So we just invented some. The complex numbers are the next step in the progression.

slide-34
SLIDE 34

The fundamental theorem of algebra

slide-35
SLIDE 35

The fundamental theorem of algebra

Theorem

Any polynomial xn + an−1xn−1 + · · · + a0, possibly with complex coefficients, factors into linear factors over the complex numbers.

slide-36
SLIDE 36

The fundamental theorem of algebra

Theorem

Any polynomial xn + an−1xn−1 + · · · + a0, possibly with complex coefficients, factors into linear factors over the complex numbers. That is, there exist complex numbers r1, . . . , rn such that xn + an−1xn−1 + · · · + a0 = (x − r1)(x − r2) · · · (x − rn)

slide-37
SLIDE 37

The fundamental theorem of algebra

Theorem

Any polynomial xn + an−1xn−1 + · · · + a0, possibly with complex coefficients, factors into linear factors over the complex numbers. That is, there exist complex numbers r1, . . . , rn such that xn + an−1xn−1 + · · · + a0 = (x − r1)(x − r2) · · · (x − rn) For example, x2 + 1 = (x + i)(x − i).

slide-38
SLIDE 38

The complex plane

slide-39
SLIDE 39

Polar coordinates

slide-40
SLIDE 40

Euler’s identity

slide-41
SLIDE 41

Euler’s identity

eiθ = cos(θ) + i sin(θ)

slide-42
SLIDE 42

Euler’s identity

eiθ = cos(θ) + i sin(θ)

So we can write any complex number x + iy first via polar coordinates as r cos θ + ir sin θ and then as reiθ.

slide-43
SLIDE 43

Euler’s identity

eiθ = cos(θ) + i sin(θ)

So we can write any complex number x + iy first via polar coordinates as r cos θ + ir sin θ and then as reiθ. r =

  • x2 + y2

θ = tan−1(y/x)

slide-44
SLIDE 44

eiπ + 1 = 0

slide-45
SLIDE 45

The geometric meaning of complex multiplication

Multiplying by a complex number a + bi is a linear transformation

  • n the 2-dimensional real vector space underlying the complex

numbers

slide-46
SLIDE 46

The geometric meaning of complex multiplication

Multiplying by a complex number a + bi is a linear transformation

  • n the 2-dimensional real vector space underlying the complex

numbers (the complex plane)

slide-47
SLIDE 47

The geometric meaning of complex multiplication

Multiplying by a complex number a + bi is a linear transformation

  • n the 2-dimensional real vector space underlying the complex

numbers (the complex plane) a −b b a c d

  • =

ac − bd bc + ad

slide-48
SLIDE 48

The geometric meaning of complex multiplication

Multiplying by a complex number a + bi is a linear transformation

  • n the 2-dimensional real vector space underlying the complex

numbers (the complex plane) a −b b a c d

  • =

ac − bd bc + ad

  • In polar form: reiθ acts by the matrix

r cos(θ) − sin(θ) sin(θ) cos(θ)

slide-49
SLIDE 49

The geometric meaning of complex multiplication

Multiplying by a complex number a + bi is a linear transformation

  • n the 2-dimensional real vector space underlying the complex

numbers (the complex plane) a −b b a c d

  • =

ac − bd bc + ad

  • In polar form: reiθ acts by the matrix

r cos(θ) − sin(θ) sin(θ) cos(θ)

  • So it scales by r and rotates by θ.
slide-50
SLIDE 50

Back to linear algebra

slide-51
SLIDE 51

Back to linear algebra

We developed linear algebra with real coefficients.

slide-52
SLIDE 52

Back to linear algebra

We developed linear algebra with real coefficients. But everything we did since the beginning of class actually makes sense with complex coefficients as well.

slide-53
SLIDE 53

Back to linear algebra

We developed linear algebra with real coefficients. But everything we did since the beginning of class actually makes sense with complex coefficients as well. Good review exercise:

slide-54
SLIDE 54

Back to linear algebra

We developed linear algebra with real coefficients. But everything we did since the beginning of class actually makes sense with complex coefficients as well. Good review exercise: go back through and check this!

slide-55
SLIDE 55

Back to linear algebra

We developed linear algebra with real coefficients. But everything we did since the beginning of class actually makes sense with complex coefficients as well. Good review exercise: go back through and check this! Hint: it will be important that nonzero complex numbers have inverses.

slide-56
SLIDE 56

Why is this useful?

slide-57
SLIDE 57

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots.

slide-58
SLIDE 58

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots. If we’re willing to use complex numbers, then we can diagonalize a matrix whenever its characteristic polynomial has n distinct complex roots.

slide-59
SLIDE 59

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots. If we’re willing to use complex numbers, then we can diagonalize a matrix whenever its characteristic polynomial has n distinct complex roots. (By the same argument.)

slide-60
SLIDE 60

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots. If we’re willing to use complex numbers, then we can diagonalize a matrix whenever its characteristic polynomial has n distinct complex roots. (By the same argument.) This is a lot more likely:

slide-61
SLIDE 61

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots. If we’re willing to use complex numbers, then we can diagonalize a matrix whenever its characteristic polynomial has n distinct complex roots. (By the same argument.) This is a lot more likely: the fundamental theorem of algebra

slide-62
SLIDE 62

Why is this useful?

We saw that an n × n matrix can be diagonalized when its characteristic polynomial has n distinct real roots. If we’re willing to use complex numbers, then we can diagonalize a matrix whenever its characteristic polynomial has n distinct complex roots. (By the same argument.) This is a lot more likely: the fundamental theorem of algebra tells us that every polynomial factors into linear factors over the complex numbers.

slide-63
SLIDE 63

Rotation

slide-64
SLIDE 64

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .
slide-65
SLIDE 65

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .

Its characteristic polynomial is (cos(θ) − λ)2 + sin(θ)2 = λ2 − 2 cos(θ) + 1

slide-66
SLIDE 66

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .

Its characteristic polynomial is (cos(θ) − λ)2 + sin(θ)2 = λ2 − 2 cos(θ) + 1 This has roots: λ = 2 cos(θ) ±

  • 4 cos(θ)2 − 4

2 = cos(θ) ± i sin(θ) = e±iθ

slide-67
SLIDE 67

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .

Its characteristic polynomial is (cos(θ) − λ)2 + sin(θ)2 = λ2 − 2 cos(θ) + 1 This has roots: λ = 2 cos(θ) ±

  • 4 cos(θ)2 − 4

2 = cos(θ) ± i sin(θ) = e±iθ So: no real eigenvalues

slide-68
SLIDE 68

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .

Its characteristic polynomial is (cos(θ) − λ)2 + sin(θ)2 = λ2 − 2 cos(θ) + 1 This has roots: λ = 2 cos(θ) ±

  • 4 cos(θ)2 − 4

2 = cos(θ) ± i sin(θ) = e±iθ So: no real eigenvalues — geometrically: rotation preserves no line —

slide-69
SLIDE 69

Rotation

Consider the matrix cos(θ) − sin(θ) sin(θ) cos(θ)

  • .

Its characteristic polynomial is (cos(θ) − λ)2 + sin(θ)2 = λ2 − 2 cos(θ) + 1 This has roots: λ = 2 cos(θ) ±

  • 4 cos(θ)2 − 4

2 = cos(θ) ± i sin(θ) = e±iθ So: no real eigenvalues — geometrically: rotation preserves no line — but it can still be diagonalized over C.

slide-70
SLIDE 70

Length

In the real world, we are quite interested in distance; length.

slide-71
SLIDE 71

Length

In the real world, we are quite interested in distance; length. In our abstract world of vector spaces, we need to define the corresponding notion.

slide-72
SLIDE 72

Length

In the real world, we are quite interested in distance; length. In our abstract world of vector spaces, we need to define the corresponding notion. For R1 this is easy: we just use the absolute value.

slide-73
SLIDE 73

Length

In the real world, we are quite interested in distance; length. In our abstract world of vector spaces, we need to define the corresponding notion. For R1 this is easy: we just use the absolute value. For Rn, we are guided by the Pythagorean theorem.

slide-74
SLIDE 74

Length

In the real world, we are quite interested in distance; length. In our abstract world of vector spaces, we need to define the corresponding notion. For R1 this is easy: we just use the absolute value. For Rn, we are guided by the Pythagorean theorem.

slide-75
SLIDE 75

The Pythagorean theorem

slide-76
SLIDE 76

Length

slide-77
SLIDE 77

Length

Definition

The length of a vector v = (v1, v2, . . . , vn) in Rn

slide-78
SLIDE 78

Length

Definition

The length of a vector v = (v1, v2, . . . , vn) in Rn is ||v|| =

  • v2

1 + v2 2 + · · · + v2 n

slide-79
SLIDE 79

Length

Definition

The length of a vector v = (v1, v2, . . . , vn) in Rn is ||v|| =

  • v2

1 + v2 2 + · · · + v2 n

Note that for a positive scalar λ, we have ||λv|| = λ||v||.

slide-80
SLIDE 80

Length

Definition

The length of a vector v = (v1, v2, . . . , vn) in Rn is ||v|| =

  • v2

1 + v2 2 + · · · + v2 n

Note that for a positive scalar λ, we have ||λv|| = λ||v||.

Example

The vector (5, 3, 1, 1) has length

slide-81
SLIDE 81

Length

Definition

The length of a vector v = (v1, v2, . . . , vn) in Rn is ||v|| =

  • v2

1 + v2 2 + · · · + v2 n

Note that for a positive scalar λ, we have ||λv|| = λ||v||.

Example

The vector (5, 3, 1, 1) has length

  • 52 + 32 + 12 + 12 =

√ 25 + 9 + 1 + 1 = √ 36 = 6

slide-82
SLIDE 82

Try it yourself!

slide-83
SLIDE 83

Try it yourself!

Find the lengths:

slide-84
SLIDE 84

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| =

slide-85
SLIDE 85

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| = √ 02 + 02 + 02 + 02 = 0

slide-86
SLIDE 86

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| = √ 02 + 02 + 02 + 02 = 0 ||(1, 1)|| =

slide-87
SLIDE 87

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| = √ 02 + 02 + 02 + 02 = 0 ||(1, 1)|| = √ 12 + 12 = √ 2

slide-88
SLIDE 88

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| = √ 02 + 02 + 02 + 02 = 0 ||(1, 1)|| = √ 12 + 12 = √ 2 ||(−1, 2, −3, 4)|| =

slide-89
SLIDE 89

Try it yourself!

Find the lengths: ||(0, 0, 0, 0)|| = √ 02 + 02 + 02 + 02 = 0 ||(1, 1)|| = √ 12 + 12 = √ 2 ||(−1, 2, −3, 4)|| =

  • (−1)2 + 22 + (−3)2 + 42 =

√ 1 + 4 + 9 + 16 = √ 30

slide-90
SLIDE 90

Unit vectors

slide-91
SLIDE 91

Unit vectors

Given a vector v ∈ Rn,

slide-92
SLIDE 92

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

slide-93
SLIDE 93

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

v ||v||.

slide-94
SLIDE 94

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

v ||v||. Indeed, since ||v|| is a positive scalar:

  • v

||v||

  • =

1 ||v||||v|| = 1

slide-95
SLIDE 95

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

v ||v||. Indeed, since ||v|| is a positive scalar:

  • v

||v||

  • =

1 ||v||||v|| = 1 We call this the unit vector in the direction of v.

slide-96
SLIDE 96

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

v ||v||. Indeed, since ||v|| is a positive scalar:

  • v

||v||

  • =

1 ||v||||v|| = 1 We call this the unit vector in the direction of v.

Example

The vector (5, 3, 1, 1) has length

  • 52 + 32 + 12 + 12 =

√ 25 + 9 + 1 + 1 = √ 36 = 6

slide-97
SLIDE 97

Unit vectors

Given a vector v ∈ Rn, there is a unique vector of length 1 pointing in the same direction:

v ||v||. Indeed, since ||v|| is a positive scalar:

  • v

||v||

  • =

1 ||v||||v|| = 1 We call this the unit vector in the direction of v.

Example

The vector (5, 3, 1, 1) has length

  • 52 + 32 + 12 + 12 =

√ 25 + 9 + 1 + 1 = √ 36 = 6 The unit vector in the same direction is ( 5

6, 3 6, 1 6, 1 6).

slide-98
SLIDE 98

Try it yourself!

slide-99
SLIDE 99

Try it yourself!

Find a unit vector in the given direction:

slide-100
SLIDE 100

Try it yourself!

Find a unit vector in the given direction: (3, 4) The length is √ 32 + 42 = 5.

slide-101
SLIDE 101

Try it yourself!

Find a unit vector in the given direction: (3, 4) The length is √ 32 + 42 = 5. So the unit vector is (3/5, 4/5).

slide-102
SLIDE 102

Try it yourself!

Find a unit vector in the given direction: (3, 4) The length is √ 32 + 42 = 5. So the unit vector is (3/5, 4/5). (3, 4, 5)

slide-103
SLIDE 103

Try it yourself!

Find a unit vector in the given direction: (3, 4) The length is √ 32 + 42 = 5. So the unit vector is (3/5, 4/5). (3, 4, 5) The length is ||(3, 4, 5)|| =

  • 32 + 42 + 52 =

√ 9 + 16 + 25 = √ 50 = 5 √ 2

slide-104
SLIDE 104

Try it yourself!

Find a unit vector in the given direction: (3, 4) The length is √ 32 + 42 = 5. So the unit vector is (3/5, 4/5). (3, 4, 5) The length is ||(3, 4, 5)|| =

  • 32 + 42 + 52 =

√ 9 + 16 + 25 = √ 50 = 5 √ 2 So the unit vector in the same direction is

1 5 √ 2(3, 4, 5).

slide-105
SLIDE 105

Distance

slide-106
SLIDE 106

Distance

A notion of length of vectors determines a notion of distance in Rn:

slide-107
SLIDE 107

Distance

A notion of length of vectors determines a notion of distance in Rn: The distance between a and b is ||b − a||.

slide-108
SLIDE 108

Distance

A notion of length of vectors determines a notion of distance in Rn: The distance between a and b is ||b − a||.

Example

The distance between (1, 2, 3) and (3, 2, 1) is

slide-109
SLIDE 109

Distance

A notion of length of vectors determines a notion of distance in Rn: The distance between a and b is ||b − a||.

Example

The distance between (1, 2, 3) and (3, 2, 1) is ||(1, 2, 3) − (3, 2, 1)|| = ||(−2, 0, 2)|| =

  • (−2)2 + 02 + 22 = 2

√ 2

slide-110
SLIDE 110

Orthogonality

slide-111
SLIDE 111

Orthogonality

Recall: for a triangle with sides of lengths a, b, c,

slide-112
SLIDE 112

Orthogonality

Recall: for a triangle with sides of lengths a, b, c, we have the relation a2 + b2 = c2 if and only if the angle between the sides of lengths a and b is a right angle.

slide-113
SLIDE 113

Orthogonality

Recall: for a triangle with sides of lengths a, b, c, we have the relation a2 + b2 = c2 if and only if the angle between the sides of lengths a and b is a right angle.

slide-114
SLIDE 114

Orthogonality

Recall: for a triangle with sides of lengths a, b, c, we have the relation a2 + b2 = c2 if and only if the angle between the sides of lengths a and b is a right angle. So in R2, the vectors a and b are at a right angle if and only if ||a||2 + ||b||2 = ||a − b||2

slide-115
SLIDE 115

Orthogonality

In higher dimensions, we turn this fact into a...

slide-116
SLIDE 116

Orthogonality

In higher dimensions, we turn this fact into a...

Definition

In Rn, the vectors a and b are orthogonal if and only if ||a||2 + ||b||2 = ||a − b||2

slide-117
SLIDE 117

Orthogonality

slide-118
SLIDE 118

Orthogonality

Expanding these out, for a = (a1, . . . , an) and b = (b1, . . . , bn):

slide-119
SLIDE 119

Orthogonality

Expanding these out, for a = (a1, . . . , an) and b = (b1, . . . , bn): ||a||2 + ||b||2 =

  • i

a2

i + b2 i

||a − b||2 =

  • i

a2

i + b2 i − 2aibi

slide-120
SLIDE 120

Orthogonality

Expanding these out, for a = (a1, . . . , an) and b = (b1, . . . , bn): ||a||2 + ||b||2 =

  • i

a2

i + b2 i

||a − b||2 =

  • i

a2

i + b2 i − 2aibi

We find ||a||2 + ||b||2 − ||a − b||2 = 2

  • i

aibi

slide-121
SLIDE 121

The dot product

So a and b are orthogonal if and only if

i aibi = 0.

slide-122
SLIDE 122

The dot product

So a and b are orthogonal if and only if

i aibi = 0.

Definition

For vectors a = (a1, . . . , an) and b = (b1, . . . , bn), we write a · b = a1b1 + · · · + anbn This is called the dot product.

slide-123
SLIDE 123

The dot product

So a and b are orthogonal if and only if

i aibi = 0.

Definition

For vectors a = (a1, . . . , an) and b = (b1, . . . , bn), we write a · b = a1b1 + · · · + anbn This is called the dot product. The vectors a, b ∈ Rn are orthogonal if and only if a · b = 0.

slide-124
SLIDE 124

Dot product properties

slide-125
SLIDE 125

Dot product properties

Observe: a · a = (a1, . . . , an) · (a1, . . . , an) = a2

1 + · · · + a2 n = ||a||2

slide-126
SLIDE 126

Dot product properties

Observe: a · a = (a1, . . . , an) · (a1, . . . , an) = a2

1 + · · · + a2 n = ||a||2

||a+b|| =

  • i

(ai +bi)2 =

  • i

a2

i +2aibi +b2 i = ||a||2+||b||2+2(a·b)

slide-127
SLIDE 127

Dot product properties

Observe: a · a = (a1, . . . , an) · (a1, . . . , an) = a2

1 + · · · + a2 n = ||a||2

||a+b|| =

  • i

(ai +bi)2 =

  • i

a2

i +2aibi +b2 i = ||a||2+||b||2+2(a·b)

a · (cv + dw) = c(a · v) + d(a · w)

slide-128
SLIDE 128

Try it yourself!

slide-129
SLIDE 129

Try it yourself!

Compute the dot products:

slide-130
SLIDE 130

Try it yourself!

Compute the dot products: (1, 2) · (3, 4) =

slide-131
SLIDE 131

Try it yourself!

Compute the dot products: (1, 2) · (3, 4) = 1 · 3 + 2 · 4 = 11

slide-132
SLIDE 132

Try it yourself!

Compute the dot products: (1, 2) · (3, 4) = 1 · 3 + 2 · 4 = 11 (2, −1, 3) · (1, 2, 4) =

slide-133
SLIDE 133

Try it yourself!

Compute the dot products: (1, 2) · (3, 4) = 1 · 3 + 2 · 4 = 11 (2, −1, 3) · (1, 2, 4) = 2 · 1 + −1 · 2 + 3 · 4 = 12

slide-134
SLIDE 134

Try it yourself!

slide-135
SLIDE 135

Try it yourself!

Are they orthogonal?

slide-136
SLIDE 136

Try it yourself!

Are they orthogonal? (1, 1, 0), (0, 0, 1)?

slide-137
SLIDE 137

Try it yourself!

Are they orthogonal? (1, 1, 0), (0, 0, 1)? The dot product is (1, 1, 0) · (0, 0, 1) = 1 · 0 + 1 · 0 + 0 · 1 = 0 so yes.

slide-138
SLIDE 138

Try it yourself!

Are they orthogonal? (1, 1, 0), (0, 0, 1)? The dot product is (1, 1, 0) · (0, 0, 1) = 1 · 0 + 1 · 0 + 0 · 1 = 0 so yes. (3, 1, 4), (−2, 1, 1)?

slide-139
SLIDE 139

Try it yourself!

Are they orthogonal? (1, 1, 0), (0, 0, 1)? The dot product is (1, 1, 0) · (0, 0, 1) = 1 · 0 + 1 · 0 + 0 · 1 = 0 so yes. (3, 1, 4), (−2, 1, 1)? The dot product is 3 · (−2) + 1 · 1 + 4 · 1 = −1 so no.

slide-140
SLIDE 140

The law of cosines

slide-141
SLIDE 141

Angles

Thus if θ is the angle between a and b, ||b − a||2 = ||a||2 + ||b||2 − 2||a||||b|| cos(θ)

slide-142
SLIDE 142

Angles

Thus if θ is the angle between a and b, ||b − a||2 = ||a||2 + ||b||2 − 2||a||||b|| cos(θ) On the other hand, we saw ||b − a||2 = ||a||2 + ||b||2 − 2(a · b)

slide-143
SLIDE 143

Angles

Thus if θ is the angle between a and b, ||b − a||2 = ||a||2 + ||b||2 − 2||a||||b|| cos(θ) On the other hand, we saw ||b − a||2 = ||a||2 + ||b||2 − 2(a · b) Thus a · b = ||a||||b|| cos(θ)

slide-144
SLIDE 144

Angles

slide-145
SLIDE 145

Angles

Example

The angle θ between the vectors (1, 2) and (3, 4) can be determined by

slide-146
SLIDE 146

Angles

Example

The angle θ between the vectors (1, 2) and (3, 4) can be determined by (1, 2) · (3, 4) = ||(1, 2)||||(3, 4)|| cos(θ)

slide-147
SLIDE 147

Angles

Example

The angle θ between the vectors (1, 2) and (3, 4) can be determined by (1, 2) · (3, 4) = ||(1, 2)||||(3, 4)|| cos(θ) We compute (1, 2) · (3, 4) = 11 ||(1, 2)|| = √ 5 ||(3, 4)|| = 5

slide-148
SLIDE 148

Angles

Example

The angle θ between the vectors (1, 2) and (3, 4) can be determined by (1, 2) · (3, 4) = ||(1, 2)||||(3, 4)|| cos(θ) We compute (1, 2) · (3, 4) = 11 ||(1, 2)|| = √ 5 ||(3, 4)|| = 5 θ = cos−1 11 5 √ 5