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

linear algebra and differential equations math 54 lecture
SMART_READER_LITE
LIVE PREVIEW

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

Linear algebra and differential equations (Math 54): Lecture 5 Vivek Shende February 5, 2019 Hello and welcome to class! Hello and welcome to class! Last time We discussed linear transformations, and their matrix representations. Hello and


slide-1
SLIDE 1

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

Vivek Shende February 5, 2019

slide-2
SLIDE 2

Hello and welcome to class!

slide-3
SLIDE 3

Hello and welcome to class!

Last time

We discussed linear transformations, and their matrix representations.

slide-4
SLIDE 4

Hello and welcome to class!

Last time

We discussed linear transformations, and their matrix representations.

Today

We’ll review span, linear independence, and various ways to understand them, and then introduce more arithmetic operations

  • n matrices.
slide-5
SLIDE 5

A has r rows and c columns; A : Rc → Rr

Columns below have equivalent conditions (except in parethesis) Ax = 0 implies x = 0 pivot in every column columns linearly independent rows span all of Rc distinct points to distinct points (can only happen if c ≤ r) Ax = b has solutions for any b pivot in every row rows linearly independent columns span all of Rr hits all of Rr. (can only happen if r ≤ c) If A is square, i.e. r = c, there’s a pivot in every row if and only if there’s a pivot in every column so these are all equivalent.

slide-6
SLIDE 6

Span and linear independence

In particular, a collection of d vectors in Rn

slide-7
SLIDE 7

Span and linear independence

In particular, a collection of d vectors in Rn can only span if d ≥ n,

slide-8
SLIDE 8

Span and linear independence

In particular, a collection of d vectors in Rn can only span if d ≥ n, and can only be linearly independent if d ≤ n.

slide-9
SLIDE 9

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?
slide-10
SLIDE 10

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many.

slide-11
SLIDE 11

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.

slide-12
SLIDE 12

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1  

slide-13
SLIDE 13

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1  

slide-14
SLIDE 14

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6  

slide-15
SLIDE 15

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3  

slide-16
SLIDE 16

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence,

slide-17
SLIDE 17

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence, and the final matrix has a zero row,

slide-18
SLIDE 18

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence, and the final matrix has a zero row, so the original rows were not linearly independent.

slide-19
SLIDE 19

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence, and the final matrix has a zero row, so the original rows were not linearly

  • independent. You can also see: there’s not a pivot in every row,
slide-20
SLIDE 20

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence, and the final matrix has a zero row, so the original rows were not linearly

  • independent. You can also see: there’s not a pivot in every row,

the columns don’t span, etc.

slide-21
SLIDE 21

Example

Are the vectors 1 2

  • ,
  • 1

−1

  • ,

5 1

  • linearly independent?

Definitely not, there are too many. Let’s put them in a matrix and row reduce anyway.   1 2 1 −1 5 1   →   1 −1 1 2 5 1   →   1 −1 3 6   →   1 −1 3   The row operations do not affect linear independence, and the final matrix has a zero row, so the original rows were not linearly

  • independent. You can also see: there’s not a pivot in every row,

the columns don’t span, etc. But note: the columns are linearly independent.

slide-22
SLIDE 22

Example

Are the vectors   1 2 3   ,   1 −1 1   ,   5 1 9   linearly independent? Put them in a matrix and row reduce!   1 2 3 1 −1 1 5 1 9   →   1 −1 1 1 2 3 5 1 9   →   1 −1 1 3 2 6 4   →   1 −1 1 3 2   The row operations do not affect linear independence, and the final matrix has a zero row, so the original rows were not linearly

  • independent. You can also see: there’s not a pivot in every row,

the columns don’t span, etc. But note: the columns are not linearly independent.

slide-23
SLIDE 23

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent?

slide-24
SLIDE 24

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!

slide-25
SLIDE 25

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!   1 2 3 1 1 −1 1 1 5 1 9 1  

