Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3)...

77
Gauss and Gauss Jordan Elimination

Transcript of Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3)...

Page 1: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Gauss and Gauss Jordan Elimination

Page 2: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following

three properties.

(1) All row consisting entirely of zeros occur at the bottom

of the matrix.

(2) All entries in a column below a leading entry i.e. 1 are zero..

(3) For two successive nonzero rows, the leading 1 in the higher

row is farther to the left than the leading 1 in the lower row.

Reduced row-echelon form: (1, 2, 3, 4)

If a matrix is in echelon form and satisfy following additional

condition, then it is in reduced echelon from.

(4) Every column that contains a leading 1 has zeros everywhere

else.

Page 3: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Echelon & Reduced Echelon Forms: Notes

A matrix may be row reduced (i.e. transformed by elementary row operations) into more than one matrix in echelon form, using different sequence of row operations. In summary, echelon form obtained from a given matrix may not necessarily be unique.

However, the reduced echelon from one obtains from a matrix is unique.

A matrix in reduced row-echelon form is of necessity in row-echelon form, but not conversely.

Page 4: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 1 Row-Echelon & Reduced Row-Echelon form

Reduced row-echelon form:

00000

00000

31000

10210

,

100

010

001

,

1100

7010

4001

Row-echelon form:

10000

01100

06210

,

000

010

011

,

5100

2610

7341

Page 5: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2 More on Row-Echelon and Reduced Row-

Echelon form All matrices of the following types are in row-echelon form

( any real numbers substituted for the *’s. ) :

*100000000

*0**100000

*0**010000

*0**001000

*0**000*10

,

0000

0000

**10

**01

,

0000

*100

*010

*001

,

1000

0100

0010

0001

*100000000

****100000

*****10000

******1000

********10

,

0000

0000

**10

***1

,

0000

*100

**10

***1

,

1000

*100

**10

***1

All matrices of the following types are in reduced row-echelon form ( any real numbers substituted for the *’s. ) :

Page 6: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

form)echelon

-row (reduced

form)

echelon -(row

Exercise(Row-echelon form or reduced row-echelon form)

210030104121

10000410002310031251

000031005010

0000310020101001

310011204321

421000002121

form)

echelon -(row

form)echelon

