MATH 4A - Linear Algebra With Applications: Lecture 9: Matrix Inverses

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

MATH 4A - Linear Algebra with Applications


Lecture 9: Matrix inverses

Substitute lecturer: Professor Priyam Patel

19 April 2019

Reading: §2.2, 2.3, 3.1, 3.2 from Lay, 5th ed.


Recommended problems from §2.2: 1, 3, 5, 7, 9, 10, 13,
Recommended problems from §2.3: 1, 3, 5, 7, 11, 12, 13, 15, 17,
21
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Lecture plan

1 Inverse of a matrix

2 An algorithm for finding matrix inverses

3 Other characterizations of invertible matrices


Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Motivation

When we do usual algebra in a single variable, we can “cancel” or


“divide out.” For instance, to solve the equation

2x = 4

we can divide both sides by 2—or, in other words, we can multiply


both sides by the multiplicative inverse of 2:

(2−1 )2x = (2−1 )4

to see that
x = 2.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Motivation

In the previous lecture, we developed algebraic rules for working


with matrices. One important caveat about the algebra of matrices
was that there was no cancellation law: there exist matrices
A, B, C such that

AB = AC but B 6= C .

The fundamental issue is that a matrix A does not always have an


inverse with respect to the operation of matrix multiplication.

However, some matrices do have inverses. And it turns out, these


matrices are very useful. (And, in fact, we’ve already been using
them implicitly any time we did a row operation.)
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Definition

An n × n square matrix A is called invertible if there exists a n × n


square matrix C such that

AC = CA = I = In ,

where I = In is the n × n identity matrix. We call such a C an


inverse of A.

In fact, if an inverse C of A exists, then C is unique. This is


because if B is another inverse, then

B = BI = B(AC ) = (BA)C = IC = C .

If A is invertible, we will denote its unique inverse by A−1 , so that

AA−1 = A−1 A = I .
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Basic questions:

Given a matrix A, how can we decide if A is invertible? Once we


know A is invertible, how do we compute its inverse A−1 ?

We’ll address these questions today.


Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Example
If  
1 1
A=
0 1
we can check that the inverse is
 
−1 1 −1
A = .
0 1
    
−1 1 1 1 −1 1 · 1 + 1 · 0 1 · (−1) + 1 · 1
AA = =
0 1 0 1 0 · 1 + 1 · 0 0 · (−1) + 1 · 1
 
1 0
= =I
0 1
    
−1 1 −1 1 1 1 · 1 + (−1) · 0 1 · 1 + (−1) · (1)
A A= =
0 1 0 1 0·1+1·1 0·1+1·1
 
1 0
= =I
0 1
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Nonexample
No matter how hard we try, we can never find an inverse for the
matrix  
1 1
B= .
0 0
Why not? Let  
a b
C=
c d
be some matrix. Then
    
1 1 a b a b
BC = = .
0 0 c d 0 0
So no matter what we pick for a, b, c, d (that is, no matter
 which

a b
matrix C we choose) we can never get the matrix BC =
0 0
 
1 0
to equal the identity I2 = . Thus B is not invertible.
0 1
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Understanding invertibility and inverses of 2 × 2 matrices is


easy

Theorem
 
a b
Let A = . Then A is invertible if and only if ad − bc 6= 0.
c d
If A is invertible, then its inverse is
 
1 d −b
A−1 = .
ad − bc −c a

We call the number ad − bc the determinant of A, and write

det A = ad − bc.

Thus, a 2 × 2 matrix A is invertible if and only if det A 6= 0.


Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Let’s prove one half of the theorem




a b
Let A = be a 2 × 2 matrix, and suppose det A 6= 0. Then
c d
it makes sense to divide by det A = ad − bc, so the matrix
 
1 d −b
ad − bc −c a

is well defined. To see that this matrix is indeed the inverse of A,


we just compute:
    
1 d −b 1 d −b
A = A
ad − bc −c a ad − bc −c a
  
1 a b d −b
=
ad − bc c d −c a
   
1 ad − bc 0 1 0
= = .
ad − bc 0 ad − bc 0 1
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

A similar calculation shows


    
1 d −b 1 0
A= .
ad − bc −c a 0 1

We conclude that
 
−1 1 d −b
A = .
ad − bc −c a
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

One reason we like invertibility: Linear systems with


invertible coefficient matrix are especially easy to solve
Theorem
If A is an invertible n × n matrix, then for each b in Rn , the
equation Ax = b has the unique solution x = A−1 b.

Proof: given A and b, it’s easy to see that x = A−1 b is a solution:


Ax = AA−1 b = In b = b.
To see that A−1 b is the unique solution, let u be another solution.
Then
Au = b = AA−1 b,
and we can “cancel” the A on the left by multiplying each side of
the equation by A−1 on the left:
A−1 Au = A−1 AA−1 b
u = A−1 b.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

