Você está na página 1de 4

Solving Linear Systems

Topic and contents

Row-Echelon form

Row-Echelon form 1
Definition (Leading row, column, entry)
In a matrix

School of Mathematics and Statistics

a leading row is one which is not all zeros


in a leading row, the leading entry is first (leftmost) non-zero entry
a leading column contains the leading entry for some row

MATH1151 Algebra
A/Prof Rob Womersley

Lecture 06 Solving Systems of Linear Equations

Guassian Elimination
Back-substitution
Row-Echelon form information

Solving Linear Systems


Row-Echelon form
Reduced Row-Echelon form

MATH1151 (Algebra)

L06 Solving Systems of Linear Equations


Solving Linear Systems

Session 1, 2014

1 / 16

Example (Leading row, column)

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

Solution
Leading rows: R1 and R2
Leading elements: a12 and a24
Leading columns: 2 and 4
Non-leading columns: Columns 1, 3 and 5
MATH1151 (Algebra)

Row-Echelon form

L06 Solving Systems of Linear Equations


Solving Linear Systems

Row-Echelon form 2

Row-Echelon form 3

Definition (Row Echelon Form)

Example

0
0 1 2

A= 0 0 0 , B= 0
0 0 3
0

A matrix A is in row echelon form


1

All leading rows are above all non-leading rows (ie all zero rows are at
the bottom) and
In every leading row, the leading entry is to the right of the leading
entry in any rows higher up in the matrix

Example (Row-Echelon form)

1
1
3
2

A= 0
-2 15 8 ,
0
0
16 11

6
B= 0
0

1
-3
0

L06 Solving Systems of Linear Equations

Session 1, 2014

0
1
0

Session 1, 2014

2 / 16

Row-Echelon form

2
2
0

1
0

0 , C = 0
1
0

1
2
0

0
3
0

5
4

Solution
A: Row R2 of all zeros not at the bottom
Row operation: R2 R3

5
4
0

B: Leading element in R2 not to the right of leading element in R1


Row operation: R1 R2

C: Leading element in R2 not to the right of leading element in R1

Solution
A: All leading rows, leading elements a11 , a22 , a33 ; Row-Echelon form
B: R1 , R2 leading rows, leading elements a11 , a22 ; Row-Echelon form
MATH1151 (Algebra)

3
R1 leading row

R
4
2 leading row
0

3 / 16

Row operation: R2 R2 2R1

MATH1151 (Algebra)

L06 Solving Systems of Linear Equations

Session 1, 2014

4 / 16

Solving Linear Systems

Reduced Row-Echelon form

Solving Linear Systems

Reduced Row-Echelon form

Gaussian Elimination
Augmented matrix C = [A | b] with m rows/equations

Definition (Reduced Row-Echelon form, Matlab rref)

Matrix is in Reduced Row-Echelon form it is in Row-Echelon form


and
1
2

every leading entry is 1


every leading entry is the only non-zero entry in its column

A= 0
0

3
0
0

0
1
0

4
2
0

0
0
1

2 ,
3

B= 0
0

2
1
0

3
0
1

Solution
A: in Reduced Row-Echelon form
B: in Row-Echelon form, not reduced Row-Echelon form
Row operations: R1 R1 3R3 ,
MATH1151 (Algebra)

1
4

Session 1, 2014

Reduce to Row-Echelon form


Back-substitution

Reduction to Row-Echelon form


for j = 1:m

end
Pivot column: left most non-zero column in un-reduced part of matrix
Pivot element: non-zero, in pivot column. Choose one of
top non-zero element (first)
simplest non-zero element (hand)
element of largest magnitude (computer)

R1 R1 2R2 ,

L06 Solving Systems of Linear Equations


Solving Linear Systems

Select a non-zero pivot element from the un-reduced part of the matrix
If necessary, interchange rows to move pivot element to row j
Eliminate (make 0) all entries in pivot column below pivot element
using row operations Ri Ri ij Rj
Stop if in Row-Echelon form

