12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations...

65
12.1 System of Linear Equations 12.2 Solving Equations by Inverses of Matrices 12.3 Solving Equations by Cramer’s Rule Chapter Summary Case Study System of Linear Equations 12 12.4 Solving Equations by Gaussian Elimination 12.5 Homogeneous Systems of Linear Equations

Transcript of 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations...

Page 1: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

12.1 System of Linear Equations12.2 Solving Equations by Inverses of Matrices12.3 Solving Equations by Cramer’s Rule

Chapter Summary

Case Study

System of Linear Equations12

12.4 Solving Equations by Gaussian Elimination12.5 Homogeneous Systems of Linear Equations

Page 2: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 2

In a Biology lesson,a group of students are doing experiments to study the process of photosynthesis.

Case StudyCase Study

But we need to know the amount of each chemical first!

Since we know what chemicals are involved in the reaction, let us write down the balanced equation for this process.

During the process, carbon dioxide (CO2) and water (H2O) would be converted into glucose (C6H12O6), and some oxygen (O2) is released:

p CO2 q H2O r C6H12O6 s O2

where p, q, r and s are real numbers.

In order to balance the equation, the numbersof atoms of carbon (C), oxygen (O) and hydrogen (H) should be the same on both sides of the equation.

For example: Number of carbon atoms before the process p Number of carbon atoms after the process 6r p 6r

Page 3: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 3

We can express the above details as a system of linear equations:

Case StudyCase Study

Chemical equation:

p CO2 q H2O r C6H12O6 s O2

where p, q, r and s are real numbers.Number of C atoms before the process pNumber of C atoms after the process 6r p 6r

0122026206

or122

2626

rqsrqprp

rqsrqp

rp

Number of O atoms before the process 2p + qNumber of O atoms after the process 6r + 2s 2p + q 6r +

2sNumber of H atoms before the process 2qNumber of H atoms after the process 12r 2q 12r

Page 4: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 4

A system of m linear equations (or a linear system) in nunknowns x1, x2, x3, , xn is a set of equations of the form

1122 .1 .1 System of Linear EquationsSystem of Linear Equations

The constants aij are called the coefficients of the system of linear equations.

For example, is a system of two linear equations with

three unknowns x, y and z.

mnmnmm

nn

nn

bxaxaxa

bxaxaxa

bxaxaxa

2211

22222121

11212111

56

232

zyx

zyx

Page 5: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 5

In a system of linear equations, if there exists a set of numbers {N1, N2, …, Nn} satisfying all the equations, then the system is said to be solvable or consistent, and

Otherwise, the system is said to be non-solvable or inconsistent. The system of linear equations may be represented by the matrix equation

1122 .1 .1 System of Linear EquationsSystem of Linear Equations

Ax b, where , and .

mnmm

n

n

aaa

aaa

aaa

A

21

22221

11211

nx

x

x

2

1

x

mb

b

b

2

1

b

Here, A is called the coefficient matrix, x is called the unknown matrix and (N1, N2, …, Nn)t is called the solution matrix.

For example, can be expressed as .

56

232

zyx

zyx

5

26

113

12

z

y

x

{N1, N2, …, Nn} is called a solution of the system of linear equations.

Page 6: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 6

Suppose we have a system of linear equations of order 3:

We can express the system in the matrix equation Ax b, where A is a 3 3 coefficient matrix.

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

If A is non-singular, then the solution matrix x can be found by computing the inverse of A, and the solution is unique.

3333232131

2323222121

1313212111

bxaxaxa

bxaxaxa

bxaxaxa

Page 7: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 7

Proof: If A is a non-singular matrix, then A1 exists.

Ax b

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

Therefore, the solution of Ax b exists.

Theorem 12.1Let A be a square matrix. If A is non-singular, then the system of linear equations Ax b has a unique solution given by x A1b.

(A1A)x A1bIx A1bx A1b

Now suppose Ax b has two solutions x1 and x

