You are on page 1of 67

CHAPTER 2

MATRICES

CHAPTER OVERVIEW
 Matrix Operations
 Determinant of Matrices
 Inverse of Matrices
 Linear System of Matrix Equations
2
LEARNING OUTCOMES
 At the end of this lecture, student should
be able to:
1. Solve the determinant of 2x2 and 3x3
matrices.
2. Calculate the inverse of a matrix.
3. Solve for the system of linear equations
using matrix method.

3
Determinant of Matrices
 Determinant of 2 x 2 matrix

4
EXAMPLE 3.10
SOLUTION:
5
Minor and Cofactor
Let A be n x n matrix,

6

7
Example 3.12
SOLUTION:
8
Determinant of 3 x 3 matrix
 If A is a 3 x 3 matrix, then the determinant of A
is obtained by summing up the product of each
element of a certain row or column by its
cofactor.

9
 Usually to evaluate the determinant of
matrix A, we always choose the row or
column that has the most zero entries.

10
Example 3.13
 SOLUTION:
Choosing the first row,

11
Adjoint matrices

12
Example 3.14
 Find the adjoint the following matrix




SOLUTION:

13

14
Inverse Matrices
 The inverse of matrix A is denoted by



(adjoint matrix method)

Inverse of 2 x 2 matrix


15
Example
Find the inverse, A
-1
of

Solution:
[1] Interchange leading diagonal elements:

[2] Change signs of the other 2 elements:

[3] Find |A|
= -14+12 = -2

[4] Multiply result of [2] by

16
Example 3.15
 SOLUTION:
17
Example:
Find the inverse of the following by
using the adjoint matrix method:

A =
18
Solution:
 Step 1:
 Find cofactor matrix




 Step 2
Transpose the matrix:
adjA =

19
Solution: (cont.)
 Now we can find the inverse of matrix A.



 det A =




=
20
Example 3.16

21
SOLUTION:

22