Example (Reduced Row-Echelon form)

Gaussian Elimination

5 / 16

MATH1151 (Algebra)

Gaussian Elimination

L06 Solving Systems of Linear Equations


Solving Linear Systems

Reduction to Row-Echelon form Example 1

Row-Echelon form Leading variable

Example (Reduction to Row-Echelon form Example 1)

4 0 2 3
3 1 6 2
1 1 3
2

Solution (Cont.)

0
0

j = 1 Swap R1 R3 , then eliminate using row operations:

1 1 3
2
3 1 6 2
R2 R2 3R1
R3 R3 4R1
4 0 2 3

MATH1151 (Algebra)

6 / 16

j=3

Solution (For hand calculations)

j = 2 Eliminate using row operations:

1 1
3
2
0 -2 15 8
0 4 14 5

Session 1, 2014

Gaussian Elimination

1
-2
0

3
2

15 8
16 11

In Row-Echelon form
Every variable is a leading variable (is in a leading column) =
unique solution
Definition (Leading variable)
xj is a leading variable the jth column of the Row-Echelon form is a
leading column

R3 R3 2R2

L06 Solving Systems of Linear Equations

Session 1, 2014

In augmented matrix [A | b] last column corresponds to RHS vector b


7 / 16

MATH1151 (Algebra)

L06 Solving Systems of Linear Equations

Session 1, 2014

8 / 16

Solving Linear Systems

Gaussian Elimination

Solving Linear Systems

Gaussian Elimination

Reduction to Row-Echelon form - Example 2

Reduction to Row-Echelon form - Example 3

Example (Reduction to Row-Echelon form Example 2)

1
3 0
6
2 6 8 10
R2 R2 + 2R1
R3 R3 3R1
3
9 4 21
Solution
j = 1: Eliminate

1 3 0 6
0 0 8 2
R3 R3 12 R2
0 0 4 3
j = 2: Eliminate

1 3 0
6

2
0 0 8
Row-Echelon form
0 0 0
2

Example (Reduction
to Row-Echelon form

Example 3)
2
1
4
8
6
R2 R2 3R1
3 14 30
R3 R3 + R1
2 1 6 14
Solution
Eliminate

2 1 4
8
0 0 2
6
0 0 2 6
Row-Echelon form

2
0
0

Last column corresponding to b is a leading column


L06 Solving Systems of Linear Equations
Solving Linear Systems

Session 1, 2014

9 / 16

Let x2 = R free parameter = x1 = 2

x = (2, 0, 3)T + ( 21 , 1, 0)T , R


Line in R3 , through (2, 0, 3)T , parallel ( 21 , 1, 0)T
L06 Solving Systems of Linear Equations

Session 1, 2014

10 / 16

Back-substitution

Gaussian Elimination Back-substitution


History (Wikipedia)
Named after Carl Friedrich Gauss, 1777 1855,
http://en.wikipedia.org/wiki/Gauss
Chinese The Nine Chapters on the Mathematical Art, Chapter 8
Rectangular Arrays, 10th2nd century BCE,
http://en.wikipedia.org/wiki/The_Nine_Chapters_on_the_Mathematical_Art

Article by Isaac Newton 1670,


http://en.wikipedia.org/wiki/Isaac_Newton

must work on the whole row, produce

1 1 4
0 3 3
0
3 0

Session 1, 2014

Reduction of [A | b] to Row-Echelon form [U | y]


Row operations:
Swap: Ri Rj
Ri Ri ij Rj

in column 1. Use R3 R3 + 31 R2 to get

1 4

0 9 Row-Echelon form
2
1

L06 Solving Systems of Linear Equations

OK

Equation 2: 2x3 = 6 = x3 = 3
Equation 1: 2x1 + x2 + 4x3 = 8

8
6
0

Solving Linear Systems

What is wrong with using these row operations?

MATH1151 (Algebra)

4
2
0

MATH1151 (Algebra)

Example (Reduction to Row-Echelon form incorrect row operations)