2. Then Ax1 b and Ax2 b. x1 A1b and x2 A1b.

x1 x2

Therefore, the solution of Ax b is unique.

Page 8: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 8

Example 12.1T

Solution:

Solve by the method of inverse matrix.

1452123

yxyx

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

Express the system of equations as , where .

14

12

y

xA

52

31A

)2)(3()5)(1( A01

A1 exists and .12

351

A

14

12

12

35

y

x

10

18

The unique solution of the system of linear equations is x 18, y 10.

Page 9: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 9

Example 12.2T

Solution:

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

Solve by the method of inverse matrix.

223 034212

yxzyxzyx

Express the system of equations as where ,

2

0

1

z

y

x

A .

023

342

211

A

A1 exists and

6116

169

1146

35

11A

035 A

2

0

1

6116

169

1146

35

1

z

y

x

5

45

15

4

28

7

28

35

1

Page 10: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 10

We know that a square matrix A is non-singular if and only if |A| 0.

This theorem can be used to test whether a system of linear equations has a unique solution.

When |A| 0, A1 does not exist, so the method of inverse matrix cannot be applied.

In this situation, either of the following cases will happen:

1. the system of equations does not have any solution, or 2. the system of equations has infinitely many solutions.

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

Theorem 12.2Let A be a square matrix. The system of linear equations Ax b has a unique solution if and only if |A| 0.

Page 11: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 11

Example 12.3T

Solution:

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

Determine the number of solutions to the followingsystems of linear equations.

(a) (b)

12

12

yx

yx

1096

532

yx

yx

(a) Rewrite the system of equations as .1

1

21

21

y

x

)1)(2()2)(1(21

21

0

The system does not have a unique solution.

Consider .)2(......... 12

)1(............ 12

yx

yx

)3(............. 12 :)1(1 yxSince (2) and (3) are the same, we say that equation (2) is redundant and the linear system has only one equation –x + 2y 1. Therefore, the system of linear equation has infinitely many solutions.

Page 12: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 12

Example 12.3T

Solution:

Determine the number of solutions to the followingsystems of linear equations.

(a) (b)

1122 ..22 Solving Equations by Inverses Solving Equations by Inverses of Matricesof Matrices

12

12

yx

yx

1096

532

yx

yx

(b) Rewrite the system of equations as .10

5

96

32

y

x

)6)(3()9)(2(96

32 0

The system does not have a unique solution.

(3) – (2): 0 5, which is impossible. Therefore, the system of linear equations has no solution.

Consider

)2(.......... 1096

)1(............ 532

yx

yx

)3(.............. 1596:3)1( yx

Page 13: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 13

Finding the inverse of the coefficient matrix is sometimes complicated, so in this section we will study how to use Cramer’s rule to solve a system of linear equations in a more convenient way.

1122 ..33 Solving Equations by Cramer’s RuleSolving Equations by Cramer’s Rule

Theorem 12.3 Cramer’s Rule of Order 2

Given a system of linear equations

If the determinant of the coefficient matrix A is non-zero, the unique solution of the system is given by

and

.2222121

1212111

bxaxa

bxaxa

A

ab

ab

x 222

121

1 .221

111

2 A

ba

ba

x

Page 14: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 14

Proof: From Theorem 12.1, if the determinant of the coefficient matrix A is non-zero, then x A1b, where

x and b .

2

1

2

1

2221

1211 , bb

xx

aa

aaA

For x A1b, we have .

2

1

2221

1211

2

1 1bb

aa

aa

Axx

)(1

and )(1

12121122121221 babaA

xbabaA

x

If we express x1 and x2 in determinant form, we can obtain

. and 221

111

2222

121

1 A

ba

ba

xA

ab

ab

x

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

Definition of A1

Page 15: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 15

Example 12.4T

Solution:

Solve by Cramer’s rule.

1252

53

yx

yx

The determinant of the coefficient matrix

52

13

13

The unique solution of the system of linear equations is

512

15

x13

13

,1

122

53

y13

26

.2

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

Page 16: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 16

For systems of linear equations of order 3, Cramer’s rule is stated as follows:

Comparing Theorems 12.3 and 12.4, we can see that in both cases, the solution xj can be expressed as a fraction with |A| as the denominator, and the numerator is the determinant that replaces the elements in the jth column of A by bi’s.

Theorem 12.4 Cramer’s Rule of Order 3

Given a linear system

If the determinant of the coefficient matrix A is non-zero, the unique solution of the system is given by

.3333232131

2323222121

1313212111

bxaxaxabxaxaxabxaxaxa

. , , 33231

22221

11211

333331

23221

13111

233323

23222

13121

1 A

baabaabaa

xA

abaabaaba

xA

aabaabaab

x

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

Page 17: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 17

Example 12.5T

Solution:

Solve by Cramer’s rule.

32 222 2

zyxzyxzy

The determinant of the coefficient matrix 1

211

122

110

1

213

122

112

x 2

231

122

120

y 0

311

222

210

z

The unique solution of the system of linear equations is

,1

xx ,2

yy .0

zz

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

Page 18: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 18

So it is only applicable when the coefficient matrix A is a non-singular matrix.

Although Cramer’s rule can be used to find the solution

quickly, the solution is undefined when |A| 0.

j

j

xx

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

Page 19: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 19

Example 12.6T

Solution:

Suppose we have a system of linear equations where a, b and c are real numbers. (a) If the system of linear equations has a unique solution, show that a, b and c are distinct and a + b + c 0.

,

1

11

42

42

42

zcyccx

zbybbxzayaax

(a) The determinant of the coefficient matrix ∆

42

42

42

cccbbbaaa

3

3

3

1 1 1

ccbbaa

abc

33

33

3

0 0 1

acacabab

aaabc

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

R2 R1 R2

R3 R1 R3

))(( acababc

))()(( 22 abbaccacababc

22

22

3

10 10

1 ))((

caccaabb

aaacababc

)]()[( 2222 aabbaacc

))()()(( cbabcacababc

Page 20: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 20

∵ The system of linear equations has a unique solution. 0i.e., abc(b – a)(c – a)(c – b)(a + b + c) 0

a, b, c are distinct and a + b + c 0.

Example 12.6T

Solution:

Suppose we have a system of linear equations where a, b and c are real numbers. (a) If the system of linear equations has a unique solution, show that a, b and c are distinct and a + b + c 0.

(a)

,

1

11

42

42

42

zcyccx

zbybbxzayaax

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

From the given equations, a 0, b 0 and c 0.

Page 21: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 21

Example 12.6T

Solution:

Suppose we have a system of linear equations where a, b and c are real numbers. (a) If the system of linear equations has a unique solution, show that a, b and c are distinct and a + b + c 0.(b) Solve the system of linear equations if it has a unique solution.

42

42

42

1 1 1

ccbbaa

x

4422

4422

42

0 0 1

acacabab

aa

22

22

42

2222

1010

1))((

acab

aaacab

))()()()()(( accbbaacbcab

,

1

11

42

42

42

zcyccx

zbybbxzayaax

(b)

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

R2 R1 R2

R3 R1 R3

)(

))()((

cbaabc

accbba

xx

Take out the common factors

Page 22: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 22

4

4

4

111

ccbbaa

y

44

44

4

001

acacabab

aa

))((01))((01

1

))((

22

22

4

acacabab

aa

acab

))((1))((1

))(( 22

22

acacabab

acab

)(

))()((222 cabcabcba

bcacab

Example 12.6T

Solution:

Suppose we have a system of linear equations where a, b and c are real numbers. (a) If the system of linear equations has a unique solution, show that a, b and c are distinct and a + b + c 0.(b) Solve the system of linear equations if it has a unique solution.

,

1

11

42

42

42

zcyccx

zbybbxzayaax

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

(b)

)(

222

cbaabc

cabcabcba

yy

Page 23: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 23

Example 12.6T

Solution:

Suppose we have a system of linear equations where a, b and c are real numbers. (a) If the system of linear equations has a unique solution, show that a, b and c are distinct and a + b + c 0.(b) Solve the system of linear equations if it has a unique solution.

,

1

11

42

42

42

zcyccx

zbybbxzayaax

1 1 1

2

2

2

ccbbaa

z

001

22

22

2

acacabab

aa

01011

))((

2

acab

aaacab

))()(( bcacab

1122 .3 .3 Solving Equations by Solving Equations by Cramer’s RuleCramer’s Rule

(b)

)(

1

cbaabcz

)(

))()((

cbaabc

accbbax

)(

222

cbaabc

cabcabcbay

The unique solution of the system of linear equations is

Page 24: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 24

In the last two sections, we learnt how to solve systems of linear equations of order 2 and 3.

However, those methods can only be applied when the coefficient matrix is a non-singular square matrix.

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

If the linear system has an infinite number of solutions, we cannot find the solutions using those methods.

Therefore, in this section, we will learn a general method for solving systems of linear equations.

Before introducing the method, we first define the row echelon form for a linear system:

Page 25: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 25

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Definition 12.1 Row Echelon FormA system of linear equations is said to be in row echelon form if it is in the form:

mnmnm

nn

nn

nn

bxax

bxaxbxaxaxbxaxaxax

333

223232

113132121

The row echelon form of a system of linear equations has the following characteristics: 1. The system contains n unknowns x1, x2, x3, …, xn.2. The first non-zero term of each row has a coefficient of 1.3. In any two successive rows, for example, the ith and (i + 1)th

rows, if the ith row does not consist entirely of zero terms, then the number of leading zeros in the (i + 1)th row must be greater than the number of leading zeros in the ith row.

Page 26: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 26

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

For example, is in row echelon form, but

and are not in row echelon form.

83313

zzyzyx

11621232123

zyxzyxzy

1013235

zzyxzy

If a system of equations is given, we can perform any of the following three elementary transformations to transform it into the row echelon form, without affecting the solution of the system:

1. interchanging the position of two equations,2. multiplying both sides of an equation by a non-zero number,3. adding an arbitrary multiple of any equation to another equation.

Page 27: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 27

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

For example, transform the following system of linear

equations into row echelon form:

)3...(1162)2.....(1232)1...(123

zyxzyxzy

Step 1: Interchange (1) and (3), we have

12312321162

zyzyxzyx

Step 2: Add (–2) the 1st equation to the 2nd equation, we have

12321147

1162

zyzyzyx

Step 3: Multiply the 2nd equation by , we have7

1

12332

1162

zyzyzyx

Step 4: Add (–2) the 2nd equation to the 3rd equation, we have

15532

1162

zzyzyx

Step 5: Multiply the 3rd equation by , we have5

1

332

1162

zzyzyx

Page 28: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 28

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

This process of transforming a system into row echelon form is called Gaussian elimination.

As shown above, the value of z can be found directly from the third equation, i.e., z 3. By substituting the value of z into the second equation, we can find the value of y. Finally, x can be solved by substituting the values of y and z into the first equation.

This process is called back-substitution.

332

1162

11621232123

zzyzyx

zyxzyxzy

Page 29: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 29

Example 12.7T

Solution:(a) Interchange the 1st equation a

nd the 2nd equation, we have

Given the system of linear equations (E):

(a) Reduce (E) in row echelon form. (b) Hence solve (E).

.645

822625

zyxzyxzyx

645262582

zyxzyxzyx

Multiply the 1st equation by –1, we have

6452625

82

zyxzyxzyx

Add (1) the 3rd equation to the 2nd equation, we have

6453262

82

zyxzyzyx

Add (5) the 1st equation to the 3rd equation, we have

34643262

82

zyzyzyx

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Page 30: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 30

Example 12.7T

Solution:

Given the system of linear equations (E):

(a) Reduce (E) in row echelon form. (b) Hence solve (E).

.645

822625

zyxzyxzyx

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

3063262

82

zzyzyx

2

1

30616382

zzyzyx

Multiply the 3rd equation by

, we have6

1

)3(........... 5)2(...... 163)1(......... 82

zzyzyx

which is the row echelon form of (E).

(a) Add (2) the 2nd equation to the 3rd equation, we have

Multiply the 2nd equation by , we have

Page 31: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 31

Example 12.7T

Solution:(b)

From (3), we have z 5. Substituting z 5 into (2), we have y 1.

Substituting y 1 and z 5 into (1), we have x 3. The unique solution of the system of linear equations is

x 3, y 1, z 5.

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Given the system of linear equations (E):

(a) Reduce (E) in row echelon form. (b) Hence solve (E).

.645

822625

zyxzyxzyx

)3(........... 5)2(...... 163)1(......... 82

645822625

zzyzyx

zyxzyxzyx

Page 32: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 32

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

In Gaussian elimination, since the elementary transformations involve the coefficients of the linear system only, we may use matrices to shorten the operations.

First we need to define the augmented matrix:

Definition 12.2 Augment Matrix Given a system of linear equations, the matrix formed by adding a column of constant terms to the right hand side of the coefficient matrix is called the augmented matrix of the system of linear equations.

For example, the augmented matrix of the linear system

is given by .

332623

53

zyxzyxzy

365

312231

310

Page 33: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 33

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Similar to the system of equations, we can also define the row echelon form for a matrix:

Given an augmented matrix, we can transform it into row echelon form using any of the following three elementary row operations: 1. interchanging the position of two rows, 2. multiplying a row by a non-zero number, 3. adding an arbitrary multiple of any row to another row.

Definition 12.3 Row Echelon Form for MatricesA matrix is said to be in row echelon form if it satisfies the following conditions: 1. The first non-zero element in each row is 1.2. For each row which contains non-zero elements, the number of leading zeros must be fewer than the number of leading zeros in the row directly below it.3. The rows in which all elements are zero are placed below the rows that have non-zero elements.

Page 34: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 34

Example 12.8T

Solution:

Using Gaussian elimination, solve the following systems of linear equations.

(a) (b)

62302332

zyxzyxzyx

29322132

zyxzyxzy

621302113321(a)

31150

31103321

1260031103321

210031103321

We have .

23332

zzyzyx

The unique solution of the system of linear equations is x 1, y 5, z 2.

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

R2 R1 R2

R3 3R1 R3

R3 5R2 R3

6

1R3 R3

Page 35: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 35

Example 12.8T

Solution:(b)

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

211193221302

130293222 1 11

312013540

2111

312077002111

Using Gaussian elimination, solve the following systems of linear equations.

(a) (b)

62302332

zyxzyxzyx

29322132

zyxzyxzy

R1 R3

R1 (1) R1

R2 2R1 R2

R3 2R1 R3

R2 2R3 R2

770031202111

R2 R3

11002

3

2

110

2111

Page 36: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 36

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

We have .

12

3

2

12

z

zy

zyx

The unique solution of the system of linear equations is x 1, y 2, z 1.

Example 12.8T

Solution:(b)

Using Gaussian elimination, solve the following systems of linear equations.

(a) (b)

62302332

zyxzyxzyx

29322132

zyxzyxzy

211193221302

11002

3

2

110

2111

Page 37: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 37

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

In addition to solving linear systems with a unique solution, we can also use Gaussian elimination to determine whether the equations in the system are inconsistent or redundant, and thus determine the number of solutions.

Page 38: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 38

Example 12.9T

Solution:

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Using Gaussian elimination, solve the following systems of equations.

(a) (b)

62721445432

zyxzyxzyx

817961433123

zyxzyxzyx

6272144543121(a)

003020303121

)2;4(

313

212

RRRRRR

)( 200020303121

332 RRR

We have

)3(...... 20)2(...... 23)1(....... 32

zyzyx

From equation (3), we have 0 2, which is impossible.Thus, the system of linear equations has no solution.

Page 39: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 39

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

8179614331123

10155023101123

)2 ;(

313

212

RRRRRR

)5(000023101123

323 RRR

We have

)3(...... 00)2(...... 23)1(....... 123

zzyzyx

Example 12.9T

Solution:

Using Gaussian elimination, solve the following systems of equations.

(a) (b)

62721445432

zyxzyxzyx

817961433123

zyxzyxzyx

(b)

Hence the last equation is redundant which means the system has infinitely many solutions.

Page 40: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 40

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Let z t, where t can be any real number.

Substituting z t into (2), we have

tyty

3223

Substituting z t and y 2 + 3t into (1), we have

1)32(23 ttx3

55 tx

The required solution is y 2 + 3t, z t, where t can be any real number.

,3

55

tx

Example 12.9T

Solution:

Using Gaussian elimination, solve the following systems of equations.

(a) (b)

62721445432

zyxzyxzyx

817961433123

zyxzyxzyx

(b)

)3(...... 00)2(...... 23)1(....... 123

zzyzyx

Page 41: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 41

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Remarks: The solutions of the systems of linear equations that are expressed in terms of free variable(s) are known as general solutions of the systems.

The form of general solutions may not be unique.

Page 42: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 42

Example 12.10T

Solution:

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

Given a system of linear equations (E):

Find the values of a and b such that the system of linear equations (E) has (a) a unique solution, (b) infinitely many solutions, (c) no solution, and solve the system in cases where (E) has solution(s).

.3

2423

bazyxzyxzyx

Let .

a

A

13

412

111

a

A

13

412

111

13

12)1(

3

42)1(

1

41)1(

aa

)5)(1()122)(1()4)(1( aa11 a

Page 43: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 43

Example 12.10T

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

(a) If the system of linear equations has a unique solution, then |A| 0. –a + 11

0Hence the conditions for (E) to have a unique solution are a 11 and b can be any real number. By Cramer’s rule,

1031

412

113

baab

x

30243

422

131

baab

y

713

212

311

bb

z

The unique solution of the system is

,11

103

a

bax

,11

3024

a

bay

.11

7

a

bz

(a) Find the values of a and b such that the system of linear equations (E) has a unique solution, and solve the system in cases where (E) has solution(s).

Solution:

Page 44: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 44

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

(b) If the system of linear equations does not have a unique solution, then |A| 0, i.e., a 11.

b111324123111

98404210

3111

b)3 ;2(

313

212RRRRRR

70004210

3111

b)4( 323 RRR

Also if the system has infinitely many solutions, we need b + 7 0. Hence the conditions for (E) to have infinitely many solutions are a 11 and b 7.

Example 12.10T(b) Find the values of a and b such that the system of linear

equations (E) has infinitely many solutions, and solve the system in cases where (E) has solution(s).

Solution:

Using Gaussian elimination,

Page 45: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 45

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

(b)

Example 12.10T(b) Find the values of a and b such that the system of linear

equations (E) has infinitely many solutions, and solve the system in cases where (E) has solution(s).

Solution: The system of equations can be expressed as

)3(........ 00)2(...... 42)1(......... 3

zzyzyx

Let z t, where t is any real number. Substituting z t into (2), we have y 2t + 4. Substituting z t and y 2t + 4 into (1), we have x 3t 1. The required solution is x –3t – 1, y 2t + 4, z t,

where t is any real number.

Page 46: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 46

1122 ..44 Solving Equations by Solving Equations by Gaussian EliminationGaussian Elimination

(c) From (a) and (b), if the system of linear equations has no solution, then |A| 0 and b + 7 0.

Hence the conditions for (E) to have no solution are a 11 and b 7.

Example 12.10T(c) Find the values of a and b such that the system of linear

equations (E) has no solution, and solve the system in cases where (E) has solution(s).

Solution:

Page 47: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 47

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

For a system of linear equations Ax b, if the constants bi’s are all zero, then the system is said to be homogeneous.

For example, is a homogeneous system of linear

equations.

025307402

zyxzyxyx

In the previous sections, all the linear system of equations discussed are non-homogeneous.

For solving a system of linear equations, we learnt that there are three possible situations:

1. it has a unique solution; 2. it has no solution; 3. it has infinitely many solutions.

Page 48: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 48

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Thus a homogeneous system always has a solution, and we call this solution a zero solution or a trivial solution.

Thus there are only two possibilities for the solutions of homogeneous systems of linear equations: 1. the system has only a trivial solution; 2. a non-trivial solution (i.e., not all x, y and z are zeros) also exists.

However, for a homogeneous system of linear equations (E):

it is obvious that x y z 0 is a solution of (E).

,000

333231

232221

131211

zayaxazayaxazayaxa

The nature of the solutions of a homogeneous system can be determined by the following theorem:

Theorem 12.5If the number of unknowns in a homogeneous system equals the number of equations, then it has a non-trivial solution if and only if the coefficient matrix is singular.

Page 49: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 49

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Proof:‘If’ part:Consider the linear system Ax 0.If A is singular, then |A| 0.Thus, the system does not have a unique solution. The system either has no solution, or has infinitely many solutions. Since the linear system has a trivial solution, it is not possible for the system to have no solution. The system must have infinitely many solutions. The system must have non-trivial solutions.

‘Only if’ part: We try to prove this by contradiction. Assume A is non-singular and the system has non-trivial solutions. ∵ A is non-singular. A–1 exists. Then the system has a unique solution x A–10 0. The system has only trivial solution, which contradicts our assumption. A must be singular.

Page 50: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 50

Example 12.11T

Solution:

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Solve the following systems of linear equations and determine whether they have trivial or non-trivial solutions.

(a) (b)

00202

zyzyxzyx

00223032

zyxzyxzyx

(a) The determinant of the coefficient matrix 110

211121

0

By Theorem 12.5, the system has non-trivial solutions. Using Gaussian elimination, we have

011002110121

)(011003300121

212 RRR

Page 51: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 51

Example 12.11T

Solution:

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Solve the following systems of linear equations and determine whether they have trivial or non-trivial solutions.

(a) (b)

00202

zyzyxzyx

00223032

zyxzyxzyx

(a) )(033001100121

32 RR

)3(000001100121

323 RRR

We have .00002

zzyzyx

Let z t, where t can be any real number, then we have x t and y t. The required solution is x –t, y t, z t, where t can be any real number.

Page 52: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 52

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

(b) The determinant of the coefficient matrix

111

223

132

–2 0

By Theorem 12.5, the system has a unique trivial solution.

x 0, y 0, z 0.

Example 12.11T

Solution:

Solve the following systems of linear equations and determine whether they have trivial or non-trivial solutions.

(a) (b)

00202

zyzyxzyx

00223032

zyxzyxzyx

Page 53: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 53

Example 12.12T

Solution:

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

(a) The system can be rewritten as

0408)2(4043)1(

zyxzykxzyxk

∵ The system of linear equations has non-trivial solutions.

0411824431

kk

Page 54: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 54

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

0411824431

kk

082

43)1(

41

43)4(

41

82)1(

k

kk

0)164()8)(4()4)(1( kkk

0164 2 k2k

Example 12.12T

Solution:

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

(a)

Page 55: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 55

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

Example 12.12T

Solution:

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

(b) For k –2,

041108440433

)(043308440411

31 RR

080008000411

)3 ;4(

313

212RRRRRR

)(000008000411

323 RRR

Page 56: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 56

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

We have

000804

zzzyx

z 0

Let y t, where t can be any real number, then we have x t.

The required solution is x –t, y t, z 0, where t can be any real number.

Example 12.12T

Solution:

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

(b)

Page 57: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 57

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

))1((041108040431

11 RR

041108040431

08400241200431

) ;4(

313

212RRRRRR

12

1

084002100431

2R

Example 12.12T

Solution:

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

For k 2,

000002100431

)4( 323 RRR

(b)

Page 58: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 58

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

We have

0002043

zzyzyx

Let z t, where t can be any real number, then we have y 2t,x 2t. The required solution is x –2t, y –2t, z t, where t can be any real number.

Example 12.12T

Solution:

Given a system of linear equations (E): , where k is

a real constant. (a) Find the values of k such that (E) has non-trivial solutions. (b) Hence solve the system of linear equations.

0482443

zyxkyzyxkxzyx

(b)

Page 59: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 59

Example 12.13T

Solution:

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

The linear system can be rewritten as .

0305)4(3067)1(

zyxzyxzyx

Consider the determinant of the coefficient matrix.

13543671

13

550671

13110671

)5(

131006131

)5(

Consider the system of linear equations (*):

Find the values of such that (*) has non-trivial solutions.

.3

54367

zyxyzyxxzyx

13131)5(

]39)1)(1)[(5( )38)(5( 2

R2 R3 R2

C2 C3 C2

Page 60: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 60

1122 ..55 Homogeneous Systems of Homogeneous Systems of Linear EquationsLinear Equations

If the system has non-trivial solutions, then the determinant 0. 5 – 0 or 2 + 38 0

(rejected)38 or 5

Example 12.13T

Solution:

Consider the system of linear equations (*):

Find the values of such that (*) has non-trivial solutions.

.3

54367

zyxyzyxxzyx

)38)(5( 2

Page 61: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 61

12.1 System of Linear Equations

Chapter Chapter SummarySummary

A system of m linear equations (or a linear system) in n unknowns x1, x2, x3, …, xn is a set of equations of the form

It can be represented by the equation Ax = b, where

,

2211

22222121

11212111

mnmnmm

nn

nn

bxaxaxa

bxaxaxabxaxaxa

.,, 2

1

2

1

21

22221

11211

mnmnmm

n

n

b

bb

x

xx

aaa

aaaaaa

A

b x

Page 62: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 62

12.2 Solving Equations by Inverses of Matrices

Consider a system of linear equations Ax b.

1. It has a unique solution, which is given by x A1b, if and only is |A| 0.

Chapter Chapter SummarySummary

2. It has either no solution or infinitely many solutions if |A| 0.

Page 63: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 63

12.3 Solving Equations by Cramer’s Rule

Chapter Chapter SummarySummary

Given a system of linear equations

If the determinant of the coefficient matrix A is non-zero, the unique solution of the system is given by

.

3333232131

2323222121

1313212111

bxaxaxabxaxaxabxaxaxa

and Δ

321

321 Ax

Ax

Ax xxx

Page 64: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 64

A system of linear equations is said to be in row echelon form if 1. the first non-zero term of each row has a coefficient of 1.

12.4 Solving Equations by Gaussian Elimination

Chapter Chapter SummarySummary

2. in any two successive rows, for example, the ith and (i + 1)th rows, if the ith row does not consist entirely of zero terms, then the

number of leading zeros in the (i + 1)th row must be greater than the number of leading zeros in the ith row.

A system of equations can be transformed into the row echelon form, without affecting its solution, by any of the following elementary transformations:1. interchanging the position of two equations;2. multiplying both sides of an equation by a non-zero number;3. adding an arbitrary multiple of any equation to another equation.

Page 65: 12.1System of Linear Equations 12.2Solving Equations by Inverses of Matrices 12.3Solving Equations by Cramer’s Rule Chapter Summary Case Study System of.

P. 65

12.5 Homogeneous Systems of Linear Equations

Chapter Chapter SummarySummary

For a homogeneous system of linear equations

if the number of unknowns equals the number of equations, it has non-trivial solutions if and only if the coefficient matrix is singular. Otherwise the system only has a trivial solution.

,

0

0

0

2211

2222121

1212111

nmnmm

nn

nn

xaxaxa

xaxaxa

xaxaxa