-row (reduced

Page 7: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (a) Solutions of Linear Systems

4100

2010

5001

(a)

4

2-

5

z

y

x

Solution (a)

the corresponding system of equations is :

Suppose that the augmented matrix for a system of linear equations have been reduced by row operations to the given reduced row-echelon form. Solve the system.

Page 8: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (b) Solutions of Linear Systems

23100

62010

14001

(b)

Solution (b)

1. The corresponding system of equations is :

2 3

6 2

1- 4

43

42

41

xx

xx

xx

leading variables

free variables

Page 9: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (b) Solutions of Linear Systems

43

42

41

3-2

2- 6

4 - 1-

xx

xx

xx

tx

tx

tx

tx

,32

,26

,41

4

3

2

1

2. We see that the free variable can be assigned an arbitrary value, say t, which then determines values of the leading variables.

3. There are infinitely many solutions, and the general solution is given by the formulas

Page 10: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (c) Solutions of Linear Systems

000000

251000

130100

240061

(c)

2 5

1 3

2- 4 6

54

53

521

xx

xx

xxx

Solution (c)

1. The 4th row of zeros leads to the equation places no restrictions on the solutions (why?). Thus, we can omit this equation.

Page 11: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (c) Solutions of Linear Systems

Solution (c)

2. Solving for the leading variables (x1,x3,x4) in terms of the free variables (x2,x5) :

3. The free variable can be assigned an arbitrary value, there are infinitely many solutions, and the general solution is given by the formulas.

54

53

521

5-2

3- 1

4-6- 2-

xx

xx

xxx

tx

tx

tx

sx

tsx

4

4

3

2

1

,5-2

3- 1

, 4-6- 2-

Page 12: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 3 (d) Solutions of Linear Systems

1000

0210

0001

(d)

Solution (d):

the last equation in the corresponding system of equation is

Since this equation cannot be satisfied, there is no solution to the system.

1000 321 xxx

Page 13: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (1/6)

• There should be a step-by-step elimination procedure that can be used to reduce any matrix to reduced row-echelon form.

156542

281261042

1270200

Page 14: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (2/6)

• Step1. Locate the leftmost pivot column i.e. a coulmn that does not consist entirely of zeros.

• Step2. Interchange the top row with another row, to bring a nonzero entry (Pivot) to top of the column found in Step1.

156542

281261042

1270200

Leftmost pivot or nonzero column

156542

1270200

281261042The 1st and 2nd rows in the preceding matrix were interchanged.

Pivot

Page 15: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (3/6) • Step3. If the entry that is now at the top of the

column found in Step1 is a, multiply the first row by 1/a in order to introduce a leading 1.

• Step4. Add suitable multiples of the top row to the rows below so that all entries below the leading 1 become zeros.

156542

1270200

1463521 The 1st row of the preceding matrix was multiplied by 1/2.

29170500

1270200

1463521-2 times the 1st row of the preceding matrix was added to the 3rd row.

Page 16: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (4/6) • Step5. Now cover the top row in the matrix and

begin again with Step1 applied to the sub-matrix that remains. Continue in this way until the entire matrix is in row-echelon form.

29170500

1270200

1463521

The 1st row in the sub-matrix was multiplied by -1/2 to introduce a leading 1.

29170500

60100

1463521

27

Leftmost nonzero or pivot column in the sub-matrix

Pivot

Page 17: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (5/6) • Step5 (cont.)

210000

60100

1463521

27

-5 times the 1st row of the sub-matrix was added to the 2nd row of the sub-matrix to introduce a zero below the leading 1.

10000

60100

1463521

21

27

10000

60100

1463521

21

27

The top row in the sub-matrix was covered, and we returned again Step1.

The first (and only) row in the new submetrix was multiplied by 2 to introduce a leading 1.

Leftmost nonzero or pivot column in the new sub-matrix

The entire matrix is now in row-echelon form.

Pivot

Page 18: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Elimination Methods (6/6) • Step6. Beginning with last nonzero row and

working upward, add suitable multiples of each row to the rows above to introduce zeros above the leading 1’s.

210000

100100

703021

7/2 times the 3rd row of the preceding matrix was added to the 2nd row.

210000

100100

1463521

210000

100100

203521

-6 times the 3rd row was added to the 1st row.

The last matrix is in reduced row-echelon form.

5 times the 2nd row was added to the 1st row.

Page 19: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

The first nonzero

column

Produce leading 1

Zeros elements below leading 1

leading 1

Produce leading 1

The first nonzero column

Summary: Elimination Methods Example

1565422812610421270200

1565421270200281261042

12r

15654212702001463521

)(

121

r

2917050012702001463521)2(

13

r

Submatrix

Page 20: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Zeros elements below leading 1

Zeros elsewhere

leading 1

Produce

leading 1

leading 1

Example (Contd.)

29170500

62701001463521)(

221

r

1210000

62701001463521)5(

23

r

210000

62701001463521)2(

3r

210000100100703021)6(

31

r )(

3227

r)5(

21r

Submatrix

form)echelon -(rowform)echelon

