Linear Algebra Lecture 5final
Linear Algebra Lecture 5final
'
+
+ +
+ +
3 z y
4 z 2y x
10 4z 3y 2x
can be written in the form AX = B where
A =
,
_
1 1 0
1 2 1
4 3 2
X =
,
_
z
y
x
and B =
,
_
3
4
10
Suppose A, X, and B are numbers. If A is NOT ZERO, you know
that you can solve AX = B for X by dividing by A to get
B A B
A A
B
X
1
1
Here
1
A has the defining property 1
1
A A , where 1 is in turn
characterized by X X X 1 1 for all numbers X.
Note what happens when A is zero:
a) 0X = 5 has no solutions.
b) 0X = 0 has many solutions x is arbitrary.
The same strategy works for solving AX=B when A is an m by m
matrix, and X and B are m by 1 matrices
1) Instead of the number 1, we use the m by m matrix
I =
,
_
1 0 0
0 1 0
0 0 1
with 1s on the main diagonal and 0s elsewhere.
Note that XI = IX = X for every m by m matrix X
2) Suppose the determinant of the matrix A is not zero . Then the
solution of the matrix equation AX=B is X = B A
1
Here
1
A , called the inverse matrix of A, is defined by the fact
that
I A A AA
1 1
.
Note: although matrix multiplication does not commute in general,
it is the case that if BA = I, then AB = I and B = A
-1
.
Example: Suppose m = 2 and
,
_
d c
b a
A
. Then
,
_
1 0
0 1
I
.
We want to find
,
_
v u
t s
A
1
satisfying
A
,
_
,
_
+ +
+ +
1 0
0 1
1
I
dv ct du cs
bv at bu as
A
This gives two linear systems in two unknowns, namely
'
+
+
0 d u s
1 b u s
c
a
and
'
+
+
1 d v t
0 b v t
c
a
.
Each system can be solved by Cramers Rule.
For example,
bc ad
d
d c
b a
d
b
A
A
s
,
_
,
_
0
1
) det(
) det(
1
. The result is
,
_
,
_
bc ad
a
bc ad
c
bc ad
b
bc ad
d
v u
t s
A
1
=
,
_
a c
b d
A) det(
1
.
This makes sense only if det(A) is NOT zero.
General case: A is an m by m matrix. Recall the definition of
cofactors: ij
j i
ij
M A
+
) 1 (
where ij
M
is the determinant of the matrix
you get when you cross out row i and column j of A.
Inverse matrix formula: Let
) (
ij
A
be the m by m matrix of
cofactors. Then the inverse matrix can be calculated as 1/det(A)
times the transposed cofactor matrix:
T
ij
A
A
A ) (
) det(
1
1
,
_
d c
b a
A then
,
_
a b
c d
A
ij
) (
Check that this gives the correct matrix inverse.
HOMEWORK
a) Use row reduction to find the inverse of the matrix A in the
following example
b) Heuvers 5.5 exercises 1 efilm , 2 efilm, 6abcd , 8 ,9 ,10
Lets use the above formula to find the inverse of a 3 by 3
matrix.
Example: Let
,
_
5 3 1
2 2 0
4 3 1
A
.
a) Find
1
A and check your answer by showing that I AA
1
b) Use the inverse matrix to solve the system
'
+ +
+
+ +
2 2 5 3
1 0 2 2
1 9 4 3
z y x
z y
z y x
Solution:
Part a) Find the inverse matrix
First, find det(A) = 2. This is nonzero and so we proceed.
,
_
5 3 1
2 2 0
4 3 1
A
det(A) = 1 (10-6)-0+1(6-8) = 4 2 = 2
Next, calculate the cofactor matrix.
,
_
,
_
+ +
+
+ +
2 2 2
0 1 3
2 2 4
2 0
3 1
2 0
4 1
2 2
4 3
3 1
3 1
5 1
4 1
5 3
4 3
3 1
2 0
5 1
2 0
5 3
2 2
) (
ij
A
Calculate the inverse. Remember to transpose the cofactor matrix.
) det(
1
1
A
A
,
_
2 0 2
2 1 2
2 3 4
2
1
) (
T
ij
A
Note: Its OK to leave the answer in this form.
CHECK that I A A
1
:
,
_
2 0 2
2 1 2
2 3 4
2
1
I
,
_
,
_
,
_
1 0 0
0 1 0
0 0 1
2 0 0
0 2 0
0 0 2
2
1
5 3 1
2 2 0
4 3 1
Part b) The linear system
'
+ +
+
+ +
2 2 5 3
1 0 2 2
1 9 4 3
z y x
z y
z y x
can be written in matrix form AX = B:
,
_
,
_
,
_
22
10
19
5 3 1
2 2 0
4 3 1
z
y
x
with solution B A X
1
. In other words,
2
1
,
_
z
y
x
,
_
2 0 2
2 1 2
2 3 4
,
_
22
10
19
=
2
1
,
_
,
_
+ +
+
6
4
2
2
1
44 0 38
44 10 38
44 30 76
=
,
_
3
2
1
Answer to b) x = 1; y = 2; z = 3
Row reduction method for finding the inverse matrix
Warning: Dont use row reduction to find a matrix inverse
unless you are specifically requested to do so. Reason: row
reduction takes more time than the transposed cofactor method
described above.
Row reduction theorem. Suppose a sequence of row operations
transforms a square matrix A to the identity matrix I. Then the
same sequence of row operations transforms I to A
-1
Heres an example that is cooked up so that the row reduction
method works well: Use row reduction to find the inverse of
A =
,
_
3 0 0
0 2 1
0 0 1
Solution: Do row ops on the 3 by 6 matrix ( A | I ) that transform
the left half of the matrix to I as follows:
( A | I ) =
1 2 2
1 0 0 3 0 0
0 1 0 0 2 1
0 0 1 0 0 1
R R R
,
_
3 /
2 /
1 0 0 3 0 0
0 1 1 0 2 0
0 0 1 0 0 1
3 3
2 2
R R
R R
,
_
,
_
3 / 1 0 0 1 0 0
0 2 / 1 2 / 1 0 1 0
0 0 1 0 0 1
Since the left half of the matrix is I, the theorem states that the
right half is A
-1
Thus A
-1
=
,
_
3 / 1 0 0
0 2 / 1 2 / 1
0 0 1
Summary
1. When you do row operations on a linear system of
equations, the answers stay the same.
2. When you do row operations on a square matrix, the
determinant will usually change.
3. When you do row operations on a square matrix: if the
original determinant is zero, the final determinant is
zero. If the original determinant is nonzero, the final
determinant is nonzero. In particular, if row operations
can be used to transform matrix A to the identity matrix
(whose determinant is 1), it follows that the determinant
of A must be nonzero, and so A has an inverse.