Vous êtes sur la page 1sur 19

Linear Algebra and Differential Equations

Lecture 8
Inverses and determinants

June 23, 2016

Linear Algebra and Differential EquationsLecture 8Inverses and June


determinants
23, 2016

1 / 19

The Matrix Inverse


A square matrix, A, is called invertible if there exists a matrix, A1 , called
the inverse of A so that
AA1 = I = A1 A
To solve the matrix equation
Ax = b
If A is invertible then we can multiply the equation on the left by A1
A1 Ax = A1 b

x = A1 b

so the solution of the matrix equation can found by finding the inverse of
the coefficient matrix (if it exists).

Linear Algebra and Differential EquationsLecture 8Inverses and June


determinants
23, 2016

2 / 19

Inverse of a 2 2 Matrix
Let


A=

then

a b
c d

a b
c d



A
e
g

f
h


=

e
g

f
h

1 0
0 1

This equation is equivalent to the four equations


ae + bg = 1 af + bh = 0
ce + dg = 0 cf + dh = 1
which has the solutions
e=

d
ad bc

f =

b
ad bc

g=

c
ad bc

h=

a
ad bc

Linear Algebra and Differential EquationsLecture 8Inverses and June


determinants
23, 2016

3 / 19

So
A

1
=
ad bc

d b
c a

which exists if ad bc 6= 0.
The condition ad bc = 0 implies that the two equations are proportional
and this was the situation we examined before where we dont have a
solution, we either have no solution or an infinite number of solutions.
An Example
Solve the equations
2x + 5y = 1
x 2y = 5




1
2 5
2 5
1
A=
A =
1 2
9 1 2
 

  

1
x
2 5
1
3
=
=
y
5
1
9 1 2
Linear Algebra and Differential EquationsLecture 8Inverses and June
determinants
23, 2016

4 / 19

Inverses of 3 3 Matrices
We require AA1 = I. Now express A1 and I as rows of column vectors
A1 = [x1
where

x2

1
e1 = 0
0

x3 ]

I = [e1

0
e2 = 1
0

e2

e3 ]

0
e3 = 0
1

The condition AA1 = I becomes the three equations


Ax1 = e1

Ax2 = e2

Ax3 = e3

We can solve these equations by using elementary row operations to


convert A to reduced row echelon form. If a solution exists, the reduced
row echelon form for A is I.
Linear Algebra and Differential EquationsLecture 8Inverses and June
determinants
23, 2016

5 / 19

An Example
Find the inverse of the matrix

2 1 1
1
A = 1 1
2 1 0

Construct the augmented matrix

2 1 1 1 0 0
1 1
1 0 1 0
2 1 0 0 0 1
Now we will convert the left hand matrix to reduced row echelon form.
This will force the right hand matrix to become the inverse (if it exists).

1 0 0 1 1 0
R1 + R2 R1
= 1 1 1 0 1 0
R3 + 2R2 R3
0 1 2 0 2 1
Linear Algebra and Differential EquationsLecture 8Inverses and June
determinants
23, 2016

6 / 19

1 0 0 1
R1 + R3 R2

= 0 1 1 1
R3 R1 R2 R3
0 0 1 1

1 0 0 1 1

R2 R2 R2 = 0 1 0 2 2
0 0 1 1 0
Thus

1 0
2 0
0 1

0
1
1

A1

1 1 0
= 2 2 1
1 0 1

Linear Algebra and Differential EquationsLecture 8Inverses and June


determinants
23, 2016

7 / 19

Determinants
When we calculated the inverse of a 2 2 matrix