1 -1 1 4
0 3
R2 R2 + 3R1
0 9
R3 R3 R1
0 1 2
4

Created non-zero elements

1 1

3
0
0
0

1
0
0

Gaussian Elimination

Reduction to Row-Echelon form - Example 4

Solution
Suggested row operations, which

1
3
1

R3 R3 + R2

Equation 3: 0x1 + 0x2 + 0x3 = 0

Last equation 0x1 + 0x2 + 0x3 = 2 0 = 2 = no solution

MATH1151 (Algebra)

Back-substitution from Row-Echelon form to find values of variables


If y is a leading column = there are no solutions
Start from the last equation/row with a pivot element
Assign a parameter for each non-leading variable
Working backwards, substitute in the values for known variables, then
solve for the leading variable in that row

11 / 16

MATH1151 (Algebra)

L06 Solving Systems of Linear Equations

Session 1, 2014

12 / 16

Solving Linear Systems

Back-substitution

Solving Linear Systems

Back-substitution Example
Example (Back-substitution)

1
[U | y] = 0
0

Row-Echelon form information

Information in Row-Echelon form


0
0
0

2
3
0

1 3
6 12
0
0

Linear system [A | b] Row-Echelon form [U | y]


Row operations

Linear system has no solution y is a leading column


Right-hand column y not a leading column linear system has a
solution

Solution
[U | y] in Row-Echelon form
Non-leading variables x2 , x4 = parameters x4 = , x2 = R
Equation/Row 3: 0 = 0, No information
Equation/Row 2: 3x3 6x4 = 12

every variable is a leading variable unique solution


at least one non-leading variable infinitely many solutions
Each non-leading variable is a parameter in solution

x4 = = x3 = 4 + 2

If you only need to know existence of a solution = no need to do


back-substitution
Matlab rref (Reduced Row-Echelon Form) function

Equation/Row 1: x1 + 0x2 + 2x3 x4 = 3


x2 = = x1 = 5 3

Solution: x = (5 3, , 4 + 2, )T
x = (5, 0, 4, 0)T + (3, 0, 2, 1)T + (0, 1, 0, 0)T ,

Matlab script rrefex.m from course webpage

, R

R4 : plane through (5, 0, 4, 0)T , parallel to (3, 0, 2, 1)T , (0, 1, 0, 0)T


MATH1151 (Algebra)

L06 Solving Systems of Linear Equations


Solving Linear Systems

Session 1, 2014

13 / 16

MATH1151 (Algebra)

Row-Echelon form information

L06 Solving Systems of Linear Equations


Solving Linear Systems

Information in Row-Echelon form Example

Homogeneous Systems

Example (Information from Row-Echelon form [U | y])

3 1 4
3 1 4
3

-2 2 , 0
0
-2 2 , 0
0
0
0
0
0
0
1

Definition (Homogeneous linear system)

Any homogeneous linear system has at least one solution x = 0


Solution unique Row-Echelon form: every variable leading
Row operations applied to the zero vector only produce zero vectors
Just work with A not augmented matrix [A | 0]

Example (Homogeneous linear systems)

"
#
3
3 1
U=
,
V = 0
0
2
0

all variables are leading variables = unique solution

Example 3: y is a non-leading column = solution exists


one non-leading variable x2 = infinitely many solutions, one
parameter

L06 Solving Systems of Linear Equations

Session 1, 2014

14 / 16

A linear system Ax = b is homogeneous the right-hand-side b = 0

1 4
0 0
0 0

Solution
Example 1: y is a leading column = no solutions
Example 2: y is a non-leading column = solution exists

MATH1151 (Algebra)

Session 1, 2014

Row-Echelon form information

1 4
2 3
0 0

Solution
U : all leading variables = unique solution (must be x = 0)
V : x3 non-leading = infinitely many solutions
15 / 16

MATH1151 (Algebra)

L06 Solving Systems of Linear Equations

Session 1, 2014

16 / 16

Você também pode gostar