Вы находитесь на странице: 1из 56

18.

Matrix Algebra (3): Reduction Method and


Inverse of a Matrix
Tony U
University of Macau

Outline

1 Matrix Representation of a System of Linear Equations


2 Solving Systems of Linear Equations: Cramers Rule
3 Solving Systems of Linear Equations: Reduction Method
4 Solving Systems of Linear Equations: Inverse of a Matrix

Matrix Representation of a System of Linear Equations

Matrix Representation of a System of Linear Equations

A linear equation a1 x1 + a2 x2 + + an xn = b can be


represented in the matrix form:

x1



x2
a1 a2 an .. = b.
.
xn

-1-

Matrix Representation of a System of Linear Equations

In general, an m n system of linear equations

a11 x1 + a12 x2 + + a1n xn = b1

a21 x1 + a22 x2 + + a2n xn = b2


..

am1 x1 + am2 x2 + + amn xn = bm

can be represented in the matrix form AX = B, where

a11 a12 a1n


x1
a21 a22 a2n
x2

A = ..
,
X
=
,
B
=

..
..
..
..
.

.
.
.
.
am1 a12 amn
xn
Note that dim(A) = m n
-2-

b1
b2
..
.
bm

Matrix Representation of a System of Linear Equations

Example 1.
Represent the following system of equations in the matrix form

=0
2x + y + z
4x + 3y + 2z = 2

2x y 3z
=0

-3-

Matrix Representation of a System of Linear Equations

Example 1.
Represent the following system of equations in the matrix form

=0
2x + y + z
4x + 3y + 2z = 2

2x y 3z
=0

Sol.: AX = B, where

2 1
1
A= 4 3
2 ,
2 1 3

x
X = y ,
z

-3-

0
B = 2 .
0

Solving Systems of Linear Equations: Cramers Rule

Solving Systems of Linear Equations: Cramers Rule


A system of n linear equations: AX = B where det(A) 6= 0,
then the system has unique solution with
x1 =

|A1 |
,
|A|

x2 =

|A2 |
,
|A|

xn =

|An |
|A|

where Aj is the matrix obtained by replacing the jth column


of A by

b1
b2

B = . .
..
bn

-4-

Solving Systems of Linear Equations: Cramers Rule

Cramers rule: can be used to solve one unknown without


solving for the others.
No solution: |A| = 0, and |Aj | =
6 0 for some j.
Infinitely many solutions: |A| = 0, and |Aj | = 0 for all
j = 1, . . . , n.
Note: Method of Reduction is more efficient than Cramers rule if
the systems are more then three equations.

-5-

Solving Systems of Linear Equations: Cramers Rule

Example 2 (Cramers rule).


Solve the following system of equations

2x + y + z
4x + 3y + 2z

2x y 3z

-6-

by Cramers rule.
=0
=2
=0

Solving Systems of Linear Equations: Cramers Rule

Example 2 (Cramers rule).


Solve the following system of equations

2x + y + z
4x + 3y + 2z

2x y 3z

by Cramers rule.
=0
=2
=0

Sol.: From question 1, the above system of equations can be


represented as a matrix form, AX = B, where



2 1
1
x
0
A= 4 3
2 , X = y , B = 2 .
2 1 3
z
0
-6-

Solving Systems of Linear Equations: Cramers Rule

The matrix

A1 = 2
0

A1 , A2 , and A3 are

1
1
2 0 1
3
2 , A2 = 4 2 2 ,
1 3
2 0 3

2 1 0
A3 = 4 3 2
2 1 0

Using Sarruss rule, we have |A| = 8, |A1 | = 8, |A2 | = 16,


and |A3 | = 8. Thus
x1 =

4
|A1 |
=
= 0.5
|A|
8

x2 =

|A2 |
16
=
=2
|A|
8

x3 =

|A3 |
8
=
= 1
|A|
8
-7-

Solving Systems of Linear Equations: Cramers Rule

The detail of using Sarruss rule to solve the determines. For


matrix A,
2

|A| = 18 + 4 4 6 + 4 + 12 = 8

2 1 3 2 1
18 4 4

6 412
For matrix A1 ,

|A1 | = 2 + 6 = 4

0 1 3 0 1
0

0 6

0 2
-8-

Solving Systems of Linear Equations: Cramers Rule

