Matrix multiplication, inverse

87
ˇ ˇ ˇ

description

 

Transcript of Matrix multiplication, inverse

Page 1: Matrix multiplication, inverse

Announcements

Ï Quiz 2 on Wednesday Jan 27 on sections 1.4, 1.5, 1.7 and 1.8

Ï If you have any grading issues with quiz 1, please discuss withme asap.

Ï Test 1 will be on Feb 1, Monday in class. More details later.

Page 2: Matrix multiplication, inverse

Last Class..

Two matrices are equal if

Ï they have the same size

Ï the corresponding entries are all equal

If A and B are m×n matrices, the sum A+B is also an m×n matrix

The columns of A+B is the sum of the corresponding columns of Aand B .

A+B is de�ned only if A and B are of the same size.

Page 3: Matrix multiplication, inverse

Last Class..

Two matrices are equal if

Ï they have the same size

Ï the corresponding entries are all equal

If A and B are m×n matrices, the sum A+B is also an m×n matrix

The columns of A+B is the sum of the corresponding columns of Aand B .

A+B is de�ned only if A and B are of the same size.

Page 4: Matrix multiplication, inverse

Last Class..

Two matrices are equal if

Ï they have the same size

Ï the corresponding entries are all equal

If A and B are m×n matrices, the sum A+B is also an m×n matrix

The columns of A+B is the sum of the corresponding columns of Aand B .

A+B is de�ned only if A and B are of the same size.

Page 5: Matrix multiplication, inverse

Last Class..

Two matrices are equal if

Ï they have the same size

Ï the corresponding entries are all equal

If A and B are m×n matrices, the sum A+B is also an m×n matrix

The columns of A+B is the sum of the corresponding columns of Aand B .

A+B is de�ned only if A and B are of the same size.

Page 6: Matrix multiplication, inverse

Matrix Multiplication

De�nitionSuppose A is an m×n matrix and let B be another matrix of sizen×p with columns b1,b2, . . . ,bp, the product AB is the m×p

matrix whose columns are Ab1,Ab2, . . . ,Abp

In other words,AB =A

[b1 b2 . . . bp

]= [Ab1 Ab2 . . . Abp

]

Page 7: Matrix multiplication, inverse

Matrix Multiplication

For multiplication of 2 matrices to be possible,

Ï The number of columns in the �rst matrix (multiplicant) mustbe same as the number of rows in the second matrix(multiplier).

Ï If both matrices are square matrices, you can always multiplythem either way (that is AB or BA)

Ï For arbitrarily sized matrices, it is possible that you can �ndAB but not �nd BA. Or you could �nd BA but not AB .Sometimes, both AB and BA will not exist.

Ï Thus in general AB 6=BA

Page 8: Matrix multiplication, inverse

Matrix Multiplication

For multiplication of 2 matrices to be possible,

Ï The number of columns in the �rst matrix (multiplicant) mustbe same as the number of rows in the second matrix(multiplier).

Ï If both matrices are square matrices, you can always multiplythem either way (that is AB or BA)

Ï For arbitrarily sized matrices, it is possible that you can �ndAB but not �nd BA. Or you could �nd BA but not AB .Sometimes, both AB and BA will not exist.

Ï Thus in general AB 6=BA

Page 9: Matrix multiplication, inverse

Matrix Multiplication

For multiplication of 2 matrices to be possible,

Ï The number of columns in the �rst matrix (multiplicant) mustbe same as the number of rows in the second matrix(multiplier).

Ï If both matrices are square matrices, you can always multiplythem either way (that is AB or BA)

Ï For arbitrarily sized matrices, it is possible that you can �ndAB but not �nd BA. Or you could �nd BA but not AB .Sometimes, both AB and BA will not exist.

Ï Thus in general AB 6=BA

Page 10: Matrix multiplication, inverse

Matrix Multiplication

For multiplication of 2 matrices to be possible,

Ï The number of columns in the �rst matrix (multiplicant) mustbe same as the number of rows in the second matrix(multiplier).