slide-26
SLIDE 26

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!   1 2 3 1 1 −1 1 1 5 1 9 1   →   1 −1 1 1 1 2 3 1 5 1 9 1   →

slide-27
SLIDE 27

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!   1 2 3 1 1 −1 1 1 5 1 9 1   →   1 −1 1 1 1 2 3 1 5 1 9 1   →   1 −1 1 1 3 2 −1 6 4 −4  

slide-28
SLIDE 28

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!   1 2 3 1 1 −1 1 1 5 1 9 1   →   1 −1 1 1 1 2 3 1 5 1 9 1   →   1 −1 1 1 3 2 −1 6 4 −4   →   1 −1 1 1 3 2 −1 −2  

slide-29
SLIDE 29

Try it yourself

Are the vectors     1 2 3 1     ,     1 −1 1 1     ,     5 1 9 1     linearly independent? Put them in a matrix and row reduce!   1 2 3 1 1 −1 1 1 5 1 9 1   →   1 −1 1 1 1 2 3 1 5 1 9 1   →   1 −1 1 1 3 2 −1 6 4 −4   →   1 −1 1 1 3 2 −1 −2   The final echelon matrix has no zero row, so the original rows are linearly independent.

slide-30
SLIDE 30

A has r rows and c columns; A : Rc → Rr

Columns below have equivalent conditions (except in parethesis) Ax = 0 implies x = 0 pivot in every column columns linearly independent rows span all of Rc distinct points to distinct points (can only happen if c ≤ r) Ax = b has solutions for any b pivot in every row rows linearly independent columns span all of Rr hits all of Rr. (can only happen if r ≤ c) If A is square, i.e. r = c, there’s a pivot in every row if and only if there’s a pivot in every column so these are all equivalent.

slide-31
SLIDE 31
slide-32
SLIDE 32

Scalar multiplication

slide-33
SLIDE 33

Scalar multiplication

Just like for vectors, multiplying a matrix by a scalar just means multiplying every element of the matrix by that scalar.

slide-34
SLIDE 34

Scalar multiplication

Just like for vectors, multiplying a matrix by a scalar just means multiplying every element of the matrix by that scalar. 3 · 1 2 3 4

  • =

3 6 9 12

slide-35
SLIDE 35

Scalar multiplication

Just like for vectors, multiplying a matrix by a scalar just means multiplying every element of the matrix by that scalar. 3 · 1 2 3 4

  • =

3 6 9 12

  • −2 ·
  • 1

−1 −2 3 1

  • =

−2 2 4 −6 −2

slide-36
SLIDE 36

Scalar multiplication

Just like for vectors, multiplying a matrix by a scalar just means multiplying every element of the matrix by that scalar. 3 · 1 2 3 4

  • =

3 6 9 12

  • −2 ·
  • 1

−1 −2 3 1

  • =

−2 2 4 −6 −2

  • 0 ·

2 3 5 7 11 13

  • =
slide-37
SLIDE 37

Matrix addition

And you can add matrices of the same size by adding them termwise.

slide-38
SLIDE 38

Matrix addition

And you can add matrices of the same size by adding them termwise. 1 −1 3 4

  • +

2 4 1 1 2 4

  • =

3 3 1 1 5 8

slide-39
SLIDE 39

Matrix addition

And you can add matrices of the same size by adding them termwise. 1 −1 3 4

  • +

2 4 1 1 2 4

  • =

3 3 1 1 5 8

 1 2 3 1 4   +   4 3 2 −1 3   =   5 5 2 2 4 4  

slide-40
SLIDE 40

Matrix addition

And you can add matrices of the same size by adding them termwise. 1 −1 3 4

  • +

2 4 1 1 2 4

  • =

3 3 1 1 5 8

 1 2 3 1 4   +   4 3 2 −1 3   =   5 5 2 2 4 4     1 2 3 1 4   + 1 −1 3 4

slide-41
SLIDE 41

