3.4 Solution by Matrices

advertisement
3.5 Solution by Determinants
The Determinant of a Matrix


The determinant of a matrix A is
denoted by |A|.
Determinants exist only for square
matrices.
The Determinant for a 2x2 matrix

If A =

Then

This one is easy
a b 
c d 


A  ad  bc
Coefficient Matrix



You can use determinants to solve a system
of linear equations
You use the coefficient matrix of the linear
system
Linear System
Coeff Matrix
ax+by = e
a b 
c d 
cx+dy = f


Cramer’s Rule



Linear System
ax+by = e
cx+dy = f
Coeff Matrix
a b 
c d 


Let D be the coefficient matrix
If det D ≠ 0, then the system has exactly one solution:
e b
Dx
f d
x

a b
D
c d
and
a e
Dy
c f
y

a b
D
c d
Example 1- Cramer’s Rule (2x2)

Solve the system:
8x + 5y = 2
2x ─ 4y = −10
The coefficient matrix is:
So:
2
5
 10  4
x
 42
8 5 
 2  4


and
and
8
5
2 4
 (32)  (10)  42
8 2
2  10
y
 42
Example 1 (continued)
2
5
 10  4  8  (50)
42
x


 1
 42
 42
 42
8 2
2  10  80  4  84
y


2
 42
 42
 42
Solution: (-1,2)
The Determinant for a 3x3 matrix

Value of 3 x 3 (4 x 4, 5 x 5, etc.)
determinants can be found using so
called expansion by minors.
a1 b1
c1
a 2 b 2 c 2  a1
a 3 b 3 c3
b2 c2
b 3 c3
 b1
a 2 c2
a 3 c3
 c1
a 2 b2
a 3 b3
Example 2 - Cramer’s Rule (3x3)

Solve the system:
x + 3y – z = 1
–2x – 6y + z = –3
3x + 5y – 2z = 4
1
3
2 6 3
3
z
1
5
3
2 6
Let’s solve for Z
The answer is: (2,0,1)!!!
1
3
5
4
4

1
1  4
1
2
Inverse Matrix
Matrix A1 is an inverse of matrix A if
A  A1  A1  A  I
1
0

0

0
0
1
0
0
0
0
1
0
0

0
0

1
Using Matrix-Matrix Multiplication:
 2 3  2  x 
 4 2 3   y  

 
 5 7 6   z 
 2x + 3y – 2z


–4x
+
2y
+
3z


 5x + 7y + 6z
This gives us a simple way to write a system of linear equations.
 2 3  2
A   4 2 3 
 5 7 6 
 x
X   y 
 z 
 2 
B   1 
 28 
2x + 3y – 2z = –2
Then the system
–4x + 2y + 3z = 1
5x + 7y + 6z = 28
can be written as:
AX  B
Solving Equations Using
Inverse Matrices

If A is the matrix of coefficients, X is the
matrix of variables and B is the matrix of
constants, then a system of equations can
be presented as a matrix equation…
A X  B
…and we can solve it for X by multiplying both
sides of the equation by A-1 from the left:
A X  B
A1  A  X  A1  B
so
1
X  A B
How to find the Inverse Matrix
For a 2x2 matrix:
A=
a
b
c
d
If ad – bc ≠ 0 then:
A-1 =
1
d -b
ad – bc
-c a
=
d
-b
ad-bc
ad-bc
-c
a
ad-bc
ad-bc
How to find the Inverse Matrix (cont’d)
3 5
B =A-1 =
BA =
Is the inverse of
A=
-1 3
1 2
2 -5
AB =
2 -5
3 5
-1 3
1 2
3 5
2 -5
1 2
-1 3
1 0
=
0 1
=I
1 0
=
0 1
=I
Find the inverse of
A=
1
2
1
3
Using the formula:
1
A =
1
d -b
ad-bc
-c a
=
Since ad – bc = 3–2=1:
1
A =
d -b
-c a
3 -2
=
-1
1
d
-b
ad-bc
ad-bc
-c
a
ad-bc
ad-bc
a=1; b=2;
c=1; d=3
Properties
ab  ba
Real-number multiplication is commutative:
Is matrix multiplication commutative?
AB  BA
No!
a(bc)  (ab)c
A( BC)  ( AB)C
Real-number multiplication is associative:
Is matrix multiplication associative?
Yes!
1  a  a 1  a
Real-number multiplication has an identity:
Does matrix multiplication have an identity?
IA  AI  A
Yes!
(but you must use an identity matrix of the proper size for A)
Real-number multiplication has inverses:
a  a 1  a 1  a  1
Unless a = 0.
Does matrix multiplication have an identity?
Yes!
AA 1  A1 A  I
Unless det(A) = 0.
Download