Ï If both matrices are square matrices, you can always multiplythem either way (that is AB or BA)

Ï For arbitrarily sized matrices, it is possible that you can �ndAB but not �nd BA. Or you could �nd BA but not AB .Sometimes, both AB and BA will not exist.

Ï Thus in general AB 6=BA

Page 11: Matrix multiplication, inverse

Questions

1. Suppose A is a 6×4 matrix and B is a 3×4 matrix, does AB

exist?

NO

2. What about BA?NO

3. Suppose A is a 6×4 matrix and B is a 4×3 matrix, does AB

exist? Yes

4. What about BA? NO

Page 12: Matrix multiplication, inverse

Questions

1. Suppose A is a 6×4 matrix and B is a 3×4 matrix, does AB

exist? NO

2. What about BA?

NO

3. Suppose A is a 6×4 matrix and B is a 4×3 matrix, does AB

exist? Yes

4. What about BA? NO

Page 13: Matrix multiplication, inverse

Questions

1. Suppose A is a 6×4 matrix and B is a 3×4 matrix, does AB

exist? NO

2. What about BA?NO

3. Suppose A is a 6×4 matrix and B is a 4×3 matrix, does AB

exist?

Yes

4. What about BA? NO

Page 14: Matrix multiplication, inverse

Questions

1. Suppose A is a 6×4 matrix and B is a 3×4 matrix, does AB

exist? NO

2. What about BA?NO

3. Suppose A is a 6×4 matrix and B is a 4×3 matrix, does AB

exist? Yes

4. What about BA?

NO

Page 15: Matrix multiplication, inverse

Questions

1. Suppose A is a 6×4 matrix and B is a 3×4 matrix, does AB

exist? NO

2. What about BA?NO

3. Suppose A is a 6×4 matrix and B is a 4×3 matrix, does AB

exist? Yes

4. What about BA? NO

Page 16: Matrix multiplication, inverse

Questions

Suppose A is a 2×5 matrix and B is a 5×3 matrix, what are thesizes of AB and BA?

A︷ ︸︸ ︷[ ∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗

]B︷ ︸︸ ︷

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

=

AB︷ ︸︸ ︷[ ∗ ∗ ∗∗ ∗ ∗

]

2×5 5×3

Match

Size of AB

2×3

The product BA is not de�ned here.

Page 17: Matrix multiplication, inverse

Questions

Suppose A is a 2×5 matrix and B is a 5×3 matrix, what are thesizes of AB and BA?

A︷ ︸︸ ︷[ ∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗

]B︷ ︸︸ ︷

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

=

AB︷ ︸︸ ︷[ ∗ ∗ ∗∗ ∗ ∗

]

2×5 5×3

Match

Size of AB

2×3

The product BA is not de�ned here.

Page 18: Matrix multiplication, inverse

Questions

Suppose A is a 2×5 matrix and B is a 5×3 matrix, what are thesizes of AB and BA?

A︷ ︸︸ ︷[ ∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗

]B︷ ︸︸ ︷

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

=

AB︷ ︸︸ ︷[ ∗ ∗ ∗∗ ∗ ∗

]

2×5 5×3

Match

Size of AB

2×3

The product BA is not de�ned here.

Page 19: Matrix multiplication, inverse

Questions

Suppose A is a 2×5 matrix and B is a 5×3 matrix, what are thesizes of AB and BA?

A︷ ︸︸ ︷[ ∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗

]B︷ ︸︸ ︷

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

=

AB︷ ︸︸ ︷[ ∗ ∗ ∗∗ ∗ ∗

]

2×5 5×3

Match

Size of AB

2×3

The product BA is not de�ned here.

Page 20: Matrix multiplication, inverse

The Row-Column rule

The following is the more e�cient and easy way for computing AB .

If the product AB is de�ned, the entry in row i and column j of AB

is the sum of the products of corresponding entries from

row i of A and column j of B

For example, The entry in the �rst row, second column in AB is thesum of the products of the entries from the �rst row of A and thesecond column of B .

Page 21: Matrix multiplication, inverse

Example