Matrix addition

And you can add matrices of the same size by adding them termwise. 1 −1 3 4

  • +

2 4 1 1 2 4

  • =

3 3 1 1 5 8

 1 2 3 1 4   +   4 3 2 −1 3   =   5 5 2 2 4 4     1 2 3 1 4   + 1 −1 3 4

  • they’re not the same size
slide-42
SLIDE 42

Matrix transpose

slide-43
SLIDE 43

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal.

slide-44
SLIDE 44

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal. This makes the old first column

slide-45
SLIDE 45

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal. This makes the old first column into the new first row, etcetera.

slide-46
SLIDE 46

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal. This makes the old first column into the new first row, etcetera.   2 4 1 3 −1 8  

T

= 2 1 −1 4 3 8

slide-47
SLIDE 47

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal. This makes the old first column into the new first row, etcetera.   2 4 1 3 −1 8  

T

= 2 1 −1 4 3 8

 1 2 3  

T

=

  • 1

2 3

slide-48
SLIDE 48

Matrix transpose

The transpose of the matrix is what you get by reflecting along a northwest-southeast diagonal. This makes the old first column into the new first row, etcetera.   2 4 1 3 −1 8  

T

= 2 1 −1 4 3 8

 1 2 3  

T

=

  • 1

2 3

  • 1

3 3 2 T = 1 3 3 2

slide-49
SLIDE 49

Matrix entries

We write Mi,j or Mij for the entry in the i′th row and j′th column

  • f the matrix M.
slide-50
SLIDE 50

Matrix entries

We write Mi,j or Mij for the entry in the i′th row and j′th column

  • f the matrix M.

A = 3 3 1 1 5 8

  • A1,1 = 3,

A2,3 = 8

slide-51
SLIDE 51

Matrix multiplication

Given two matrices, A, B,

slide-52
SLIDE 52

Matrix multiplication

Given two matrices, A, B, if A has as many columns as B has rows,

slide-53
SLIDE 53

Matrix multiplication

Given two matrices, A, B, if A has as many columns as B has rows, then there is a matrix product AB.

slide-54
SLIDE 54

Matrix multiplication

Given two matrices, A, B, if A has as many columns as B has rows, then there is a matrix product AB. The matrix product is determined by the formula (AB)ij = Ai1B1j + Ai2B2j + · · · + AinBnj where n is the number of columns of A, or of rows of B.

slide-55
SLIDE 55

Matrix multiplication

Given two matrices, A, B, if A has as many columns as B has rows, then there is a matrix product AB. The matrix product is determined by the formula (AB)ij = Ai1B1j + Ai2B2j + · · · + AinBnj where n is the number of columns of A, or of rows of B. AB has as many rows as A

slide-56
SLIDE 56

Matrix multiplication

Given two matrices, A, B, if A has as many columns as B has rows, then there is a matrix product AB. The matrix product is determined by the formula (AB)ij = Ai1B1j + Ai2B2j + · · · + AinBnj where n is the number of columns of A, or of rows of B. AB has as many rows as A and as many columns as B.

slide-57
SLIDE 57

Matrix multiplication

  1 2 1 2 −1 1 3 2 3 1       1 2 1 1 2 3     =   ? ? ? ? ? ?  

slide-58
SLIDE 58

Matrix multiplication

  1 2 1 2 −1 1 3 2 3 1       1 2 1 1 2 3     =   6   1 × 1 + 2 × 2 + 1 × 1 + 2 × 0 = 6

slide-59
SLIDE 59

Matrix multiplication

  1 2 1 2 − 1 1 3 2 3 1       1 2 1 1 2 3     =   6   −1 × 1 + 0 × 2 + 1 × 1 + 3 × 0 = 0

slide-60
SLIDE 60

Matrix multiplication

  1 2 1 2 −1 1 3 2 3 1       1 2 1 1 2 3     =   6 8   2 × 1 + 3 × 2 + 0 × 1 + 1 × 0 = 8