-row (reduced

Page 21: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Summary: Elimination Methods • Step1~Step5: the above procedure produces a

row-echelon form and is called Gaussian elimination.

• Step1~Step6: the above procedure produces a reduced row-echelon form and is called Gaussian-Jordan elimination.

• Two matrices are said to be row equivalent if one matrix can be obtained from the other using elementary row operations

• Every matrix has a unique reduced row-echelon form but a row-echelon form of a given matrix is not unique.

Page 22: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Gaussian elimination and back substitution Method

To solve a system of linear equations,

• we first simplify the system through succession of elementary row operations, until we arrive at an augmented matrix in row-echelon form. This process is called the gaussian elimination. and

• we may solve the simplest equation. Then we successively substitute the results into more and more complicated equations to get the whole solution. This process is called the backward substitution.

Page 23: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 1 Solve the system

3x1 + x2 - x3 = 2 x1 - x2 + x3 = 2

2x1 + 2x2 + x3 = 6 • Note that the variable x1 appears in all 3 equations.

• We try to eliminate x1 so that it appears in only 1 equation.

• Specifically, by multiplying -3 to the 2nd equation and then adding to the 1st equation, x1 is eliminated from the 1st equation.

4x2 - 4x3 = -4

x1 - x2 + x3 = 2

2x1 + 2x2 + x3 = 6

Page 24: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

• Next the operation (-2)[equation 2] + [equation 3] (i.e. multiply -2 to the 2nd equation and then add to the 3rd equation) further eliminates x1 from the 3rd equation. 4x2 - 4x3 = -4

x1 - x2 + x3 = 2

4x2 - x3 = 2

Example 1 (contd.)

The system is as simple as we can get as far as x1 is concerned.

Next we try to simplify the system regarding x2. The operation

(-1)[equation 1] + [equation 3] eliminates x2 from the 3rd equation.

4x2 - 4x3 = -4

x1 - x2 + x3 = 2

3x3 = 6

Page 25: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 1 (contd.) By exchanging the 1st and the 2nd equations (denoted [equation

1] ↔ [equation 2]), we rearrange the equations from the most

complicated down to the simplest, i.e.

x1 - x2 + x3 = 2

4x2 - 4x3 = -4

3x3 = 6

Finally, the coefficients can be further simplified by multiplying 1/4 and 1/3 to the 2nd and the 3rd equations (denoted (1/4)[equation 2] and (1/3)[equation 3]).

x1 - x2 + x3 = 2

x2 - x3 = -1 OR

x3 = 2

This completes the simplification process.

2 1 0 0

1- 1- 1 0

2 1 1- 1

Augmented Matrix in Row-Echelon form

Page 26: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 1 (contd.)

Now we start solving the system by backward substitution. From

the 3rd equation (the simplest equation), we have x3 = 2

Substituting this into the 2nd equation (the next simplest), we get

x2 = -1 + x3 = -1 + 2 => x2 = 1.

Further substituting into the 1st equation (the most complicated), we get

x1 = 2 + x2 - x3 = 2 + 1 - 2 => x1 = 1.

We conclude that the system has a unique solution

x1 = 1, x2 = 1, x3 = 2.

Page 27: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 1 (contd.) In the example 1, we have used the elementary row operations in following order to simplify given system.

A constant multiple of one row is added to another row

Two rows are interchanged

A row is multiplied by a nonzero constant

In general, any system of linear equations can be simplified, by these three operations, to a simple system in which equations are arranged from the most complicated to the simplest. This process is called the Gaussian elimination method.

After completing the gaussian elimination, we may solve the simplest equation. Then we successively substitute the results into more and more complicated equations to get the whole solution. This process is called the backward substitution.

Page 28: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2 Solve

by Gaussian elimination and back-substitution. Solution

– We convert the augmented matrix

– to the row-echelon form

– The system corresponding to this matrix is

0563

1342

92

zyx

zyx

zyx

0563

1342

9211

3100

10

9211

2

1727

3 , ,922

1727 zzyzyx

Page 29: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2 • Solution

– Solving for the leading variables

– Substituting the bottom equation into those above

– Substituting the 2nd equation into the top

3

,2

,3

z

y

yx

3

,

,29

27

217

z

zy

zyx

3 ,2 ,1 zyx

Page 30: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 1

31835

7753

36542

zyx

zyx

zyx

Let us consider the set of linearly independent equations.

Augmented matrix for the set is:

31835

7753

36542

Page 31: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 1 (Contd.)

31835

7753

36542

31835

7753

36542

zyx

zyx

zyx

Step 1: Eliminate x from the 2nd and 3rd equation.

1215.2013

615.14

36542

1215.20130

615.1410

36542

zy

zy

zyx

Page 32: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 1 (Contd.)

67216800

615.1410

36542

672168

615.14

36542

z

zy

zyx

4100

615.1410

185.221

Step 2: Eliminate y from the 3rd equation.

13R’2+R’3 R’’3

Step 3:

0.5R’1 R’1

-R’2 R’’2

(1/168)R’’3 R’’’3

4

615.14

185.22

z

zy

zyx

Page 33: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 1 (Contd.)

From Row 3, z = 4 From Row 2, y -14.5z = -61 or, y - 14.5 (4) = 61 or, y = - 3 From Row 1, x – 2y + 2.5z = 18 or, x – 2 (- 3) + 2.55 (4) = 18 or, x = 2

4100

615.1410

185.221

4

615.14

185.22

z

zy

zyx

Page 34: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise 2 Solve the linear system using Gaussian

elimination and back substitution method

9x1 + 3x2 + 4x3 = 7

4x1 + 3x2 + 4x3 = 8

x1 + x2 + x3 = 3

Answer:

x1= - 1/5

x2= 4

x3= - 4/5

Page 35: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise 3 Solve the linear system using Gaussian

elimination and back substitution method

3x1 + x2 - x3 = 2

x1 - x2 + x3 = 2

2x1 - x2 + x3 = 6

This is the simplest shape (row echelon form) we can get by row operations. The corresponding system is

x1 - x2 + x3 = 2

x2 - x3 = -1

0 = 3

Since the 3rd equation 0 = 3 is a contradiction implying the original system has no solution.

Page 36: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise 4 A garden supply centre buys flower seed in bulk then mixes and packages the seeds for home garden use.

The supply center provides 3 different mixes of flower seeds: “Wild Thing”, “Mommy Dearest” and “Medicine Chest”.

1) Wild Thing seed mix contains 50% of wild flower seed, 25% of Echinacea seed and 25% of Chrysanthemum seed.