For matrix A2 ,

0 3 2

|A2 | = 12 4 = 16

12 0

For matrix A3 ,
2

2 1 0
0 4 0

|A3 | = 4 + 4 = 8

2 1
0

-9-

Solving Systems of Linear Equations: Reduction Method

Solving Systems of Linear Equations: Reduction Method

Basic idea: Focus on the coefficients of variables and constant


terms
Elementary row operations:
Notation

Corresponding row operation

1.

Ri Rj

Interchange rows Ri and Rj .

2.

kRi

Multiply row Ri by the nonzero constant k.

3.

kRi + Rj

Add k times row Ri to row Rj


(row Ri remains unchanged)

-10-

Solving Systems of Linear Equations: Reduction Method

0 1
0

1 0 0

0 1 0
0 0 1

1
1
0

0

1 0
1 0
0 1 0 1
0 0
0 0 1

-11-

Solving Systems of Linear Equations: Reduction Method

The last matrix is a reduced matrix, a matrix is said to be a


reduced matrix provided that all of the followings are true:
1. If a row does not consist entirely of zeros, then the first
nonzero entry in the row, called the leading entry, is 1,
whereas all other entries in the column in which the 1 appears
are zeros.
2. The first nonzero entry in each row is to the right of the first
nonzero entry in each row above it.
3. Any rows that consist entirely of zeros are at the bottom of
the matrix.

-12-

Solving Systems of Linear Equations: Reduction Method

Checking for solutions: m = n


For m = n: if the final

1 0 0
0 1 0
0 0 1

1 0
0 1
0 0 0

1 0
0 1
0 0 0

matrix is

Unique solution.

No solution.

Infinitely many solution.


0

-13-

Solving Systems of Linear Equations: Reduction Method

Example 3
Solve the following

x +y +z
a.
3x y + 2z

x + 2y + 3z

equation systems using reduction method:


= 0
= 1
= 5

-14-

Solving Systems of Linear Equations: Reduction Method

Example 3
Solve the following

x +y +z
a.
3x y + 2z

x + 2y + 3z

equation systems using reduction method:


= 0
= 1
= 5

Sol.: Solving the equation system is equivalent to reduce the


following matrix:

0
1
1 1
3 1 2 1 ,
1
2 3 5
-14-

Solving Systems of Linear Equations: Reduction Method

3R1 + R2 ,
1
1 1
0

3 1 2 1 1R1 + R3
1
2 3 5

1 1 1
0 R
2 + R1 ,
1

14 R2 0 1 14
R
+
R
0
2
3
4
0 1 2 5
0

7 R3

1 0
0 1
0 0

3
4
1
4

1
1
1
0
0 4 1 1
0
1
2 5

0 34 14
1
1 14
4
0 74 21
4

3
4 R3 + R1 ,

1 0 0
2
1
R3 + R1 0 1 0
1 ,
4
3
0 0 1 3

14
1
4

Therefore, the solution set is

x =2
y =1

z = 3
-15-

Solving Systems of Linear Equations: Reduction Method

x +y +z
b.
x y +z

x y z

= 1
= 2
= 3

-16-

Solving Systems of Linear Equations: Reduction Method

x +y +z
b.
x y +z

x y z

= 1
= 2
= 3

Sol.: Solving the equation system is equivalent to reduce the


following matrix:

1
1
1 1
1 1
1 2 ,
1 1 1 3

-16-

Solving Systems of Linear Equations: Reduction Method

1
1
1 1 R
1 + R2 ,
1
1
1 1

1 1
1 2 R1 + R3 0 2
0 1
1 1 1 3
0 2 2 2

3
1 R
2 + R1 ,
1
1
1
1
0
1
2

12 R2 0
0 12
1
0 12 2R2 + R3 0 1
0 2 2
2
0 0 2
1

3
1 0 1
1 0 0
2
2
1
2 R3 0 1 0 12 R3 + R1 0 1 0 12 ,
0 0 1 1 0 0 1 1
2
2

Therefore, the solution set is

x =2
y = 0.5

z = 0.5
-17-

Solving Systems of Linear Equations: Reduction Method

2x1 + 4x2 2x3 = 10


c.
3x1 x2 + 4x3 = 12

x1 2x2 + x3 = 0