slide-61
SLIDE 61

Matrix multiplication

  1 2 1 2 −1 1 3 2 3 1       1 2 1 1 2 3     =   6 10 8   1 × 0 + 2 × 1 + 1 × 2 + 2 × 3 = 10

slide-62
SLIDE 62

Matrix multiplication

  1 2 1 2 − 1 1 3 2 3 1       1 2 1 1 2 3     =   6 10 11 8   −1 × 0 + 0 × 1 + 1 × 2 + 3 × 3 = 11

slide-63
SLIDE 63

Matrix multiplication

  1 2 1 2 −1 1 3 2 3 1       1 2 1 1 2 3     =   6 10 11 8 6   2 × 0 + 3 × 1 + 0 × 2 + 1 × 3 = 6

slide-64
SLIDE 64

Matrix multiplication

Another way to see it: Write the second matrix as a “row of columns” B =

  • b1

b2 · · · bn

  • Then:

AB = A

  • b1

b2 · · · bn

  • =
  • Ab1

Ab2 · · · Abn

  • The matrix-vector product is a special case.
slide-65
SLIDE 65

Try it yourself

  • 1

2 −1 1 3 1 1 2

  • = ?

3 1 1 2 1 2 −1 1

  • = ?
slide-66
SLIDE 66

Matrix multiplication

The matrix product is associative,

slide-67
SLIDE 67

Matrix multiplication

The matrix product is associative, distributes over matrix addition,

slide-68
SLIDE 68

Matrix multiplication

The matrix product is associative, distributes over matrix addition, but is not generally commutative.

slide-69
SLIDE 69

Matrix multiplication

The matrix product is associative, distributes over matrix addition, but is not generally commutative. Indeed, the dimensions of A and B can be such that AB makes sense but BA does not;

slide-70
SLIDE 70

Matrix multiplication

The matrix product is associative, distributes over matrix addition, but is not generally commutative. Indeed, the dimensions of A and B can be such that AB makes sense but BA does not; and we saw on the last slide that even if they both make sense, they need not be equal.

slide-71
SLIDE 71

Try it yourself

1 1 1 −1 −2 3 1

  • =

?

  • 1

−1 −2 3 1   1 1 1   = ?

slide-72
SLIDE 72

The identity matrix

1 1 1 −1 −2 3 1

  • =
  • 1

−1 −2 3 1

  • 1

−1 −2 3 1   1 1 1   =

  • 1

−1 −2 3 1

slide-73
SLIDE 73

The identity matrix

We write In for the matrix with 1’s along the diagonal, and zeroes everywhere else.

slide-74
SLIDE 74

The identity matrix

We write In for the matrix with 1’s along the diagonal, and zeroes everywhere else. I1 = [1], I2 = 1 1

  • ,

I3 =   1 1 1  

slide-75
SLIDE 75

The identity matrix

We write In for the matrix with 1’s along the diagonal, and zeroes everywhere else. I1 = [1], I2 = 1 1

  • ,

I3 =   1 1 1   If In · M is defined, i.e., M has n rows, then In · M = M

slide-76
SLIDE 76

The identity matrix

We write In for the matrix with 1’s along the diagonal, and zeroes everywhere else. I1 = [1], I2 = 1 1

  • ,

I3 =   1 1 1   If In · M is defined, i.e., M has n rows, then In · M = M If M · Im is defined, i.e., M has m columns, then M · Im = M

slide-77
SLIDE 77

The identity matrix

We write In for the matrix with 1’s along the diagonal, and zeroes everywhere else. I1 = [1], I2 = 1 1

  • ,

I3 =   1 1 1   Note that the identity matrix In is the unique reduced echelon n × n matrix with a pivot in every row (or equivalently, every column).

slide-78
SLIDE 78

Try it yourself

  1 1 1 1     1 2 3 4 5 6 7 8 9   = ?   1 1 1     1 2 3 4 5 6 7 8 9   = ?   1 2 1     1 2 3 4 5 6 7 8 9   = ?