2) Mommy Dearest mix consists 75% Chrysanthemum seed and 25% wild flower seed.

3) The Medicine Chest mix contains 90% Echinacea seed, 10% other seeds.

In a single order, the store received 17 grams of wild flower seed, 15 grams of Echinacea seed and 21 grams of Chrysanthemum seed.

Use matrices and complete Gauss-Jordan Elimination to determine how much of each mixture the store can prepare. Assume that the garden center has an ample supply of other seeds used in Medicine chest on hand.

Page 37: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 4 (contd.) Solution:

– Assign variables to the amount of each mix that will be produced.

– Perform a balance on each of the components that are available.

Let X = Amount of Wild Thing Let Y = Amount of Mommy Dearest Let Z = Amount of Medicine Chest

Wild flower 0.5X + 0.25Y + 0Z = 17g

Echinacea 0.25X + 0Y + 0.9Z = 15g

Chrysanthemum 0.25X + 0.75Y + 0Z = 21g

In matrix form, this can be written as

bAx

Page 38: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 4 (contd.) Before the matrices are populated, it is (sometimes) helpful to re-arrange the equations to reduce the number of steps in the Gauss Elimination.

To do this (if there seems like an easy solution), attempt to move zeros to the bottom left, and try to maintain the first row with non-zeros except for the last entry, since row 1 is used to reduce other rows.

By moving the last column (Z) to the front, and switching the first and second row, the new set of equations becomes:

Echinacea 0.9Z + 0.25X + 0Y = 15g

Wild flower 0Z + 0.5X + 0.25Y = 17g

Chrysanthemum 0Z + 0.25X + 0.75Y = 21g

Page 39: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 4 (contd.)

– Apply the Gauss Elimination:

Z = 10, X = 24, and Y = 20

214

3

4

10

174

1

2

10

1504

1

10

9

Page 40: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Summary: Gauss Elimination for Solving A System of Equations

1. Write the augmented matrix of the system.

2. Use elementary row operations to construct a row equivalent matrix in row-echelon form.

3. Write the system of equations corresponding to the matrix in row-echelon form.

4. Use back-substitution to find the solutions to this system.

Page 41: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Gauss-Jordan Elimination

• In Gauss-Jordan elimination, we continue the reduction of the augmented matrix until we get a row equivalent matrix in reduced row-echelon form. (r-e form where every column with a leading 1 has rest zeros)

c

b

a

100

010

001

Page 42: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1

31835

7753

36542

zyx

zyx

zyx

Let us consider the set of linearly independent equations.

Augmented matrix for the set is:

31835

7753

36542

Page 43: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1 (Contd.)

31835

7753

36542

31835

7753

36542

zyx

zyx

zyx

Step 1: Eliminate x from the 2nd and 3rd equation.

1215.2013

615.14

36542

1215.20130

615.1410

36542

zy

zy

zyx

