Solving linear systems

Math 40, Introduction to January 2012

REF -- row echelon form

25 2 7 Row reduced from cereal example: 0 7 3 8  − −405 −135  00 7 7 A matrix is in row   echelon form (REF) if it satisfies the following: Is REF of a matrix unique? NO! • any all-zero rows are at

the bottom first nonzero entries in each row

• leading entries form a staircase pattern more formally each leading entry is in a column to the right of the leading entry above it

Given a linear system, the process of

• expressing it as an augmented Can we accomplish matrix, backwards substitution via EROs done after • performing EROs on the matrix is in REF? to get it in REF,

• and, finally, using back substitution to solve the system YES! is called Gaussian elimination.

Example 1

x1 + x2 + x3 =2 1112 2x1 +3x2 + x3 =3 2313  1 1 2 6  x1 x2 2x3 = 6 − − − − − −   rewrite linear system as 1112 augmented matrix R2 2R1 − 0 1 1 1  − −  R3 R1 0 2 3 8 − − − −   11 1 2 01 1 1  − −  R3 +2R2 0 0 5 10 − −   matrix is in REF

We could now convert to back to equations and do back substitution... Example 1

x1 + x2 + x3 =2 11 1 2 01 1 1 2x +3x + x =3 1 2 3  00−5 −10  x x 2x = 6 − − 1 − 2 − 3 −   rewrite linear system as 11 1 2 augmented matrix 1 01 1 1 R  − −  −5 3 00 1 2 1112   2313  1 1 2 6  1100 − − − R1 R3   − 1112 0101 R2 2R1 R + R − 0 1 1 1 2 3    − −  0012 R3 R1 0 2 3 8 − − − −   x1 x2 x3  11 1 2 R R 100 1 x1 1 01 1 1 1 2 − −  − −  − 010 1 ￿x = x = 1 R3 +2R2 0 0 5 10 2 − −         001 2 x3 2 matrix is in REF      

RREF -- reduced row echelon form

A matrix is in reduced row echelon form (RREF) if it 100 1 satisfies the following: 010−1   • any all-zero rows are at the 001 2 bottom  

• leading entries form each leading entry is in a column to staircase pattern more formally the right of the leading entry above it

• leading entries are ones Is RREF of a • each column with a leading matrix unique? YES! one has zeros elsewhere RREF -- reduced row echelon form

A matrix is in reduced row echelon form (RREF) if it Example: satisfies the following: 10001 ￿ 00￿ 0 ￿￿ 00101 ￿ 0￿￿ • any all-zero rows are at the 00011 ￿ 0￿￿ bottom 0000011 ￿￿   00000000 • leading entries form   00000000 staircase pattern     • leading entries are ones Where must there be zeros, given leading • each column with a leading entries above? one has zeros elsewhere

Gauss-Jordan elimination

Given a linear system, the process of

• expressing it as an augmented matrix,

• performing EROs on the augmented matrix to get it in RREF,

• and writing the solution to the system

is called Gauss-Jordan elimination. In REF, RREF, or none of the above?

10 90 4 01− 3 0 1 241 00 0 1−7 0 12 −  −  00 0 0 1 000     121 3  REF  REF 000− 0 000 0   1 RREF 1 5 01− 123 ￿ ￿ 023 REF 101 1000 ￿ ￿ 1100 REF 000   010 0110 0011 none of   none of the the above   above

Example 2

2x 6y =1 2 6 1 − − x +3y = 1 131 − − ￿ − − ￿

2 6 1 1 − 1 R2 + R1 00 2 ￿ − 2 ￿

2x 6y =1 − System is inconsistent 1 0= no solutions −2

Geometrically, this means the two lines are parallel. Example 3

x1 +2x2 +3x3 =4 1234 5x +6x +7x =8 5678 1 2 3 ￿ ￿ 123 4 R2 5R1 0 4 8 12 − ￿ − − − ￿ 1234 1 R2 0123 −4 ￿ ￿ R 2R 10 1 2 1 − 2 01− 2−3 ￿ ￿ matrix is in RREF

Example 3

x1 x2 x3 x1 +2x2 +3x3 =4 10 1 2 01− 2−3 5x1 +6x2 +7x3 =8 ￿ ￿ x1,x2 are leading variables x3 is a free variable • columns w/leading entries correspond to x1 x3 = 2 x1 = x3 2 − − − leading variables x +2x =3 x = 2x +3 2 3 2 − 3 x3 is free x3 is free • columns without leading entries x1 x3 2 1 2 − − correspond to ￿x = x2 = 2x3 +3 = x3 2 + 3 free variables   −  −    x3 x3 1 0

    wherex3 is any  system has infinite real number # of solutions 3 line in R Example 4

2x + x +4x =4 − 1 2 3 3 3x x 8x = 12 1 − 2 2 − 3 − 2x x 6x = 10 1 − 2 − 3 − 21 4 4 1 1 0 4 − EROs − 2 3 3 8 12 0013 RREF  − 2 − −    2 1 6 10 0000 − − −   x1,x3 are leading variables 1 x2 is a free variable x = x +4 1 2 2 1 1 2 x2 +4 2 4 for any x2 is free ￿x = x2 = x2 1 + 0       x2 R x3 =3 3 0 3 ∈      

Recognizing the size of solution set

represents a Suppose augmented matrix is in RREF. nonzero value

(1) If any row is of the form 00 0 ￿ ··· then the system is inconsistent and there are no solutions. ￿ ￿

(2) If the system is consistent and if there exist free variables, then there are an infinite number of solutions. What does a row of all zeros (3) Otherwise, system has a unique in RREF mean? solution.