iClicker 1
Using matrix inverses, find the first entry of the solution to the
equation     
1 1 x1 0
= .
0 1 x2 2
Recall from an earlier slide that
 −1  
1 1 1 −1
=
0 1 0 1

(a) 0
(b) 1
(c) -1
(d) -2
(e) 2
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Useful algebraic identities about matrix inverses

Theorem
Let A and B be two invertible n × n matrices. Then
(a) A−1 is also invertible, and (A−1 )−1 = A
(b) (AB)−1 = B −1 A−1
(c) (AT )−1 = (A−1 )T

When using identity (b), it’s especially important to remember


that matrix multiplication is not commutative.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

iClicker 2

What is the (2, 2)-entry of the matrix (AB)−1 , where


   
−1 4 −1 −1 0 1
A = B = ?
0 1 2 3

(a) -2
(b) 1
(c) 2
(d) 3
(e) 8
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Elementary matrices

An elementary matrix is one that is obtained by performing a


single elementary row operation on an identity matrix.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Examples of elementary matrices

     
1 0 0 0 1 0 1 0 0
E1 =  0 1 0  E 2 = 1 0 0  E 3 = 0 1 0 
−4 0 1 0 0 1 0 0 5

E1 is the result of replacing R3 with R3 − 4R1 in I3 . E2 is the result


of swapping rows R1 and R2 in I3 . And E3 is the result of scaling
R3 by the nonzero scalar 5.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Left multiplying a matrix A by an elementary matrix E is


the same thing as performing an elementary row operation
on A

Example: let  
a b c
A = d e f  .
g h i
Then
   
1 0 0 a b c a b c
E1 A =  0 1 0 d e f  =  d e f 
−4 0 1 g h i g − 4a h − 4b i − 4c

is the same thing we would get if we replaced R3 of A with


R3 − 4R1 .
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Two important observations

1 If an elementary row operation is performed on an m × n


matrix A, the resulting matrix can be writtten as EA, where
the m × m matrix E is created by performing the same row
operation on Im .
2 Each elementary matrix E is invertible. The inverse of E is
the elementary matrix of the same type that transforms E
back into I .
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

iClicker 3
Which of the following is the inverse of the elementary matrix
 
1 0 0
E1 =  0 1 0?
−4 0 1
 
−4 0 1
(a)  0 1 0
1 0 0
 
1 0 0
(b) 0 1 0
4 0 1
 
4 0 1
(c) 0 1 0
1 0 0
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Most important slide of the day

Theorem
An n × n matrix A is invertible if and only if A is row equivalent to
the identity matrix In . In this case, any sequence of elementary row
operations that reduces A to In also transforms In into A−1 .

We won’t prove this theorem, but we will use it many times. In


particular, it implies that there is an algorithm for finding matrix
inverses.
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Algorithm for finding matrix inverses

1 If A is an n × n matrix, form the “block-augmented” matrix


A In .

2 Perform row operations
 on A In , with the goal to get it in
the form In C .
3 If at any point you get a row where the first n entries are 0,
but one of the last n entries is nonzero, then A is not
invertible, so you can stop looking for the inverse.
4 Otherwise, following the usual row reduction
 algorithm for A
but applying the operations to A In will result in a matrix
of the form In C . In this case, C = A−1 .

Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

Example

 
1 2
Let’s find the inverse of A = using the algorithm.
3 4
   
1 2 1 0 R2 7→R2 −3R2 1 2 1 0

−−−−−−− →
3 4 0 1 0 −2 −3 1

1 0 −2 1 R2 7→ −1
   
R1 7→R1 +R2 2
R2 1 0 −2 1
−−−−−−−→ −−−−−−→ −1
0 −2 −3 1 0 1 23 2
Thus  
−1 −2 1
A = 3 .
2 − 21
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

There are many ways to characterize invertible matrices

Theorem
Let A be a n × n square matrix. Then the following are all
equivalent
(a) A is invertible
(b) A is row equivalent to In
(c) A has n pivot positions
(d) Ax = 0 has only the trivial solution
(e) the columns of A are linearly independent
(f) The linear transformation A : Rn → Rn is one-to-one
(g) the equation Ax = b is consistent for all b in Rn
(h) the columns of A span Rn
(i) The linear transformation A : Rn → Rn is onto
(j) AT is invertible
Inverse of a matrix An algorithm for finding matrix inverses Other characterizations of invertible matrices

iClicker 4

Is the matrix  
1 0 2
A = 0 1 3 
1 1 5
invertible? Why?
(a) Yes, because none of the rows are all 0
(b) Yes, because none of the columns are all 0
(c) Yes, because the columns are linearly independent
(d) No, because the columns are linearly dependent
(e) No, because the equation Ax = 0 is inconsistent.

You might also like