Page 44: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1 (Contd.)

67216800

615.1410

36542

672168

615.14

36542

z

zy

zyx

4100

615.1410

185.221

Step 2: Eliminate y from the 3rd equation.

13R’2+R’3 R’’3

Step 3:

0.5R’1 R’1

-R’2 R’’2

(1/168)R’’3 R’’’3

4

615.14

185.22

z

zy

zyx

Page 45: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1 (Contd.)

)2()5.14()3( RowRow

4100

615.1410

185.221

4

615.14

185.22

z

zy

zyx

Step 4: Eliminate z from the 2nd equation

4100

3010

185.221

4

3

185.22

z

y

zyx

Page 46: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1 (Contd.)

1)1()2()2( RowNewRowRow

4100

3010

185.221

4

3

185.22

z

y

zyx

Step 5-1: Eliminate y from the 1st equation

4100

3010

125.201

4

3

125.2

z

y

zx

Page 47: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example: 1 (Contd.)

1)1()5.2()3( RowNewRowRow

4100

3010

125.201

4

3

125.2

z

y

zx

Step 5-2: Eliminate z from the 1st equation

4100

3010

2001

4

3

2

z

y

x

Page 48: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2: Gauss-Jordan Elimination

• Solve by Gauss-Jordan Elimination

• Solution:

The augmented matrix for the system is

6 18 48 62

5 15 105

13 42 562

0 x2 23

65421

643

654321

5321

xxxxx

xxx

xxxxxx

xxx

61848062

515010500

1-3-42-5-62

00202-31

Page 49: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2(Contd.) • Adding -2 times the 1st row to the 2nd and

4th rows gives

• Multiplying the 2nd row by -1 and then adding -5 times the new 2nd row to the 3rd row and -4 times the new 2nd row to the 4th row gives

2600000

0000000

13-02100

00202-31

61808400

515010500

1-3-02-1-00

00202-31

Page 50: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2 (contd.)

• Interchanging the 3rd and 4th rows and then multiplying the 3rd row of the resulting matrix by 1/6 gives the row-echelon form.

• Adding -3 times the 3rd row to the 2nd row and then adding 2 times the 2nd row of the resulting matrix to the 1st row yields the reduced row-echelon form.

0000000

100000

0002100

0024031

31

0000000

100000

13-02100

00202-31

31

Page 51: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 2 (contd.) • The corresponding system of equations is

• Solution

The augmented matrix for the system is

• We assign the free variables, and the general solution is given by the formulas:

31

6

43

5421

0 2

0 x24 3

x

xx

xxx

31

6

43

5421

2

x243

x

xx

xxx

31

654321 , , ,2 , ,243 xtxsxsxrxtsrx

Page 52: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 1

9475

12

762

321

321

321

xxx

xxx

xxx

on eliminatiuss-Jordanand (b) Ga

tion an elimina(a) Gaussitem using linear sysSolve the

Answer

5

3

10

3

2

1

x

andx

x

Page 53: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise 2: Solve a system by Gauss-Jordan elimination method (only one solution)

17552

43

932

zyx

yx

zyx

Sol:

matrix augmented

1755240319321

111053109321)2(

13

1

12 , rr

2100531093211

23r

210010101001)9(

31

)3(

32

2

21 , , rrr

2

1

1

z

y

x

form)echelon -(row

form)echelon -row (reduced

Page 54: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise 3:Solve a system by Gauss-Jordan elimination method (infinitely many solutions)

1 53

0242

21

311

xx

xxx

13102501

)2(

21

)1(

2

)3(

12

)(

1 ,,,21

rrrr

is equations of system ingcorrespond the

13

25

32

31

xx

xx

y.arbitraril valuesitsassign can we

equations,both common to is only x since, x: variablefree

x, x: variableleading

33

21

Sol:

10530242

matrix augmented

form)echelon

