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

linear algebra and differential equations math 54 lecture
SMART_READER_LITE
LIVE PREVIEW

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

Linear algebra and differential equations (Math 54): Lecture 16 Vivek Shende March 19, 2019 Hello and welcome to class! Hello and welcome to class! Last time Hello and welcome to class! Last time We had been discussing orthogonality, Hello


slide-1
SLIDE 1

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

Vivek Shende March 19, 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 had been discussing orthogonality,

slide-5
SLIDE 5

Hello and welcome to class!

Last time

We had been discussing orthogonality, and in particular how to compute orthogonal projections in term of an orthonormal bases.

slide-6
SLIDE 6

Hello and welcome to class!

Last time

We had been discussing orthogonality, and in particular how to compute orthogonal projections in term of an orthonormal bases.

This time

slide-7
SLIDE 7

Hello and welcome to class!

Last time

We had been discussing orthogonality, and in particular how to compute orthogonal projections in term of an orthonormal bases.

This time

We will discuss how to produce an orthonormal basis.

slide-8
SLIDE 8

1d case

Given a basis of a 1-d vector space V

slide-9
SLIDE 9

1d case

Given a basis of a 1-d vector space V I.e., a nonzero vector v ∈ V

slide-10
SLIDE 10

1d case

Given a basis of a 1-d vector space V I.e., a nonzero vector v ∈ V You can get an orthonormal basis

slide-11
SLIDE 11

1d case

Given a basis of a 1-d vector space V I.e., a nonzero vector v ∈ V You can get an orthonormal basis v ||v||

slide-12
SLIDE 12

1d case: example

Given the basis (1, 2, 3, 4) of the 1-d vector space Span((1, 2, 3, 4))

slide-13
SLIDE 13

1d case: example

Given the basis (1, 2, 3, 4) of the 1-d vector space Span((1, 2, 3, 4)) You can get an orthonormal basis

slide-14
SLIDE 14

1d case: example

Given the basis (1, 2, 3, 4) of the 1-d vector space Span((1, 2, 3, 4)) You can get an orthonormal basis (1, 2, 3, 4) ||(1, 2, 3, 4)|| = 1 √ 30 (1, 2, 3, 4)

slide-15
SLIDE 15

2d case

Given a basis of a 2-d vector space V

slide-16
SLIDE 16

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V

slide-17
SLIDE 17

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V , neither a multiple of the other

slide-18
SLIDE 18

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V , neither a multiple of the other First we want to modify w so it becomes orthogonal to v

slide-19
SLIDE 19

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V , neither a multiple of the other First we want to modify w so it becomes orthogonal to v, by projection:

slide-20
SLIDE 20

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V , neither a multiple of the other First we want to modify w so it becomes orthogonal to v, by projection: w′ = w − w·v

v·v v

slide-21
SLIDE 21

2d case

Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V , neither a multiple of the other First we want to modify w so it becomes orthogonal to v, by projection: w′ = w − w·v

v·v v

Now normalize: v′ :=

v ||v||, and w′′ = w′ |w′|.

slide-22
SLIDE 22

2d example

Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span

slide-23
SLIDE 23

2d example

Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span First project (2, 3, 1) to the orthogonal complement of (1, 2, 3).

slide-24
SLIDE 24

2d example

Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span First project (2, 3, 1) to the orthogonal complement of (1, 2, 3). (2, 3, 1) − (2, 3, 1) · (1, 2, 3) (1, 2, 3) · (1, 2, 3)(1, 2, 3) = (2, 3, 1) − 11 14(1, 2, 3)

slide-25
SLIDE 25

2d example

Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span First project (2, 3, 1) to the orthogonal complement of (1, 2, 3). (2, 3, 1) − (2, 3, 1) · (1, 2, 3) (1, 2, 3) · (1, 2, 3)(1, 2, 3) = (2, 3, 1) − 11 14(1, 2, 3) = 1 14(17, 20, −19)