Find AB where A=[2 3 −10 1 2

]and B =

0 2−2 34 2

Page 22: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 ∗

∗ ∗

2×0

3×(−2

)

(−1)×4

+

+

Page 23: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 ∗

∗ ∗

2×0

3×(−2

)

(−1)×4

+

+

Page 24: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 ∗

∗ ∗

2×0

3×(−2

)

(−1)×4

+

+

Page 25: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 ∗

∗ ∗

2×0

3×(−2

)

(−1)×4

+

+

Page 26: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

∗ ∗

2×2

3×3

(−1)×2

+

+

Page 27: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

∗ ∗

2×2

3×3

(−1)×2

+

+

Page 28: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

∗ ∗

2×2

3×3

(−1)×2

+

+

Page 29: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

∗ ∗

2×2

3×3

(−1)×2

+

+

Page 30: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

6 ∗

0×0

1× (

−2)

2×4

+

+

Page 31: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

6 ∗

0×0

1× (

−2)

2×4

+

+

Page 32: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

6 ∗

0×0

1× (

−2)

2×4

+

+

Page 33: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

10 11

6 ∗

0×0

1× (

−2)

2×4

+

+

Page 34: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 11

6 7

0×2

1×3

2×2

++

C =A×B : 2 rows 2 columns

Page 35: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 11

6 7

0×2

1×3

2×2

++

C =A×B : 2 rows 2 columns

Page 36: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 11

6 7

0×2

1×3

2×2

++

C =A×B : 2 rows 2 columns

Page 37: Matrix multiplication, inverse

2 3 −1

0 1 2

A : 2 rows 3 columns

0 2

−2 3

4 2

B : 3 rows 2 columns

−10 11

6 7

0×2

1×3

2×2

++

C =A×B : 2 rows 2 columns

Page 38: Matrix multiplication, inverse

Identity Matrix

Ï A diagonal matrix with 1's on the diagonals. (Thisautomatically means that it is a square matrix).

Ï Use the notation In for the identity matrix of order n×n.

Ï A matrix A of suitable order multiplied with the identity matrixgives back A.

Example [1 00 1

]︸ ︷︷ ︸

I2 1 0 00 1 00 0 1

︸ ︷︷ ︸

I3

Page 39: Matrix multiplication, inverse

Problem 2, sec 2.1 Parts 3 and 4

If B =[7 −5 11 −4 −3

], C =

[1 2−2 1

]and E =

[ −53

]. Find CB

and EB .

Obviously the product EB cannot be found (E has 1 column and B

has 2 rows).

CB =[

1 2−2 1

][7 −5 11 −4 −3

]

=[

1.7+2.1 1.(−5)+2.(−4) 1.1+2.(−3)(−2).7+1.1 (−2).(−5)+1.(−4) (−2).1+1.(−3)

]

=[

9 −13 −5−13 6 −5

]

Page 40: Matrix multiplication, inverse

Problem 2, sec 2.1 Parts 3 and 4

If B =[7 −5 11 −4 −3

], C =

[1 2−2 1

]and E =

[ −53

]. Find CB

and EB .

Obviously the product EB cannot be found (E has 1 column and B

has 2 rows).

CB =[

1 2−2 1

][7 −5 11 −4 −3

]

=[

1.7+2.1 1.(−5)+2.(−4) 1.1+2.(−3)(−2).7+1.1 (−2).(−5)+1.(−4) (−2).1+1.(−3)

]

=[

9 −13 −5−13 6 −5

]

Page 41: Matrix multiplication, inverse

Problem 2, sec 2.1 Parts 3 and 4

If B =[7 −5 11 −4 −3

], C =

[1 2−2 1

]and E =

[ −53

]. Find CB

and EB .

Obviously the product EB cannot be found (E has 1 column and B

has 2 rows).

CB =[

1 2−2 1

][7 −5 11 −4 −3

]

=[

1.7+2.1 1.(−5)+2.(−4) 1.1+2.(−3)(−2).7+1.1 (−2).(−5)+1.(−4) (−2).1+1.(−3)

]