-18-

Solving Systems of Linear Equations: Reduction Method

2x1 + 4x2 2x3 = 10


c.
3x1 x2 + 4x3 = 12

x1 2x2 + x3 = 0

Sol.: Solving the equation system is equivalent to reduce the


following matrix:

2
4 2 10
3 1
4 12 ,
1 2
1 0

-18-

Solving Systems of Linear Equations: Reduction Method

2
4 2 10
1
3 1
4 12 12 R1 3
1 2
1 0 1

3R1 + R2 1
5
2 1
1

0 7
7 3 7 R2 0
R1 + R3
0
0
0
5 0

1 0
1 29
7
2R2 + R1 0 1 1 37 .

0 0
0 5
Therefore, this equation system has no solution

-19-

2 1 5
1
4 12
2
1 0

2 1 5
1 1 37
0
0 5

Solving Systems of Linear Equations: Reduction Method

d.

x y +z
3x + y 2z

4x + 2y 3z

= 10
= 17
= 7

-20-

Solving Systems of Linear Equations: Reduction Method

d.

x y +z
3x + y 2z

4x + 2y 3z

= 10
= 17
= 7

Sol.: Solving the equation system is equivalent to reduce the


following matrix:

1 1
1 10
3
1 2 17 ,
4
2 3 7

-20-

Solving Systems of Linear Equations: Reduction Method

1 1
1 10 3R
1 + R2 ,
1

1 2 17
4R1 + R3
0
4
2 3 7
0

R2 + R1
10
1 1
1

0.5R2 0
1 0.5 23.5 2R2 + R3

0 2
1
47

1 1 10
2 1 47
2 1 47

1 0
0.5 13.5
0 1 0.5 23.5
0 0
0
0

Therefore, this equation system has infinitely many solutions,

x = 13.5 0.5r
y = 23.5 + 0.5r

z =r
-21-

Solving Systems of Linear Equations: Reduction Method

Checking for solutions: m > n


For example m = 4, n = 3: if the final matrix is

1 0 0
0 1 0

0 0 1 No solution.
0 0 0

1 0 0
0 1 0

0 0 1 Unique solution.
0 0 0 0

1 0
0 1

0 0 0 0 Infinitely many solutions.


0 0 0 0
-22-

Solving Systems of Linear Equations: Reduction Method

Example 4.
Solve the following equation systems using reduction method:

2x 5y + z = 7

3x + y 2z = 7
a.
x + 2y + 3z = 14

x + 3y 4z = 25

-23-

Solving Systems of Linear Equations: Reduction Method

Example 4.
Solve the following equation systems using reduction method:

2x 5y + z = 7

3x + y 2z = 7
a.
x + 2y + 3z = 14

x + 3y 4z = 25
Sol.: Solving the equation system is equivalent to reduce the
following matrix:

2 5
1
7
3
1 2 7

,
1
2
3
14
1
3 4 25
-23-

Solving Systems of Linear Equations: Reduction Method

1
7
2 5
1
7
1 52
2
2
3
1 3
1
2
7
1
2
7

R1
2
1
2
3
14
2
3
14
1
1
3 4 25
1
3 4 25

3R1 + R2 ,
1 52
R1 + R3 ,
0 13
2
R1 + R4
9
0
2
0

1
2

1
2
12
5
2
72

7
2
7
2
21
2
43
2

-24-

1 52

0
2

13 R2
0
0

1
9
2
1
2

1
2
1
13
5
2
72

7
2
7
13
21
2
43
2

Solving Systems of Linear Equations: Reduction Method

1 52

0
0

0 1

13
28 R3

1 0

1
9
2
1
2

1
2
1
13
5
2
72
9
13
1
13

0 0

0 0

46
13

7
2
7
13
21
2
43
2
28
13
7
13

5
2 R2 + R1 ,
92 R2 + R3 ,

R2 + R4
2

9
13
R3 + R1 ,
1
13 R3 + R2 ,

46
R3 + R4
13

276
13

1 0

0 1

0 0
0 0

1
0

0
0

0
1
0
0

9
13
1
13
28
13
46
13

28
13
7
13
168
13
276
13

0 2
0 1

6
1
0
0

Therefore, this equation system has infinitely many solutions,

x = 2
y = 1

z=6
-25-