slide-79
SLIDE 79

Try it yourself

  1 1 1 1     1 2 3 4 5 6 7 8 9   =   1 2 3 4 5 6 11 13 15     1 1 1     1 2 3 4 5 6 7 8 9   =   4 5 6 1 2 3 7 8 9     1 2 1     1 2 3 4 5 6 7 8 9   =   1 2 3 8 10 12 7 8 9  

slide-80
SLIDE 80

Elementary row operations

You can do an elementary row operation

slide-81
SLIDE 81

Elementary row operations

You can do an elementary row operation by multiplying on the left

slide-82
SLIDE 82

Elementary row operations

You can do an elementary row operation by multiplying on the left by the matrix which is obtained by performing that row operation

  • n the identity matrix.
slide-83
SLIDE 83

Try it yourself!

1 2 1 3 3 −2 −1 1

  • = ?
  • 3

−2 −1 1 1 2 1 3

  • = ?
slide-84
SLIDE 84

Try it yourself!

1 2 1 3 3 −2 −1 1

  • =

1 1

  • 3

−2 −1 1 1 2 1 3

  • =

1 1

slide-85
SLIDE 85

Matrix inversion

If A is a matrix, we say A is invertible

slide-86
SLIDE 86

Matrix inversion

If A is a matrix, we say A is invertible if there is some other matrix B such that BA and AB are both identity matrices.

slide-87
SLIDE 87

Matrix inversion

If A is a matrix, we say A is invertible if there is some other matrix B such that BA and AB are both identity matrices. In this case we say that B is the inverse of A, and write it as A−1.

slide-88
SLIDE 88

Matrix inversion

If A is a matrix, we say A is invertible if there is some other matrix B such that BA and AB are both identity matrices. In this case we say that B is the inverse of A, and write it as A−1. The inverse is unique if it exists:

slide-89
SLIDE 89

Matrix inversion

If A is a matrix, we say A is invertible if there is some other matrix B such that BA and AB are both identity matrices. In this case we say that B is the inverse of A, and write it as A−1. The inverse is unique if it exists: if BA = I and AC = I

slide-90
SLIDE 90

Matrix inversion

If A is a matrix, we say A is invertible if there is some other matrix B such that BA and AB are both identity matrices. In this case we say that B is the inverse of A, and write it as A−1. The inverse is unique if it exists: if BA = I and AC = I then B = BI = B(AC) = (BA)C = IC = C

slide-91
SLIDE 91

Try it yourself!

Is the identity matrix invertible?

slide-92
SLIDE 92

Try it yourself!

Is the identity matrix invertible? yes In · In = In

slide-93
SLIDE 93

Matrix inversion

If A is an invertible matrix, then the following equations are equivalent: Ax = b x = A−1b

slide-94
SLIDE 94

Matrix inversion

If A is an invertible matrix, then the following equations are equivalent: Ax = b x = A−1b In particular,

slide-95
SLIDE 95

Matrix inversion

If A is an invertible matrix, then the following equations are equivalent: Ax = b x = A−1b In particular, Ax = 0 has only the zero solution x = A−10 = 0

slide-96
SLIDE 96

Matrix inversion

If A is an invertible matrix, then the following equations are equivalent: Ax = b x = A−1b In particular, Ax = 0 has only the zero solution x = A−10 = 0 For any b, the equation Ax = b has the solution x = A−1b.

slide-97
SLIDE 97

A has r rows and c columns; A : Rc → Rr

Columns below have equivalent conditions (except in parethesis) Ax = 0 implies x = 0 pivot in every column columns linearly independent rows span all of Rc

  • ne-to-one

(can only happen if c ≤ r) Ax = b has solutions for any b pivot in every row rows linearly independent columns span all of Rr

  • nto

(can only happen if r ≤ c) If A is square, i.e. r = c, there’s a pivot in every row if and only if there’s a pivot in every column so these are all equivalent.