-row (reduced

Page 55: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 3 (Contd.)

32

31

31

52

xx

xx

Let tx 3

,

,31

,52

3

2

1

tx

Rttx

tx

So this system has infinitely many solutions.

Page 56: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Homogeneous systems of linear equations

A system of linear equations is said to be

homogeneous if all the constant terms are zero.

0

0

0

0

332211

3333232131

2323222121

1313212111

nmnmmm

nn

nn

nn

xaxaxaxa

xaxaxaxa

xaxaxaxa

xaxaxaxa

A homogenous system of linear equations is always

consistent, since x1= 0,x2= 0,….xn= 0 will satisfy

each equation in the system.

Page 57: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

• Trivial solution

Nontrivial solution:

other solutions

0321 nxxxx

Notes:

(1) Every homogeneous system of linear equations is consistent.

(2) If the homogenous system has fewer equations than variables,

then it must have an infinite number of solutions.

(3) For a homogeneous system, exactly one of the following is true.

(a) The system has only the trivial solution. OR

(b) The system has infinitely many nontrivial solutions in

addition to the trivial solution.

Homogeneous systems of linear equations (Contd.)

Page 58: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Solve the following homogeneous system

02

0

321

321

xxx

xxx

01100201

)1(

21

)(

2

)2(

12 ,, 31

rrr

Let tx 3

Rttxtxtx , , ,2 321

solution) (trivial 0,0When 321 xxxt

Sol:

03120311

matrix augmented

form)echelon