23
Exercise
Find the determinant of the matrix
24
(
¸
(

¸

÷
÷
2 3
4 5
(
(
(
(
¸
(

¸

÷
÷
÷
2 4 3 1
0 0 6 0
5 3 0 4
0 2 1 3
(
(
(
¸
(

¸

÷
÷
6 0 2
7 2 3
1 4 5
(
(
(
(
¸
(

¸

d
a
c
b
0 0 0
0 0 0
0 0 0
0 0 0

Linear system of matrix equations

25

26
|
|
.
|

\
|
|
|
.
|

\
|
=
|
|
.
|

\
|
÷
2
1
1
2 2
1 1
c
c
b a
b a
y
x
Method 1: Inverse Matrix Method
Inverse Matrix Method for 2x2 Systems
The solution (x,y) of the system




is given by
27
Example:
Solve the system using Inverse Matrix method:
28
Solution:
Let



Then




So the solution is (3, -1).

|
|
.
|

\
|
÷
=
3 2
3 1
A
|
|
.
|

\
|
÷
=
|
|
.
|

\
|
÷ ÷ ÷
=
÷
1 2
3 3
9
1
1 2
3 3
) 3 ( 2 ) 3 ( 1
1
1
A
|
|
.
|

\
|
÷
=
|
|
.
|

\
|
|
|
.
|

\
|
÷
=
|
|
.
|

\
|
1
3
3
6
1 2
3 3
9
1
y
x
Check: [1] 3 + 3 = 6 OK
[2] 6 - 3 = 3 OK
29
Method 1
Inverse Matrix Method for 3x3 Systems

We can solve the system





by using
|
|
|
.
|

\
|
|
|
|
.
|

\
|
=
|
|
|
.
|

\
|
÷
3
2
1
1
3 3 3
2 2 2
1 1 1
d
d
d
c b a
c b a
c b a
z
y
x
30
Example:
Solve, using the Inverse Matrix Method:
31
Solution:
Let



Cof. of A =



Adj A
|
|
|
.
|

\
|
÷ ÷
÷ =
1 3 3
3 2 1
1 3 2
A
|
|
|
|
|
|
|
|
.
|

\
|
÷
+
÷
÷ +
÷ ÷
÷
÷
+
÷
÷
÷ ÷
÷
+
÷
÷
÷
÷
+
2 1
3 2
) (
3 1
1 2
) (
3 2
1 3
) (
3 3
3 2
) (
1 3
1 2
) (
1 3
1 3
) (
3 3
2 1
) (
1 3
3 1
) (
1 3
3 2
) (
|
|
|
.
|

\
|
÷
÷ ÷
÷
=
7 7 7
3 5 6
9 8 11
|
|
|
.
|

\
|
÷
÷ ÷
÷
=
7 3 9
7 5 8
7 6 11
32
Det A
7
3 3
2 1
1
1 3
3 1
3
1 3
3 2
2 =
÷ ÷
÷
+
÷
÷
÷
÷
=
|
|
|
.
|

\
|
÷
÷ ÷
÷
=
÷
7 3 9
7 5 8
7 6 11
7
1
1
A
|
|
|
.
|

\
|
÷ =
|
|
|
.
|

\
|
÷
|
|
|
.
|

\
|
÷
÷ ÷
÷
=
|
|
|
.
|

\
|
3
3
4
0
1
2
7 3 9
7 5 8
7 6 11
7
1
z
y
x
So the solution is (4,-3,3).
Checking solutions:
[1] 2(4) + 3(-3) + 3 = 2 OK
[2] -(4) + 2(-3) + 3(3) = -1 OK
[3] -3(4) - 3(-3) + 3 = 0 OK

33
Method 2: Cramer’s Rule
Cramer’s Rule for 2x2 Systems
The solution (x,y) of the system



is given by


and
34
Example:
Solve the system using Cramer’s Rule:
35
Solution:
So, the solution is (3, -1)

Check: [1] 3 + 3 = 6 OK
[2] 6 - 3 = 3 OK

36
Method 2: Cramer’s Rule (cont.)
Cramer’s Rule for 3x3 Systems
We can solve the system



by using
where
37
Example:
Solve, using Cramer’s Rule:
38
Solution:
So, the solution is
(4,-3,3)
Checking solutions:
[1] 2(4) + 3(-3) + 3 = 2 OK
[2] -(4) + 2(-3) + 3(3) = -1 OK
[3] -3(4) - 3(-3) + 3 = 0 OK
39
Method 3: Gaussian Elimination

Do the row
operation to get
Row Echelon
form for A
10 4 7 3
1 3 2
8 2
= + ÷
= + ÷ ÷
= + +
z y x
z y x
z y x
Example: Consistent linear system,
unique solution.

1 1 2
−1 −2 3
3 −7 4
8
1
10

2=2+1
3=3−31

1 1 2
0 −1 5
0 −10 −2
8
9
−14

2 = −2 →
1 1 2
0 1 −5
0 −10 −2
8
−9
−14


3=3+102

1 1 2
0 1 −5
0 0 −52
8
−9
−104



3=−
1
52
3

1 1 2
0 1 −5
0 0 1
8
−9
2

This is row echelon form
 Use the backward substitution
= 2
−5 = −9
→ = −9 + 5 = −9 + 5(2)
= 1
+ + 2 = 8
+ 1 + 2 2 = 8
= 3

6 3 3
5 4 2
1
1
= +
= +
= + ÷
= +
y x
y x
y x
y x
Example: Inconsistent linear system
Solve the system by using Gaussian Elimination method:

1
−1
1
1
2 4
3 3
1
1
5
6

1
−1
1
1
2 4
3 3
1
1
5
6

2 = 2 +1
3 = 3 − 21
4 = 4 − 31

1
0
1
2
0 2
0 0
1
2
3
3

−3 = 3 − 2 →
1
0
1
2
0 0
0 0
1
2
1
3
− 4 = 4 − 33 →
1
0
1
2
0 0
0 0
1
2
1
0

This is row echelon form
Apply back substitution:
Notes: 0 + 0 = 1 is impossible to
get solution
Example: Consistent Linear system,
Infinitely Many Solutions
 Solve the system by using Gaussian Elimination method:
3 6 12 5
1 5 5 2
1 4 2
= ÷ ÷
÷ = + + ÷
= + ÷
z y x
z y x
z y x

1 −2 4
−2 5 5
5 −12 −6
1
−1
3

1 −2 4
−2 5 5
5 −12 −6
1
−1
3
R2=R2+2R1
3=3−51
1 −2 4
0 1 13
0 −2 −26
1
1
−2


3=3+22

1 −2 4
0 1 13
0 0 0
1
1
0


This is row echelon form
Use back substitution:
Row 2: + 13 = 1
Take = ⇒ = 1 − 13
− 2 + 4 = 1
= 1 + 2 −4
= 1 + 2 1 −13 − 4
= 3 − 30
Solution set is 3 − 30, 1 − 13,
 This is a continuation of Gaussian elimination.

 To solve the system by this method we need to manipulate
the augmented matrix by elementary row operations to put the matrix into
reduced row echelon form.

 For a matrix to be in reduced row echelon form, it must be in row
echelon form and submit to one added criteria:

Each column that contains a “leading 1”
has zeros above each “leading 1”.

Method 4: Gauss-Jordan Elimination
10 4 7 3
1 3 2 1
8 2
= + ÷
= + ÷ ÷
= + +
z y x
z y x
z y x

Solve the system by using Gauss-Jordan Elimination method:

Example: Consistent linear system,
unique solution
Solve the system by using Gauss-Jordan Elimination method:

6 3 3
5 4 2
1
1
= +
= +
= + ÷
= +
y x
y x
y x
y x
Example: Inconsistent linear system

Solve the system by using Gauss-Jordan Elimination method:

3 6 12 5
1 5 5 2
1 4 2
= ÷ ÷
÷ = + + ÷
= + ÷
z y x
z y x
z y x
Example: Consistent Linear System,
Infinitely Many Solutions
Exercise:
 Solve the system using Gauss Jordan Elimination
method
1 2 2 3
3 2
8 3
= ÷ ÷
= + +
= ÷ +
z y x
z y x
z y x
Matrix Eigenvalue Problems
 Definition:
 Let A be an n x n matrix. A real or complex number,ì
is called an eigenvalue of A if the matrix equation



is satisfied for some nonzero vector x.

 The vector x is called an eigenvector of A associated with
the eigenvalue ì.
x Ax ì =
Example
 The vector =
1
2
is an eigenvector of
3 0
8 −1
corresponding to the eigenvalue
= 3 since
=
3 0
8 −1
1
2

=
3
6

= 3

Matrix Eigenvalue Problems
 Theorem:
The eigenvalues ì of a square matrix A are the roots of the
characteristic equation of A,
0 ) det( = ÷ I A ì
(
¸
(

¸

÷
÷
=
2 2
2 5
A
Example
 Find the eigenvalues of matrix A and an
associated eigenvector for each eigenvalue.
Solution:
6 , 1
0 6 7
0
2 2
2 5
0
1 0
0 1
2 2
2 5
det
0 ) det(
2
÷ ÷ =
= + +
=
÷ ÷
÷ ÷
=
|
|
.
|

\
|
(
¸
(

¸

÷
(
¸
(

¸

÷
÷
= ÷
ì
ì ì
ì
ì
ì
ìI A
1
1
÷ = ì
6
2
÷ = ì
Use the theorem,

The eigenvalues are
and .
( )
(
(
¸
(

¸

÷
÷ +
÷ ÷
(
¸
(

¸

÷
÷
|
|
.
|

\
|
=
|
|
.
|

\
|
|
|
.
|

\
|
÷
÷
|
|
.
|

\
|
=
|
|
.
|

\
|
|
|
.
|

\
|
÷ ÷ ÷
÷ ÷ ÷
= ÷
0 0 0
0
2
1
1
~
2
1
4
1
0 1 2
0 2 4
0
0
1 2
2 4
0
0
) 1 ( 2 2
2 ) 1 ( 5
2 1 2
1 1
2
1
2
1
1
R R R
R R
x
x
x
x
0 x I A ì
The eigenvector corresponding to ì
1
:
2 1
2 1
2
1
0
2
1
x x
x x
=
= ÷
|
|
.
|

\
|
=
2
1
1
x
Back substitution:

This determines an eigenvector corresponding to ì
1
= -1 up to scalar multiple
If we choose x
2
= 2, then x
1
= 1, we obtain the eigenvector
( )
(
¸
(

¸

÷ ÷
(
¸
(

¸

|
|
.
|

\
|
=
|
|
.
|

\
|
|
|
.
|

\
|
|
|
.
|

\
|
=
|
|
.
|

\
|
|
|
.
|

\
|
÷ ÷ ÷
÷ ÷ ÷
= ÷
0 0 0
0 2 1
~
2 0 4 2
0 2 1
0
0
4 2
2 1
0
0
) 6 ( 2 2
2 ) 6 ( 5
2 1 2
2
1
2
1
2
R R R
x
x
x
x
0 x I A ì
The eigenvector corresponding to ì
2
:
2 1
2 1
2
0 2
x x
x x
÷ =
= +
|
|
.
|

\
|
÷
=
1
2
2
x
Back substitution:

This determines an eigenvector corresponding to ì
2
= -6
up to scalar multiple.

If we choose x
2
= -1, then x
1
= 2, we obtain the eigenvector
Example
 Find the eigenvalues of the given matrix and an associated
eigenvector for each eigenvalue.
(
(
(
¸
(

¸

1 0 2
0 1 0
2 0 1
Solution:
1 , 3 , 1
0 ) 1 )( 3 )( 1 (
0
0 2
1 0
2
1 0
0 1
) 1 (
0
1 0 2
0 1 0
2 0 1
÷ =
= + ÷ ÷
=
÷
+
÷
÷
÷
=
÷
÷
÷
ì
ì ì ì
ì
ì
ì
ì
ì
ì
ì
1 3
3 2
2 1
0 0 0 2
0 0 0 0
0 2 0 0
R R
R R
R R
÷
÷
÷
(
(
(
¸
(

¸

2 2
1 1
2 / 1
2 / 1
0 0 0 0
0 2 0 0
0 0 0 2
R R
R R
÷
÷
(
(
(
¸
(

¸

(
(
(
¸
(

¸

0 0 0 0
0 1 0 0
0 0 0 1
For ì
1
= 1:

~

~
0
0
1
3
=
=
x
x
|
|
|
.
|

\
|
=
0
1
0
1
x
Back substitution:

With arbitrary x
2
, x
2
≠ 0. Choose x
2
= 1,
Therefore the eigenvector is
For ì
2
= -1:

~

Back substitution:

Choose x
1
= 1 then x
3
= -1.
Therefore the eigenvector is
3 1 3
2 2
1 1
2 / 1
2 / 1
0 2 0 2
0 0 2 0
0 2 0 2
R R R
R R
R R
÷ ÷
÷
÷
(
(
(
¸
(

¸

(
(
(
¸
(

¸

0 0 0 0
0 0 1 0
0 1 0 1
0
0
3 1
2
= +
=
x x
x
|
|
|
.
|

\
|
÷
=
1
0
1
2
x
For ì
2
= 3:

~
Back substitution:

Let x
1
= 1 then x
3
= 1.
Therefore the eigenvector is
3 1 3
2 2
1 1
2 / 1
2 / 1
0 2 0 2
0 0 2 0
0 2 0 2
R R R
R R
R R
÷ +
÷ ÷
÷ ÷
(
(
(
¸
(

¸

÷
÷
÷
(
(
(
¸
(

¸

÷
0 0 0 0
0 0 1 0
0 1 0 1
0
0
3 1
2
= ÷
=
x x
x
|
|
|
.
|

\
|
=
1
0
1
3
x