=[

9 −13 −5−13 6 −5

]

Page 42: Matrix multiplication, inverse

Problem 2, sec 2.1 Parts 3 and 4

If B =[7 −5 11 −4 −3

], C =

[1 2−2 1

]and E =

[ −53

]. Find CB

and EB .

Obviously the product EB cannot be found (E has 1 column and B

has 2 rows).

CB =[

1 2−2 1

][7 −5 11 −4 −3

]

=[

1.7+2.1 1.(−5)+2.(−4) 1.1+2.(−3)(−2).7+1.1 (−2).(−5)+1.(−4) (−2).1+1.(−3)

]

=[

9 −13 −5−13 6 −5

]

Page 43: Matrix multiplication, inverse

Problem 4, sec 2.1

If A= 9 −1 3

−8 7 −6−4 1 8

, �nd A−5I3 and (5I3)A.

Since I3 = 1 0 0

0 1 00 0 1

, 5I3 = 5 0 0

0 5 00 0 5

,A−5I3 =

9 −1 3−8 7 −6−4 1 8

− 5 0 0

0 5 00 0 5

= 4 −1 3

−8 2 −6−4 1 3

Page 44: Matrix multiplication, inverse

Problem 4, sec 2.1

If A= 9 −1 3

−8 7 −6−4 1 8

, �nd A−5I3 and (5I3)A.

Since I3 = 1 0 0

0 1 00 0 1

, 5I3 = 5 0 0

0 5 00 0 5

,A−5I3 =

9 −1 3−8 7 −6−4 1 8

− 5 0 0

0 5 00 0 5

= 4 −1 3

−8 2 −6−4 1 3

Page 45: Matrix multiplication, inverse

Problem 4, sec 2.1

(5I3)A= 5 0 0

0 5 00 0 5

9 −1 3−8 7 −6−4 1 8

= 5.9+0.(−8)+0.(−4) 5.(−1)+0.7+0.1 5.3+0.(−6)+0.8

0.9+5.(−8)+0.(−4) 0.(−1)+5.7+0.1 0.3+5.(−6)+0.80.9+0.(−8)+5.(−4) 0.(−1)+0.7+5.1 0.3+0.(−6)+5.8

= 45 −5 15

−40 35 −30−20 5 40

Page 46: Matrix multiplication, inverse

Problem 10, sec 2.1

A=[

2 −3−4 6

], B =

[8 45 5

]and C =

[5 −23 1

]. Verify that

AB =AC but B 6=C .

Solution: This example shows that the usual cancellation rule doesnot apply to matrices in general. (Usually, if ab = ac , you cancancel a on both sides (if a 6= 0 ) and this will give b = c .)

AB =[

2 −3−4 6

][8 45 5

]=

[1 −7−2 14

]AC =

[2 −3−4 6

][5 −23 1

]=

[1 −7−2 14

]Thus AB =AC but clearly, B 6=C .

Page 47: Matrix multiplication, inverse

Problem 10, sec 2.1

A=[

2 −3−4 6

], B =

[8 45 5

]and C =

[5 −23 1

]. Verify that

AB =AC but B 6=C .

Solution: This example shows that the usual cancellation rule doesnot apply to matrices in general. (Usually, if ab = ac , you cancancel a on both sides (if a 6= 0 ) and this will give b = c .)

AB =[

2 −3−4 6

][8 45 5

]=

[1 −7−2 14

]AC =

[2 −3−4 6

][5 −23 1

]=

[1 −7−2 14

]Thus AB =AC but clearly, B 6=C .

Page 48: Matrix multiplication, inverse

Transpose of a Matrix

Ï If A is an m×n matrix, then the transpose of A is denoted byAT .

Ï AT is an n×m matrix whose columns are the rows of A. (Orswap the rows and columns of A).

Ï If A=AT , then A is called a symmetric matrix.

Ï (AT )T =A.

Example

If A= 1 2

3 45 6

, then AT =[1 3 52 4 6

]

Page 49: Matrix multiplication, inverse