-row (reduced

3

21

variablefree

, variableleading

x

xx

Page 59: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 4

0

0 2

0 32

0 2 2

543

5321

54321

5321

xxx

xxxx

xxxxx

xxxx

001000

010211

013211

010122

000000

001000

010100

010011

Solve the following homogeneous system of linear equations by using Gauss-Jordan elimination.

Solution

The augmented matrix

Reducing this matrix to reduced row-echelon form

Page 60: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 4 (contd.)

0

0

0

4

53

521

x

xx

xxx

0

4

53

521

x

xx

xxx

Solution (cont)

The corresponding system of equation

Solving for the leading variables is

Thus the general solution is

Note: the trivial solution is obtained when s= t = 0.

txxtxsxtsx 54321 ,0 , , ,

Page 61: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Example 4 (Contd.)

None of the three row operations

alters the final column of zeros, so the

system of equations corresponding to

the reduced row-echelon form of the

augmented matrix must also be a

homogeneous system.

Page 62: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Application of Linear Systems

A mathematical model is an equation or system of equations that represent a real life situation.

One main reason to solve systems of linear equations is to solve real world problems.

Page 63: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Applications of Systems

To solve problems using a system

1. Determine the unknown quantities

2. Let different variables represent those quantities

3. Write a system of equations – one for each variable

Example : In a recent year, the national average spent on two athletes, one female and one male, was $6050 for Division I-A schools. However, average expenditures for a male athlete exceeded those for a female athlete by $3900. Determine how much was spent per athlete for each gender.

Page 64: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Applications of Systems

Solution Let x = average expenditures per male y = average expenditures per female

100,1260502

yxyx

Average spent on

one male and one female

(2)

(1)

3900

12100

yx

yx

160002 x

8000x

Average Expenditure per male: $8000, and per female: from (2) y = 8000 – 3900 = $4100.

Page 65: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 2 A man walks at a rate of 3 miles per hour and jogs

at a rate of 5 miles per hour. He walks and jogs a total distance of 3.5 miles in 0.9 hours. How long does the man jog?

Solution: Let x represent the amount of time spent walking and y represent the amount of time spent jogging. Since the total time spent walking and jogging is 0.9 hours, we have the equation x + y = 0.9.

We are given the total distance traveled as 3.5 miles. Since Distance = Rate x Time, distance walking = 3x and distance jogging = 5y.

Then total distance is represented by 3x + 5y = 3.5.

Page 66: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 2 (contd.)

We can solve the system using substitution.

1. Solve the first equation for y

2. Substitute this expression into the second equation.

3. Solve second equation for x

4. Find the y value by substituting this x value back into the first equation.

5. Answer the question: Time spent jogging is 0.4 hours.

Solution:

0.9

3 5 3.5

3 5( ) 3.5

3

0.9

0.9

4.5 5 3.5

2 1

0.5

0.5 0.9

0.4

x y

y

x y

x

x x

x

x

x

x

y

y

Page 67: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Bob and Mary went to the movies. Bob purchased 3 medium bags of popcorns and 2 large drinks and paid $11.00. Mary purchased 2 medium bags of popcorns and 4 large drinks and ended up paying $12.00. What was the price of a medium bag of popcorn and what was the price of a large drink?

Denote p the price of a medium bag of popcorn and d the price of a large drink. Then we have

3p + 2d = 11 2p + 4d = 12

Page 68: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

3p + 2d = 11 2p + 4d = 12

-6p - 4d = -22 2p + 4d = 12

-4p = -10 p = 2.50

Substituting back and solving for d we get d = 1.75.

(multiply the first by -2)

(add the first to the second)

Medium bag of popcorn costs $2.50 and a large drink costs $1.75.

Page 69: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 4

• A restaurant serves two types of fish dinners- small for $5.99 each and large for $8.99. One day, there were 134 total orders of fish, and the total receipts for these 134 orders was $1024.66. How many small dinners and how many large dinners were ordered?

• Answer: 60 small orders and 74 large orders

Page 70: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Application of Homogenous equation in Chemistry

Balance the chemical equation

Solution:

We would like to determine x1,x2,x3 and x4 so that

Now for a balance equation, the number of atoms of each element must be same on each side of above equation, so we have

Carbon (C): 2x1 = x3

Hydrogen (H): 6x1= 2x4 OR Oxygen (O): 2x2= 2x3+ x4

OHCOOHC 22262

OHxCOxOxHCx 242322621

0220

02006

0002

4321

4321

4321

xxxx

xxxx

xxxx

Page 71: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 5 (Contd.) 1. Augmented matrix can be written as

2. Now performing row operations to obtain reduced row-echelon form

0 1- 2- 2 0

0 2- 0 0 6

0 0 1- 0 2

0220

02006

0002

4321

4321

4321

xxxx

xxxx

xxxx

0 3

2- 1 0 0

0 6

7- 0 1 0

0 3

1- 0 0 1

Page 72: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

3. The corresponding system of equations is :

0 3

2

0 6

7

0 3

1

43

42

41

xx

xx

xx

leading variables

free variable x4

0 3

2- 1 0 0

0 6

7- 0 1 0

0 3

1- 0 0 1

Exercise: 5 (Contd.) 2. Reduced row-echelon matrix :

Page 73: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercise: 5 (Contd.)

43

42

41

3

2

6

7

3

1

xx

xx

xx

4. We see that the free variable (x4) can be assigned an arbitrary value, say t, which then determines values of the leading variables.

5. There are infinitely many solutions, and the general solution is given by the

formulas. tx

tx

tx

3

2

6

7

3

1

3

2

1

Note that in this case t must be a positive integer chosen in such a manner that x1,x2 and x3 are positive integers, say t = 6 gives x1= 2, x2 = 7, x3 = 4, x4 = 6. The balanced chemical equation is:

OHCOOHC 22262 6472

Page 74: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercises 1. Balance the chemical equation

COFeCOFe 43

Answer:

COFeCOFe 43443

2. Balance the chemical equation

NOOHNOCuHNOCu 2233 )(

Answer:

NOOHNOCuHNOCu 24)(383 2233

Page 75: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Exercises 1. Balance the chemical equation

COFeCOFe 43

Answer:

COFeCOFe 43443

2. Balance the chemical equation

NOOHNOCuHNOCu 2233 )(

Answer:

NOOHNOCuHNOCu 24)(383 2233

Page 76: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Gaussian elimination:

The procedure for reducing a matrix to a row-echelon form.

Gauss-Jordan elimination:

The procedure for reducing a matrix to a reduced row-

echelon form.

Notes

(1) Every matrix has an unique reduced row echelon form.

(2) A row-echelon form of a given matrix is not unique.

(Different sequences of row operations can produce

different row-echelon forms.)

Summary

Page 77: Gauss and Gauss Jordan Eliminationme.emu.edu.tr/tahir/meng511/W1.pdf · Row-echelon form: (1, 2, 3) A matrix is said to be in row echelon form if it has the following three properties.

Summary (Contd.)

• A system of linear equations is said to be

homogeneous if all the constant terms are zero.

• Every homogeneous system of linear equations is

consistent

• A homogeneous system of linear equations with more

unknowns than equations has infinitely many

solutions