slide-98
SLIDE 98

Matrix inversion

If A is an invertible matrix,

slide-99
SLIDE 99

Matrix inversion

If A is an invertible matrix, then A is square,

slide-100
SLIDE 100

Matrix inversion

If A is an invertible matrix, then A is square, and all the conditions

  • n the previous slide hold.
slide-101
SLIDE 101

Matrix inversion

If A is an invertible matrix, then A is square, and all the conditions

  • n the previous slide hold.

Conversely, for a square matrix, being invertible is equivalent to any one of these conditions.

slide-102
SLIDE 102

Calculating the inverse

In particular, row-reducing an invertible matrix to reduced row-echelon form gives the identity matrix.

slide-103
SLIDE 103

Calculating the inverse

In particular, row-reducing an invertible matrix to reduced row-echelon form gives the identity matrix. This leads to an algorithm for calculating the inverse.

slide-104
SLIDE 104

Calculating the inverse

Row reduction is implemented by elementary matrices,

slide-105
SLIDE 105

Calculating the inverse

Row reduction is implemented by elementary matrices, so if M is invertible

slide-106
SLIDE 106

Calculating the inverse

Row reduction is implemented by elementary matrices, so if M is invertible — hence can be row reduced to the identity —

slide-107
SLIDE 107

Calculating the inverse

Row reduction is implemented by elementary matrices, so if M is invertible — hence can be row reduced to the identity — there exist some elementary matrices, E1, . . . , Ek such that Ek · · · E2E1M = I

slide-108
SLIDE 108

Calculating the inverse

Row reduction is implemented by elementary matrices, so if M is invertible — hence can be row reduced to the identity — there exist some elementary matrices, E1, . . . , Ek such that Ek · · · E2E1M = I Multiplying by M−1 on both sides,

slide-109
SLIDE 109

Calculating the inverse

Row reduction is implemented by elementary matrices, so if M is invertible — hence can be row reduced to the identity — there exist some elementary matrices, E1, . . . , Ek such that Ek · · · E2E1M = I Multiplying by M−1 on both sides, (or recalling that the inverse was unique) Ek · · · E2E1 = M−1

slide-110
SLIDE 110

Calculating the inverse

The equations Ek · · · E2E1 · M = I Ek · · · E2E1 · I = M−1

slide-111
SLIDE 111

Calculating the inverse

The equations Ek · · · E2E1 · M = I Ek · · · E2E1 · I = M−1 can be combined: putting the matrices M and I next to each other, Ek · · · E2E1 · [ M | I ] = [ I | M−1 ]

slide-112
SLIDE 112

Calculating the inverse

Now remember what Ei do:

slide-113
SLIDE 113

Calculating the inverse

Now remember what Ei do: they are row operations.

slide-114
SLIDE 114

Calculating the inverse

Now remember what Ei do: they are row operations. Thus, Ek · · · E2E1 · [ M | I ] = [ I | M−1 ]

slide-115
SLIDE 115

Calculating the inverse

Now remember what Ei do: they are row operations. Thus, Ek · · · E2E1 · [ M | I ] = [ I | M−1 ] is simply asserting that [ I | M−1 ] is obtained from [ M | I ] by row reduction!

slide-116
SLIDE 116

Calculating the inverse

To find the inverse of M,

slide-117
SLIDE 117

Calculating the inverse

To find the inverse of M,

◮ Form the matrix [M|I]

slide-118
SLIDE 118

Calculating the inverse

To find the inverse of M,

◮ Form the matrix [M|I] ◮ Row reduce it

slide-119
SLIDE 119

Calculating the inverse

To find the inverse of M,

◮ Form the matrix [M|I] ◮ Row reduce it ◮ If the result has the form [I|X] then X = M−1

slide-120
SLIDE 120

Calculating the inverse

To find the inverse of M,

