SLIDE 1
Linear algebra and differential equations (Math 54): Lecture 16 - - PowerPoint PPT Presentation
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 2
SLIDE 3
Hello and welcome to class!
Last time
SLIDE 4
Hello and welcome to class!
Last time
We had been discussing orthogonality,
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
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
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
1d case
Given a basis of a 1-d vector space V
SLIDE 9
1d case
Given a basis of a 1-d vector space V I.e., a nonzero vector v ∈ V
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
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
1d case: example
Given the basis (1, 2, 3, 4) of the 1-d vector space Span((1, 2, 3, 4))
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
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
2d case
Given a basis of a 2-d vector space V
SLIDE 16
2d case
Given a basis of a 2-d vector space V I.e., two nonzero vectors v, w ∈ V
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
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
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
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
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
2d example
Given the basis (1, 2, 3), (2, 3, 1) of the 2d space they span
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
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
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
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
Try it yourself
Find an orthonormal basis of the span of (1, 1, 0) and (1, 0, 1).
SLIDE 28
Gram-Schmidt
Consider a vector space V ⊂ Rn with basis v1, v2, . . . , vk.
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
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
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
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
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
Gram-Schmidt
That is, from v1, . . . , vk, form:
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
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
Example
Apply the Gram-Schmidt process to (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1)
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
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
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
Example
u1 = (1, 1, 1, 0) u2 = 1 3(1, −2, 1, 3) v3 = (1, 1, 0, 1)
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
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
Try it yourself
Apply the Gram-Schmidt process to (1, 0, 0, 1), (1, 0, 1, 0), (1, 1, 0, 0)
SLIDE 45
Orthogonal matrices
For a square matrix A, the following are equivalent:
SLIDE 46
Orthogonal matrices
For a square matrix A, the following are equivalent:
◮ A has orthonormal rows
SLIDE 47
Orthogonal matrices
For a square matrix A, the following are equivalent:
◮ A has orthonormal rows ◮ AAT = I
SLIDE 48
Orthogonal matrices
For a square matrix A, the following are equivalent:
◮ A has orthonormal rows ◮ AAT = I ◮ AT = A−1
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
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
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
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
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
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
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
QR decomposition
The vectors vi could have been anything, so:
- any
matrix
- =
- lower
triangular
- rthogonal
rows
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
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.