slide-26
SLIDE 26

2d example

Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span First project (2, 3, 1) to the orthogonal complement of (1, 2, 3). (2, 3, 1) − (2, 3, 1) · (1, 2, 3) (1, 2, 3) · (1, 2, 3)(1, 2, 3) = (2, 3, 1) − 11 14(1, 2, 3) = 1 14(17, 20, −19) And then normalize. 1 √ 14 (2, 3, 4) 1 √ 172 + 202 + 192 (17, 20, −19)

slide-27
SLIDE 27

Try it yourself

Find an orthonormal basis of the span of (1, 1, 0) and (1, 0, 1).

slide-28
SLIDE 28

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk.

slide-29
SLIDE 29

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk. Project v2 to the subspace orthogonal to v1

slide-30
SLIDE 30

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk. Project v2 to the subspace orthogonal to v1 Project v3 to the subspace orthogonal to v1, v2

slide-31
SLIDE 31

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk. Project v2 to the subspace orthogonal to v1 Project v3 to the subspace orthogonal to v1, v2 Project v3 to the subspace orthogonal to v1, v2, v3

slide-32
SLIDE 32

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk. Project v2 to the subspace orthogonal to v1 Project v3 to the subspace orthogonal to v1, v2 Project v3 to the subspace orthogonal to v1, v2, v3 Etc.

slide-33
SLIDE 33

Gram-Schmidt

Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk. Project v2 to the subspace orthogonal to v1 Project v3 to the subspace orthogonal to v1, v2 Project v3 to the subspace orthogonal to v1, v2, v3 Etc. Rescale everything to ensure they are unit vectors.

slide-34
SLIDE 34

Gram-Schmidt

That is, from v1, . . . , vk, form:

slide-35
SLIDE 35

Gram-Schmidt

That is, from v1, . . . , vk, form: u1 = v1 u2 = v2 − v2 · u1 u1 · u1

  • u1

u3 = v3 − v3 · u1 u1 · u1

  • u1 −

v3 · u2 u2 · u2

  • u2

u4 = v4 − v4 · u1 u1 · u1

  • u1 −

v4 · u2 u2 · u2

  • u2 −

v4 · u3 u3 · u3

  • u3

. . .

slide-36
SLIDE 36

Gram-Schmidt

That is, from v1, . . . , vk, form: u1 = v1 u2 = v2 − v2 · u1 u1 · u1

  • u1

u3 = v3 − v3 · u1 u1 · u1

  • u1 −

v3 · u2 u2 · u2

  • u2

u4 = v4 − v4 · u1 u1 · u1

  • u1 −

v4 · u2 u2 · u2

  • u2 −

v4 · u3 u3 · u3

  • u3

. . . And then rescale all the ui.

slide-37
SLIDE 37

Example

Apply the Gram-Schmidt process to (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1)

slide-38
SLIDE 38

Example

Apply the Gram-Schmidt process to (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1) We take v1 = (1, 1, 1, 0), v2 = (1, 0, 1, 1), v3 = (1, 1, 0, 1).

slide-39
SLIDE 39

Example

Apply the Gram-Schmidt process to (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1) We take v1 = (1, 1, 1, 0), v2 = (1, 0, 1, 1), v3 = (1, 1, 0, 1). Then u1 = v1 = (1, 1, 1, 0),

slide-40
SLIDE 40

Example

Apply the Gram-Schmidt process to (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1) We take v1 = (1, 1, 1, 0), v2 = (1, 0, 1, 1), v3 = (1, 1, 0, 1). Then u1 = v1 = (1, 1, 1, 0), u2 = v2 − v2 · u1 u1 · u1

  • u1 = (1, 0, 1, 1)− 2

3(1, 1, 1, 0) = 1 3(1, −2, 1, 3)

slide-41
SLIDE 41

Example

u1 = (1, 1, 1, 0) u2 = 1 3(1, −2, 1, 3) v3 = (1, 1, 0, 1)