Transpose of a Matrix

Ï If A is an m×n matrix, then the transpose of A is denoted byAT .

Ï AT is an n×m matrix whose columns are the rows of A. (Orswap the rows and columns of A).

Ï If A=AT , then A is called a symmetric matrix.

Ï (AT )T =A.

Example

If A= 1 2

3 45 6

, then AT =[1 3 52 4 6

]

Page 50: Matrix multiplication, inverse

Transpose of a Matrix

Ï If A is an m×n matrix, then the transpose of A is denoted byAT .

Ï AT is an n×m matrix whose columns are the rows of A. (Orswap the rows and columns of A).

Ï If A=AT , then A is called a symmetric matrix.

Ï (AT )T =A.

Example

If A= 1 2

3 45 6

, then AT =[1 3 52 4 6

]

Page 51: Matrix multiplication, inverse

Transpose of a Matrix

Ï If A is an m×n matrix, then the transpose of A is denoted byAT .

Ï AT is an n×m matrix whose columns are the rows of A. (Orswap the rows and columns of A).

Ï If A=AT , then A is called a symmetric matrix.

Ï (AT )T =A.

Example

If A= 1 2

3 45 6

, then AT =[1 3 52 4 6

]

Page 52: Matrix multiplication, inverse

Transpose of a Matrix

Ï If A is an m×n matrix, then the transpose of A is denoted byAT .

Ï AT is an n×m matrix whose columns are the rows of A. (Orswap the rows and columns of A).

Ï If A=AT , then A is called a symmetric matrix.

Ï (AT )T =A.

Example

If A= 1 2

3 45 6

, then AT =[1 3 52 4 6

]

Page 53: Matrix multiplication, inverse

Powers of a Matrix

If A is an n×n matrix, then Ak is A multiplied k times

Example

If A=[1 23 4

], then A2 =

[1 23 4

][1 23 4

]=

[7 1015 22

]Also, A3 =A2A=

[7 1015 22

][1 23 4

]=

[37 5481 118

]

Please do this and convince yourself that this is true.

Page 54: Matrix multiplication, inverse

Powers of a Matrix

If A is an n×n matrix, then Ak is A multiplied k times

Example

If A=[1 23 4

], then A2 =

[1 23 4

][1 23 4

]=

[7 1015 22

]

Also, A3 =A2A=[

7 1015 22

][1 23 4

]=

[37 5481 118

]

Please do this and convince yourself that this is true.

Page 55: Matrix multiplication, inverse

Powers of a Matrix

If A is an n×n matrix, then Ak is A multiplied k times

Example

If A=[1 23 4

], then A2 =

[1 23 4

][1 23 4

]=

[7 1015 22

]Also, A3 =A2A=

[7 1015 22

][1 23 4

]=

[37 5481 118

]

Please do this and convince yourself that this is true.

Page 56: Matrix multiplication, inverse

Powers of a Matrix

If A is an n×n matrix, then Ak is A multiplied k times

Example

If A=[1 23 4

], then A2 =

[1 23 4

][1 23 4

]=

[7 1015 22

]Also, A3 =A2A=

[7 1015 22

][1 23 4

]=

[37 5481 118

]

Please do this and convince yourself that this is true.

Page 57: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Recall that for numbers the inverse (or the multilpicative inverse) isits reciprocal.

Ï The inverse of 8 is 1/8 or 8−1.

Ï Satis�es 8−1.8= 1 and 8.8−1 = 1

Ï Can generalize the concept of inverse to a matrix

Ï The matrix involved must be a square matrix

Ï No slanted line notation for matrix inverses.

Page 58: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Recall that for numbers the inverse (or the multilpicative inverse) isits reciprocal.

Ï The inverse of 8 is 1/8 or 8−1.Ï Satis�es 8−1.8= 1 and 8.8−1 = 1

Ï Can generalize the concept of inverse to a matrix

Ï The matrix involved must be a square matrix

Ï No slanted line notation for matrix inverses.

Page 59: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Recall that for numbers the inverse (or the multilpicative inverse) isits reciprocal.