a b
B=
c d
we found the inverse existed unless ad bc = 0.
Given how useful inverses are it would be nice if a similar condition existed
to determine whether a given square matrix (n n) had an inverse. This
number is called the determinant of the matrix, denoted by |A| ordet(A
and if it is non-zero then the matrix has an inverse.
det(A) 6= 0

A1

exists

Linear Algebra and Differential EquationsLecture 8Inverses and June


determinants
23, 2016

8 / 19

Permutations
A permutation of {1, 2, , n} is a rearrangement of the set. For example
a permutation of 12345 is 21543. A transposition is the interchange of two
adjacent elements in the permutation, 21543 21453 is a transposition.
An even permutation is one that can transform into the original order in
an even number of transpositions. An odd permutation can be tranform in
an odd number. For example 21543 is an even permutation since
21543

12543

12453

12435

12345

The (fancy) definition of determinant is


X
det(A) =
sgn()a1(1) a2(2) an(n)
all
where is a permutation of {1, 2, , n} and

1
if is even
sgn() =
1
if is odd
Linear Algebra and Differential EquationsLecture 8Inverses and June
determinants
23, 2016

9 / 19

This is not the way to calculate the determinant, except possibly for small
matrices. Calculating the determinant for a n n involves n! terms.
For a 2 2 there are only two permutations of {1, 2}: 12, 21 so the
determinant is
det(A) = a11 a22 a12 a21
as we found before
For a 3 3 there are six permutations of {1, 2, 3}:
123,231.312,132,213,321. The first three are even the second three are
odd. So
det(A) = a11 a22 a33 + a12 a23 a31 + a13 a21 a32
= a11 a23 a32 a12 a21 a33 a13 a22 a31
we can reexpress this
= a11 (a22 a33 a23 a32 ) a12 (a21 a33 a23 a31 ) + a13 (a21 a32 a22 a31 )






a22 a23
a21 a23
a21 a22
a12



= a11
a31 a33 + a13 a31 a32
a32 a33
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

10 / 19

The 2 2 determinants are called cofactors. The cofactor of an element in


A is obtained by taking determinant of the the matrix left when the row
and column containing the element are deleted from A. The sign in front
of the determinant is (1)i+j where the element is in the ith row and jth
column.




3+3 a11 a12
cofactor of a33 = A33 = (1)
a21 a22




3+2 a11 a13
cofactor of a32 = A33 = (1)
a21 a23
The determinant can be calculated using any row or column
Note: if the matrix is in echelon form the determinant is just the product
of the diagonal elements


4 3 5


0 5 5 = 120


0 0 6
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

11 / 19

Example
Calculate det(A) where A is

3 4 8
A = 5 2 4
4
8 20
It doesnt matter which row or we pick, so lets use the second row








2+1 4 8
2+2 3 8
det(A) = (5)(1)
8 20 + (2)(1)
4 20




2+1 3 4
+(4)(1)
4 8
= 5(80 + 64) 2(60 + 32) 4(24 16)
= 504
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

12 / 19

Higher order determinants


We can find determinants of larger matrices in terms of determinants of
matrices one size smaller. For example


a11 a12 a13 a14


a21 a22 a23 a24


det(A) =

a31 a32 a33 a34
a41 a42 a43 a44




a22 a23 a24
a21 a23 a24




= a11 a32 a33 a34 a12 a31 a33 a34
a42 a43 a44
a41 a43 a44




a21 a22 a24
a21 a22 a23




+a13 a31 a32 a34 a14 a31 a32 a33
a41 a42 a44
a41 a42 a43

Linear Algebra and Differential EquationsLecture 8Inverses andJune


determinants
23, 2016

13 / 19

Properties of determinants
1

3
4

If you multiply any row or column by a non zero constant, k, the


determinant of the new matrix is k times the determinant of the
original matrix
If you interchange any two rows or columns, the determinant of the
new matrix is -1 times the determinant of the original matrix
If any two rows or columhs are proportionalthe the determinant is zero
Forming a new matrix by adding a constant multiple of any row (or
column) to another row or column doesnt alter the value of the
determinant
det(AB)=det(A)det(B) det(A1 )=(det(A))1

Thus if a matrix has a nonzero determinant elementary row operations


cannot change the determinant to zero. If a matrix has an inverse it is row
equivalent to the identity with determinant 1. So a non zero determinant
implies the matrix has an inverse and a zero determinant implies the
inverse doesnt exist.
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

14 / 19

Example revisited


3 4 8


det(A) = 5 2 4
4
8 20
Add twice the second column to the third

3 4
0

det(A) = 5 2 0
4
8 36

Now add twice the second row to the first row




7 0
0

det(A) = 5 2 0 = 504
4 8 36
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

15 / 19

Cofactors and the adjoint matrix


Define the matrix of cofactors where each element is replaced by its
corresponding cofactor

A11 A12 A13


[Aij ] = A21 A22 A23
A31 A32 A33
The adjoint matrix is defined by

A11 A21 A31


adj(A) = [Aij ]T = A12 A22 A32
A13 A23 A33

Now consider the product


B = A(adj(A))
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

16 / 19

Expanding the product we get


B11 = a11 A11 + a12 A12 + a13 A13 = det(A)
similarly
B22 = B33 = det(A)
B12 = a11 A21 + a12 A22 + a13 A23





a11 a12
a11 a13
a12 a13





+
a

a
= a11
13
12
a31 a32
a31 a33
a32 a33
= a11 (a12 a33 a13 a32 ) a12 (a11 a33 a13 a31 )

+a13 (a11 a32 a31 a12 )


= 0
The other off diagonal elements of B
B13 = B21 = B23 = B31 = B32 = 0
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

17 / 19

The adjoint and the inverse


Since
A(adj(A)) = B = det(A) I
A1 =

1
adj(A)
det(A)

as long as det(A) 6= 0.
Example : Find A1 if

2
0 3
A = 5 4 2
2 1 1
Calculating cofactors
A11 = 2 A12 = 9 A13 = 13 A21 = 3 A22 = 4
A23 = 2 A31 = 12 A32 = 19 A33 = 8
Linear Algebra and Differential EquationsLecture 8Inverses andJune
determinants
23, 2016

18 / 19

Since the adjoint is the transpose of the matrix of cofactors

2 3
12
adj(A) = 9 4 19
13 2
8
We can calculate the determinant by
(A adj(A))11 = 2(2) + 0(9) + 3(13) = 35
Thus the inverse is
A1

2 3 12
1
9 4 19
=
35
13 2
8

Linear Algebra and Differential EquationsLecture 8Inverses andJune


determinants
23, 2016

19 / 19

Vous aimerez peut-être aussi