slide-42
SLIDE 42

Example

u1 = (1, 1, 1, 0) u2 = 1 3(1, −2, 1, 3) v3 = (1, 1, 0, 1) u3 = v3 − v3 · u1 u1 · u1

  • u1 −

v3 · u2 u2 · u2

  • u2

= (1, 1, 0, 1) − 2 3(1, 1, 1, 0) − 2 15(1, −2, 1, 3) = 1 15((15, 15, 0, 15) − (10, 10, 10, 0) − (2, −4, 2, 6)) = 1 15(3, 9, −12, 9)

slide-43
SLIDE 43

Example

u1 = (1, 1, 1, 0) u2 = 1 3(1, −2, 1, 3) v3 = (1, 1, 0, 1) u3 = v3 − v3 · u1 u1 · u1

  • u1 −

v3 · u2 u2 · u2

  • u2

= (1, 1, 0, 1) − 2 3(1, 1, 1, 0) − 2 15(1, −2, 1, 3) = 1 15((15, 15, 0, 15) − (10, 10, 10, 0) − (2, −4, 2, 6)) = 1 15(3, 9, −12, 9) Finally, rescaling: 1 √ 3 (1, 1, 1, 0) 1 √ 15 (1, −2, 1, 3) (3, 9, −12, −9) √ 32 + 92 + 122 + 92

slide-44
SLIDE 44

Try it yourself

Apply the Gram-Schmidt process to (1, 0, 0, 1), (1, 0, 1, 0), (1, 1, 0, 0)

slide-45
SLIDE 45

Orthogonal matrices

For a square matrix A, the following are equivalent:

slide-46
SLIDE 46

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows

slide-47
SLIDE 47

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I

slide-48
SLIDE 48

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1

slide-49
SLIDE 49

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1 ◮ ATA = I

slide-50
SLIDE 50

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1 ◮ ATA = I ◮ A has orthonormal columns

slide-51
SLIDE 51

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1 ◮ ATA = I ◮ A has orthonormal columns

Such matrices are called orthogonal.

slide-52
SLIDE 52

Orthogonal matrices

For a square matrix A, the following are equivalent:

◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1 ◮ ATA = I ◮ A has orthonormal columns

Such matrices are called orthogonal. They also preserve dot products: (Av) · (Aw) = (Av)T(Aw) = vTATAw = vTw = v · w

slide-53
SLIDE 53

QR decomposition

Observe that the steps we took in the Gram-Schmidt process each involve adding multiples of earlier vectors to later ones.

slide-54
SLIDE 54

QR decomposition

Observe that the steps we took in the Gram-Schmidt process each involve adding multiples of earlier vectors to later ones.      u1 u2 . . . uk      =

  • lower

triangular

    v1 v2 . . . vk     

slide-55
SLIDE 55

QR decomposition

Observe that the steps we took in the Gram-Schmidt process each involve adding multiples of earlier vectors to later ones.      u1 u2 . . . uk      =

  • lower

triangular

    v1 v2 . . . vk      The inverse of a lower triangular matrix is lower triangular, so:      v1 v2 . . . vk      =

  • lower

triangular

    u1 u2 . . . uk     

slide-56
SLIDE 56

QR decomposition

The vectors vi could have been anything, so:

  • any

matrix

  • =
  • lower

triangular

  • rthogonal

rows

slide-57
SLIDE 57

QR decomposition

The vectors vi could have been anything, so:

  • any

matrix

  • =
  • lower

triangular

  • rthogonal

rows

  • Taking transposes:
  • any

matrix

  • =
  • rthogonal

columns upper triangular

slide-58
SLIDE 58

QR decomposition

The vectors vi could have been anything, so:

  • any

matrix

  • =
  • lower

triangular

  • rthogonal

rows

  • Taking transposes:
  • any

matrix

  • =
  • rthogonal

columns upper triangular

  • This is called the QR decomposition.