Ï The inverse of 8 is 1/8 or 8−1.Ï Satis�es 8−1.8= 1 and 8.8−1 = 1

Ï Can generalize the concept of inverse to a matrix

Ï The matrix involved must be a square matrix

Ï No slanted line notation for matrix inverses.

Page 60: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Recall that for numbers the inverse (or the multilpicative inverse) isits reciprocal.

Ï The inverse of 8 is 1/8 or 8−1.Ï Satis�es 8−1.8= 1 and 8.8−1 = 1

Ï Can generalize the concept of inverse to a matrix

Ï The matrix involved must be a square matrix

Ï No slanted line notation for matrix inverses.

Page 61: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Given an n×n matrix A, we want to �nd another n×n matrix C

such that AC = In and CA= In where In is the identity matrix of sizen×n.

Ï Such a matrix C is called the inverse of A.

Ï The inverse of a matrix is unique.

Ï We denote the inverse of A by A−1

Ï Thus if A is an n×n matrix, AA−1 =A−1A= In

Page 62: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Given an n×n matrix A, we want to �nd another n×n matrix C

such that AC = In and CA= In where In is the identity matrix of sizen×n.

Ï Such a matrix C is called the inverse of A.

Ï The inverse of a matrix is unique.

Ï We denote the inverse of A by A−1

Ï Thus if A is an n×n matrix, AA−1 =A−1A= In

Page 63: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Given an n×n matrix A, we want to �nd another n×n matrix C

such that AC = In and CA= In where In is the identity matrix of sizen×n.

Ï Such a matrix C is called the inverse of A.

Ï The inverse of a matrix is unique.

Ï We denote the inverse of A by A−1

Ï Thus if A is an n×n matrix, AA−1 =A−1A= In

Page 64: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Given an n×n matrix A, we want to �nd another n×n matrix C

such that AC = In and CA= In where In is the identity matrix of sizen×n.

Ï Such a matrix C is called the inverse of A.

Ï The inverse of a matrix is unique.

Ï We denote the inverse of A by A−1

Ï Thus if A is an n×n matrix, AA−1 =A−1A= In

Page 65: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Not every n×n matrix has an inverse

Ï If A−1 exists, we say that A is invertible.

Ï A matrix that is not invertible is also called a singular matrix.

Ï Invertible matrices are also called non-singular matrices.

De�nition

Given a matrix A=[

a b

c d

], the quantity ad −bc is called the

determinant of A.

Page 66: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Not every n×n matrix has an inverse

Ï If A−1 exists, we say that A is invertible.

Ï A matrix that is not invertible is also called a singular matrix.

Ï Invertible matrices are also called non-singular matrices.

De�nition

Given a matrix A=[

a b

c d

], the quantity ad −bc is called the

determinant of A.

Page 67: Matrix multiplication, inverse

Section 2.2 Inverse of a Matrix

Not every n×n matrix has an inverse

Ï If A−1 exists, we say that A is invertible.

Ï A matrix that is not invertible is also called a singular matrix.

Ï Invertible matrices are also called non-singular matrices.

De�nition

Given a matrix A=[

a b

c d

], the quantity ad −bc is called the

determinant of A.

Page 68: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Let A=[

a b

c d

]. If ad −bc 6= 0 then A is invertible and

A−1 = 1

ad −bc

[d −b−c a

].

So if the determinant of A (or det A) is equal to 0, A−1 does notexist.

Page 69: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Let A=[

a b

c d

]. If ad −bc 6= 0 then A is invertible and

A−1 = 1

ad −bc

[d −b−c a

].

So if the determinant of A (or det A) is equal to 0, A−1 does notexist.

Page 70: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Steps for a 2×2 matrix A

1. First check whether det A=0. If so, stop. A is not invertible.

2. If det A 6= 0, swap the main diagonal elements of A.