◮ Form the matrix [M|I] ◮ Row reduce it ◮ If the result has the form [I|X] then X = M−1 ◮ If not, M was not invertible (not enough pivots).

slide-121
SLIDE 121

Calculating the inverse

Find the inverse of 1 2 1 3

  • .
slide-122
SLIDE 122

Calculating the inverse

Find the inverse of 1 2 1 3

  • .

First put it next to the identity in a matrix.

slide-123
SLIDE 123

Calculating the inverse

Find the inverse of 1 2 1 3

  • .

First put it next to the identity in a matrix. 1 2 1 1 3 1

slide-124
SLIDE 124

Calculating the inverse

Row reduce this matrix.

slide-125
SLIDE 125

Calculating the inverse

Row reduce this matrix. 1 2 1 1 3 1

slide-126
SLIDE 126

Calculating the inverse

Row reduce this matrix. 1 2 1 1 3 1

1 2 1 1 −1 1

slide-127
SLIDE 127

Calculating the inverse

Row reduce this matrix. 1 2 1 1 3 1

1 2 1 1 −1 1

1 3 −2 1 −1 1

slide-128
SLIDE 128

Calculating the inverse

Row reduce this matrix. 1 2 1 1 3 1

1 2 1 1 −1 1

1 3 −2 1 −1 1

  • Read off the inverse from the right of the matrix:

1 2 1 3 −1 =

  • 3

−2 −1 1

slide-129
SLIDE 129

Try it yourself!

Find inverses for the following matrices: 1 2 3 7 −1 = ? 1 2 3 6 −1 = ?

slide-130
SLIDE 130

Another way to think about calculating the inverse

slide-131
SLIDE 131

Another way to think about calculating the inverse

The columns of the matrix A−1 are A−1e1, A−1e2, . . . , A−1en.

slide-132
SLIDE 132

Another way to think about calculating the inverse

The columns of the matrix A−1 are A−1e1, A−1e2, . . . , A−1en. These are the solutions to the equations Ax = e1, Ax = e2, . . .

slide-133
SLIDE 133

Another way to think about calculating the inverse

The columns of the matrix A−1 are A−1e1, A−1e2, . . . , A−1en. These are the solutions to the equations Ax = e1, Ax = e2, . . . To find these solutions, we would row reduce the augmented matrixes [A|e1], [A|e2], . . .

slide-134
SLIDE 134

Another way to think about calculating the inverse

The columns of the matrix A−1 are A−1e1, A−1e2, . . . , A−1en. These are the solutions to the equations Ax = e1, Ax = e2, . . . To find these solutions, we would row reduce the augmented matrixes [A|e1], [A|e2], . . . Do them all at once by row reducing the matrix [A|e1|e2| · · · |en]

slide-135
SLIDE 135

Another way to think about calculating the inverse

The columns of the matrix A−1 are A−1e1, A−1e2, . . . , A−1en. These are the solutions to the equations Ax = e1, Ax = e2, . . . To find these solutions, we would row reduce the augmented matrixes [A|e1], [A|e2], . . . Do them all at once by row reducing the matrix [A|e1|e2| · · · |en] [e1|e2| · · · |en] is just the identity matrix, so row reduce [A|I].

slide-136
SLIDE 136

The inverse of a 2 × 2 matrix

Consider an arbitrary 2 × 2 matrix a b c d

  • .

a b 1 c d 1

1 b/a 1/a c d 1

1 b/a 1/a d − cb/a −c/a 1

1 b/a 1/a 1 −c/(ad − bc) a/(ad − bc)

1 d/(ad − bc) −b/(ad − bc) 1 −c/(ad − bc) a/(ad − bc)

slide-137
SLIDE 137

The inverse of a 2 × 2 matrix

The matrix a b c d

  • has an inverse if (and in fact only if)

ad − bc = 0, and in this case its inverse is a b c d

  • =

1 ad − bc

  • d

−b −c a

  • The quantity ad − bc is called the discriminant.