Solving Systems of Linear Equations: Reduction Method

3x + 5y + 2z

x +y +z
b.
2x + 3y

3x 2z

=
=
=
=

5
2
2
6

-26-

Solving Systems of Linear Equations: Reduction Method

3x + 5y + 2z

x +y +z
b.
2x + 3y

3x 2z

=
=
=
=

5
2
2
6

Sol.: Solving the equation system is equivalent to reduce the


following matrix:

3
1

2
3

5
2
1
1
3
0
0 2

-26-

5
2
,
2
6

Solving Systems of Linear Equations: Reduction Method

3
1

2
3

5
2
1
1
3
0
0 2

2
R1 R2

2
6

1
3
2
3

3R1 + R2 ,

1
1
1
2
2R1 + R3 ,

0
2 1 1
R2 R3
3R1 + R4
0

1 2
2
0
0 3 5

-27-

1
1
5
2
3
0
0 2

2
5

2
6

1
1
1
2
0
1 2
2

0
2 1 1
0
0 3 5

Solving Systems of Linear Equations: Reduction Method

R2 + R1 ,
1
1
1
2
2R2 + R3 ,
0

1
2
2

3R2 + R4
0

2 1 1
0 3 5
0

1
0
3 R3 0

0
3
1 2
0
1
0 11

1
0
0
0

0
3
4
1 2 2

0
3
3
0 11 6

3R3 + R1 ,
1 0 0
4
2R3 + R2 ,
0 1 0
2
11R3 + R4
0 0 1
1
6
0 0 0

Therefore, this equation system has no solution

-28-

1
0

1
5

Solving Systems of Linear Equations: Reduction Method

3x + 2y + z
2x + 43 y + 23 z
c.
9
x + 3y + 32 z

152
5
2 x + 5y + 2 z

=
=
=
=

6
4
9
15

-29-

Solving Systems of Linear Equations: Reduction Method

3x + 2y + z
2x + 43 y + 23 z
c.
9
x + 3y + 32 z

152
5
2 x + 5y + 2 z

=
=
=
=

6
4
9
15

Sol.: Solving the equation system is equivalent to reduce the


following matrix:
3

9
2

4
3

2
3
3
2
5
2

,
9

15
2

3
5

-29-

15

Solving Systems of Linear Equations: Reduction Method

9
2

4
3

2
3
3
2
5
2

4
1 2
2 R1 9
9
2

15
2

2R1 + R2 ,
92 R1 + R3 , 1

0
15
R1 + R4
0
2
0

5
2
3

0
0
0

15

15
2

2
3
4
3

3
5

1
3
2
3
3
2
5
2

15

1
3

2
0 0

0 0
0 0

Therefore, this equation system has infinitely many solutions,

x = 2 23 r 13 s
y =r

z =s
-30-

Solving Systems of Linear Equations: Inverse of a Matrix

Solving Systems of Linear Equations: Inverse of a Matrix

If A is a square matrix and AB = BA = I , then A is said to be


invertible and B is called the inverse of A and denoted as A1 .
An invertible matrix has a unique inverse. That is, if B and C
are both inverses of the matrix A, then B = C .
If A and B are invertible matrices of the same dimension, then
AB is invertible, and (AB)1 = B 1 A1 .

-31-

Solving Systems of Linear Equations: Inverse of a Matrix

Finding the Inverse of a Matrix

By Reduction Procedure: For a matrix A, begin with the


augmented matrix [A|I ] and use row operations to obtain the
final tableau, or augmented matrix, [I |A1 ].
Using Cofactors: If A is an invertible matrix, then
A1 =

1
adj(A),
det(A)

where adj(A) is the adjoint of A, which is the transpose of


the matrix AC of cofactors from A.

-32-

Solving Systems of Linear Equations: Inverse of a Matrix

Example 5.

For the following, determine A1 if A is invertible.

1
0 2
a. A = 4 2
1 .
1
2 10
b. A =

3 2
6 4

-33-

Solving Systems of Linear Equations: Inverse of a Matrix

a. Using row operations to augmented matrix

1
4
1

12 R2 0

0
2R3 + R1 , 1

R3 + R2 0
2
0

0
2
2
0
1
2
0
1
0

4R1 + R2 ,
0

0 R1 + R3
1