3. Then change the sign of both o� diagonal elements (don'tswap these)

4. Divide this matrix (after steps 2 and 3) by detA to give A−1.(This divides each element of the resultant matrix.)

5. If you want to check your answer, you can see whether

AA−1 =[1 00 1

]6. This method will not work for 3×3 or bigger matrices.

Page 71: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Steps for a 2×2 matrix A

1. First check whether det A=0. If so, stop. A is not invertible.

2. If det A 6= 0, swap the main diagonal elements of A.

3. Then change the sign of both o� diagonal elements (don'tswap these)

4. Divide this matrix (after steps 2 and 3) by detA to give A−1.(This divides each element of the resultant matrix.)

5. If you want to check your answer, you can see whether

AA−1 =[1 00 1

]6. This method will not work for 3×3 or bigger matrices.

Page 72: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Steps for a 2×2 matrix A

1. First check whether det A=0. If so, stop. A is not invertible.

2. If det A 6= 0, swap the main diagonal elements of A.

3. Then change the sign of both o� diagonal elements (don'tswap these)

4. Divide this matrix (after steps 2 and 3) by detA to give A−1.(This divides each element of the resultant matrix.)

5. If you want to check your answer, you can see whether

AA−1 =[1 00 1

]6. This method will not work for 3×3 or bigger matrices.

Page 73: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Steps for a 2×2 matrix A

1. First check whether det A=0. If so, stop. A is not invertible.

2. If det A 6= 0, swap the main diagonal elements of A.

3. Then change the sign of both o� diagonal elements (don'tswap these)

4. Divide this matrix (after steps 2 and 3) by detA to give A−1.(This divides each element of the resultant matrix.)

5. If you want to check your answer, you can see whether

AA−1 =[1 00 1

]6. This method will not work for 3×3 or bigger matrices.

Page 74: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Find the inverse of

A=[1 23 4

]Solution: Here detA= (1)(4)− (2)(3)=−2 6= 0. So we can �nd A−1.

Interchange the positions of 1 and 4. Change the signs of 2 and 3.Then we get [

4 −2−3 1

]. Divide each element of the matrix by detA which is -2. This gives

A−1 =[ −2 13/2 −1/2

]

Page 75: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Find the inverse of

A=[1 23 4

]Solution: Here detA= (1)(4)− (2)(3)=−2 6= 0. So we can �nd A−1.Interchange the positions of 1 and 4. Change the signs of 2 and 3.Then we get [

4 −2−3 1

].

Divide each element of the matrix by detA which is -2. This gives

A−1 =[ −2 13/2 −1/2

]

Page 76: Matrix multiplication, inverse

Finding Inverse of a 2×2 Matrix

Find the inverse of

A=[1 23 4

]Solution: Here detA= (1)(4)− (2)(3)=−2 6= 0. So we can �nd A−1.Interchange the positions of 1 and 4. Change the signs of 2 and 3.Then we get [

4 −2−3 1

]. Divide each element of the matrix by detA which is -2. This gives

A−1 =[ −2 13/2 −1/2

]

Page 77: Matrix multiplication, inverse

What's the use?

Remember solving the matrix equation Ax= b for suitable A and x?

TheoremIf A is an n×n invertible matrix, then for each vector b in Rn, the

equation Ax= b has a unique solution x=A−1b

So, �nd the inverse and multiply with the vector b to get the vectorx.

Page 78: Matrix multiplication, inverse

What's the use?

Remember solving the matrix equation Ax= b for suitable A and x?

TheoremIf A is an n×n invertible matrix, then for each vector b in Rn, the

equation Ax= b has a unique solution x=A−1b

So, �nd the inverse and multiply with the vector b to get the vectorx.

Page 79: Matrix multiplication, inverse

Example

Use the inverse of the previous example to solve{x1 + 2x2 = 23x1 + 4x2 = 4

Solution: Based on the previous theorem,

x=[

x1x2

]=

[ −2 13/2 −1/2

]︸ ︷︷ ︸

A−1

[24

]︸ ︷︷ ︸

b

=[01

]

Page 80: Matrix multiplication, inverse

Example

Theorem

1. If A is an invertible matrix, its inverse A−1 is also an invertible

matrix and (A−1)−1 =A

2. If A is an invertible matrix, its transpose AT is also an

invertible matrix and (AT )−1 = (A−1)T

3. If A and B are invertible matrices, their product AB is also

invertible and (AB)−1 =B−1A−1. This is called the

"shoes-socks" principle. (Remember the order in which you

put your socks and shoes on and the order in which you

remove them?)

Page 81: Matrix multiplication, inverse

Example

Theorem

1. If A is an invertible matrix, its inverse A−1 is also an invertible

matrix and (A−1)−1 =A

2. If A is an invertible matrix, its transpose AT is also an

invertible matrix and (AT )−1 = (A−1)T

3. If A and B are invertible matrices, their product AB is also

invertible and (AB)−1 =B−1A−1. This is called the

"shoes-socks" principle. (Remember the order in which you

put your socks and shoes on and the order in which you

remove them?)

Page 82: Matrix multiplication, inverse

Example

Theorem

1. If A is an invertible matrix, its inverse A−1 is also an invertible

matrix and (A−1)−1 =A

2. If A is an invertible matrix, its transpose AT is also an

invertible matrix and (AT )−1 = (A−1)T

3. If A and B are invertible matrices, their product AB is also

invertible

and (AB)−1 =B−1A−1. This is called the

"shoes-socks" principle. (Remember the order in which you

put your socks and shoes on and the order in which you

remove them?)

Page 83: Matrix multiplication, inverse

Example

Theorem

1. If A is an invertible matrix, its inverse A−1 is also an invertible

matrix and (A−1)−1 =A

2. If A is an invertible matrix, its transpose AT is also an

invertible matrix and (AT )−1 = (A−1)T

3. If A and B are invertible matrices, their product AB is also

invertible and (AB)−1 =B−1A−1. This is called the

"shoes-socks" principle. (Remember the order in which you

put your socks and shoes on and the order in which you

remove them?)

Page 84: Matrix multiplication, inverse

Example

De�nitionElementary Matrix: A matrix obtained by doing one row operationon an identity matrix.

Example

For I3 = 1 0 0

0 1 00 0 1

the following are elementary matrices.

E1 = 0 0 1

0 1 01 0 0

︸ ︷︷ ︸

R1←→R3

, E2 = 4 0 0

0 1 00 0 1

︸ ︷︷ ︸

4R1

, E3 = 1 0 0

0 1 00 1 1

︸ ︷︷ ︸

R2+R3

Page 85: Matrix multiplication, inverse

Example

De�nitionElementary Matrix: A matrix obtained by doing one row operationon an identity matrix.

Example

For I3 = 1 0 0

0 1 00 0 1

the following are elementary matrices.

E1 = 0 0 1

0 1 01 0 0

︸ ︷︷ ︸

R1←→R3

,

E2 = 4 0 0

0 1 00 0 1

︸ ︷︷ ︸

4R1

, E3 = 1 0 0

0 1 00 1 1

︸ ︷︷ ︸

R2+R3

Page 86: Matrix multiplication, inverse

Example

De�nitionElementary Matrix: A matrix obtained by doing one row operationon an identity matrix.

Example

For I3 = 1 0 0

0 1 00 0 1

the following are elementary matrices.

E1 = 0 0 1

0 1 01 0 0

︸ ︷︷ ︸

R1←→R3

, E2 = 4 0 0

0 1 00 0 1

︸ ︷︷ ︸

4R1

,

E3 = 1 0 0

0 1 00 1 1

︸ ︷︷ ︸

R2+R3

Page 87: Matrix multiplication, inverse

Example

De�nitionElementary Matrix: A matrix obtained by doing one row operationon an identity matrix.

Example

For I3 = 1 0 0

0 1 00 0 1

the following are elementary matrices.

E1 = 0 0 1

0 1 01 0 0

︸ ︷︷ ︸

R1←→R3

, E2 = 4 0 0

0 1 00 0 1

︸ ︷︷ ︸

4R1

, E3 = 1 0 0

0 1 00 1 1

︸ ︷︷ ︸

R2+R3