2
1
0 0

92
2 12 0 2R2 + R3

8 1
0 1

0
9 2 2

4 29 .
0 41
2
1
0
0

2
1
10

0
1
0

9 2

Therefore, the A1 = 41
2

9
2

5 1

-34-

1
0
0

0
2
2

92

2
9
8

1
4
1

0
0
1

0 0

21 0
1 1
0
1
0

Solving Systems of Linear Equations: Inverse of a Matrix

b.


3 2 1 0
6 4 0 1

1
3 R1

1
6

2
3

1
3

0
0 1

Therefore, A1 does not exist.

-35-

6R1 + R2

1
0

2
3

1
3

0
0 2 1

Solving Systems of Linear Equations: Inverse of a Matrix

Example 6.
Repeat the above example by using the cofactor method.

1
0 2
a. A = 4 2
1 .
1
2 10

-36-

Solving Systems of Linear Equations: Inverse of a Matrix

Example 6.
Repeat the above example by using the cofactor method.

1
0 2
a. A = 4 2
1 .
1
2 10
Sol.: Using Sarruss rule,
det(A) =(1)(2)(10) + (0)(1)(1) + (2)(4)(2)
(2)(2)(1) (1)(1)(2) (0)(4)(10)
=20 16 4 2 = 2

-36-

Solving Systems of Linear Equations: Inverse of a Matrix

Let Cij be the ith row and jth column of cofactors of A,








1
1
1+1 2
1+2 4
C11 =(1)
2 10 = 18 C12 = (1)
1 10 = 41







2
1+3 4 2
2+1 0
C13 =(1)
= 10 C21 = (1)
1
2 10 = 4
2







2
2+2 1
2+3 1 0
C22 =(1)
=
8
C
=
(1)
23
1 10
1 2 = 2




0 2


3+1
3+2 1 2

C31 =(1)
= 4 C32 = (1)
= 9
2


1
4
1


1
0
C33 =(1)3+3
= 2
4 2
-37-

Solving Systems of Linear Equations: Inverse of a Matrix

18

41

10

A1 =

5 1

adj(A) = AT
C = 41 8 9
10 2 2

AC = 4 8 2 ,
4 9 2
1
adj(A)
det(A)

18 4
1
=
41 8
2
10 2

9 2 2
41
= 2 4 92

18 4 4

9
2

-38-

Solving Systems of Linear Equations: Inverse of a Matrix

b. A =

3 2
6 4

-39-

Solving Systems of Linear Equations: Inverse of a Matrix

b. A =

3 2
6 4

Sol.:,
det(A) = 12 12 = 0.
Since det(A) = 0,

1
det(A)

is undefined, A1 does not exist

-39-

Solving Systems of Linear Equations: Inverse of a Matrix

Properties of Inverse
A must be a square.
The inverse of A must be the same dimension of A.
A is invertible if and only if det(A) 6= 0.
A is invertible if and only if A is linearly independent (i.e. no
multiples) rows and columns.
(AT )1 = (A1 )T .
An invertible matrix is called nonsingular matrix; a
non-invertible matrix is called singular matrix.
-40-

Solving Systems of Linear Equations: Inverse of a Matrix

Inverse of Systems of Equations

A linear system written as matrix equation AX = B will have


the solution X = A1 B, provided that A1 exists.
This method is relatively inefficient than the reduction
method unless the inverse is known beforehand. On the other
hand this method is advantageous for solving any square
linear system whose B changes, but A remains the same. As
with reduction method, the entire method must be repeated if
there is a change in B.

-41-

Solving Systems of Linear Equations: Inverse of a Matrix

Example 7.

Solve the following system of equations by


the coefficient matrix.

x1 2x3 =

4x1 2x2 + x3 =

x1 + 2x2 10x3 =

-42-

finding the inverse of


1
2
1

Solving Systems of Linear Equations: Inverse of a Matrix

Sol.: The above system can be represented as AX = B, where

1
0 2
x1
1
A = 4 2
1 , X = x2 , B = 2 ,
1
2 10
x3
1

9 2

From the example 5., A1 = 41


2
9 2
x1
x2 =
4
41
2
x3
5 1

9
2

5 1

, the solution is

1
7
9
2 = 17
2
1
4
1

-43-

Вам также может понравиться