0% found this document useful (0 votes)
9 views

Lecture2

The document discusses solving systems of linear equations using augmented matrices and row operations to achieve echelon and reduced echelon forms. It outlines the definitions and properties of echelon forms, including leading entries and the process of applying elementary row operations. The document also describes the row-reduction algorithm, which involves a forward stage to achieve echelon form followed by a backward stage to reach reduced echelon form.

Uploaded by

riovqn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lecture2

The document discusses solving systems of linear equations using augmented matrices and row operations to achieve echelon and reduced echelon forms. It outlines the definitions and properties of echelon forms, including leading entries and the process of applying elementary row operations. The document also describes the row-reduction algorithm, which involves a forward stage to achieve echelon form followed by a backward stage to reach reduced echelon form.

Uploaded by

riovqn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Math 107 (Spring 2022)

Week 1: Lecture 2

Emre Mengi

February 15, 2022


Solving a System of Linear Equations

A system of m linear equations in n variables

a11 x1 + a12 x2 + · · · + a1n xn = b1

a21 x1 + a22 x2 + · · · + a2n xn = b2

..
.

am1 x1 + am2 x2 + · · · + amn xn = bm

1
Solving a System of Linear Equations

A system of m linear equations in n variables

a11 x1 + a12 x2 + · · · + a1n xn = b1

a21 x1 + a22 x2 + · · · + a2n xn = b2

..
.

am1 x1 + am2 x2 + · · · + amn xn = bm

Corresponding Augmented Matrix


2 3
a11 a12 . . . a1n b1
6 a21 a22 . . . a2n b2 7
6 7
6 .. .. 7
4 . . 5
am1 am2 . . . amn bm

1
Solving a System of Linear Equations

Augmented
A system of m linear equations in n variables

a11 x1 + a12 x2 + · · · + a1n xn = b1 matrix

8
a21 x1 + a22 x2 + · · · + a2n xn = b2

echelon
38 79
..
.
3 4
am1 x1 + am2 x2 + · · · + amn xn = bm
form
Corresponding Augmented Matrix
2 3
3 egns 3 variables
a11 a12 . . . a1n b1
6 a
6 21 a22 . . . a2n b2 7
6 ..
4 . .
.
7
7
. 5 2x 3 2 43 7
am1 am2 . . . amn bm

x2 2 5
System of linear equations is solved by
3
3
• applying row operations to the augmented matrix
3 9
1
Solving a System of Linear Equations

A system of m linear equations in n variables

a11 x1 + a12 x2 + · · · + a1n xn = b1

a21 x1 + a22 x2 + · · · + a2n xn = b2

..
.

am1 x1 + am2 x2 + · · · + amn xn = bm

Corresponding Augmented Matrix


2 3
a11 a12 . . . a1n b1
6 a21 a22 . . . a2n b2 7
6 7
6 .. .. 7
4 . . 5
am1 am2 . . . amn bm

System of linear equations is solved by

• applying row operations to the augmented matrix, and

• reducing it to echelon or reduced echelon form.

1
Echelon Form

A leading entry of a matrix is the left-most nonzero entry in a

I
row of the matrix.

leading entries

2
Echelon Form

A leading entry of a matrix is the left-most nonzero entry in a


row of the matrix.

Definition 2.1.

A matrix is said to be in echelon form if

• all zero rows (if there are any) are underneath the nonzero
rows,

2
888
f
Echelon Form

A leading entry of a matrix is the left-most nonzero entry in a


not
row of the matrix.

echelon
Definition 2.1.

A matrix is said to be in echelon form if


8.0027
• all zero rows (if there are any) are underneath the nonzero
rows,
i
• leading entries move to right as you move down the matrix.
i
not echelon

0008 0 02.7
echelon 2 echelon
Echelon Form

A leading entry of a matrix is the left-most nonzero entry in a


row of the matrix.

Definition 2.1.

A matrix is said to be in echelon form if

• all zero rows (if there are any) are underneath the nonzero
rows,

• leading entries move to right as you move down the matrix.

Example
2 3 2 3
3 2 1 5 3 2 1 5

08
6 7 6 7

000
40 0 1 25 40 3 2 05
0 3 2 0 0 0 1 2

2
Echelon Form

A leading entry of a matrix is the left-most nonzero entry in a


row of the matrix.

Definition 2.1.

A matrix is said to be in echelon form if

• all zero rows (if there are any) are underneath the nonzero
rows,

• leading entries move to right as you move down the matrix.

Example
2 3 2 3
3 2 1 5 3 2 1 5
6 7 6 7
40 0 1 25 40 3 2 05
0 3 2 0 0 0 1 2

not echelon echelon

2
Reduced Echelon Form

Definition 2.2.

A matrix is said to be in reduced echelon form if

• it is in echelon form,

3
Reduced Echelon Form

Definition 2.2.

A matrix is said to be in reduced echelon form if

• it is in echelon form,

• its each leading entry is 1,

3
Reduced Echelon Form

Definition 2.2.

A matrix is said to be in reduced echelon form if

• it is in echelon form,
echelon
reduced
18 8t
a
echelon
• its each leading entry is 1,

• the column of each leading entry is formed of 0s


except the leading entry.

8
reduced
echelon O
µ
3 Headingtry
Reduced Echelon Form

Definition 2.2.

A matrix is said to be in reduced echelon form if

• it is in echelon form,

• its each leading entry is 1,

• the column of each leading entry is formed of 0s


except the leading entry.

Example
2 3
1 0 0 5
6 7
40 1 0 05
0 0 1 2

is in reduced echelon form.

3
Elementary Row Operations

Elementary row operations are applied to the augmented matrix.

4
Elementary Row Operations

Elementary row operations are applied to the augmented matrix.

oil
E 2
(1) Row-replace
Add a multiple of a row to another row. o I
rj := rj + crk

(c times kth row is added to the jth row)

I h
I 2 1 3
3
84 Y

4
Elementary Row Operations

Elementary row operations are applied to the augmented matrix.

(1) Row-replace
Add a multiple of a row to another row.

rj := rj + crk

(c times kth row is added to the jth row)

(2) Row-interchange
Swap two rows.
rj ! rk
(swap jth and kth rows)

4
Elementary Row Operations

Elementary row operations are applied to the augmented matrix.

(1) Row-replace
Add a multiple of a row to another row.

rj := rj + crk

(c times kth row is added to the jth row)

(2) Row-interchange
Swap two rows.
rj ! rk
(swap jth and kth rows)

(3) Row-scale
Multiply a row by a nonzero scalar.

rj := crj

(multiply jth row by c 6= 0)

4
Elementary Row Operations

Elementary row operations are applied to the augmented matrix.

(1) Row-replace
Add a multiple of a row to another row.

rj := rj + crk

(c times kth row is added to the jth row)

(2) Row-interchange
Swap two rows.
rj ! rk
(swap jth and kth rows)

(3) Row-scale
Multiply a row by a nonzero scalar.

rj := crj

(multiply jth row by c 6= 0)

Remark: Elementary row operations preserve the solution.

4
Example

Bring the matrix


2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

into an echelon form by applying (elementary) row operations.

5
Example

Bring the matrix


2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

into an echelon form by applying (elementary) row operations.

2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

5
Example

Bring the matrix


2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

into an echelon form by applying (elementary) row operations.

2 3 2 3
0 1 1 1 1 2 2 0
6 7 6 7
41 2 2 05 !
|{z} 40 1 1 15
1 4 3 0 r1 !r2 1 4 3 0

5
Example

Bring the matrix


2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

into an echelon form by applying (elementary) row operations.

2 3 2 3
0 1 1 1 1 2 2 0
6 7 6 7
41 2 2 05 !
|{z} 40 1 1 15
1 4 3 0 r1 !r2 1 4 3 0

2 3
1 2 2 0
6 7

Og
!
|{z} 40 1 1 15
r3 := r3 r1 0 2 1 0

5
Example

Bring the matrix


2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0

into an echelon form by applying (elementary) row operations.

2 3 2 3
0 1 1 1 1 2 2 0
6 7 6 7

sample
41 2 2 05 !
|{z} 40 1 1 15
1 4 3 0 r1 !r2 1 4 3 0

complicated 2
6
1 2 2 0
3
7 2 2 2
XztXz
! 40 1 1 15

41
|{z}
r3 := r3 r1 0 2 1 0

x 2 2 2 3 0 2 3
XztXz
6
1 2 2 0
7
3 2
0
! 4 0 1 1 15
x 4 3
|{z}

2
r3 := r3 2r2 0 0 1 2
a
3
| {z }
Echelon Form

5
The Row-Reduction Algorithm

Overall Procedure

Augmented Matrix (1) Echelon Form (2) Reduced Echelon Form

6
The Row-Reduction Algorithm

Overall Procedure

Augmented Matrix (1) Echelon Form (2) Reduced Echelon Form

(1) Forward Stage (by applying row operations)

6
The Row-Reduction Algorithm

Overall Procedure

Augmented Matrix (1) Echelon Form (2) Reduced Echelon Form

(1) Forward Stage (by applying row operations)

(2) Backward Stage (by applying row operations)

6
The Row-Reduction Algorithm

Forward Stage (reduction into echelon form)

7
The Row-Reduction Algorithm

I
Forward Stage (reduction into echelon form)

(1) Start with the left-most column, say `th, with a nonzero entry.

E
x a nonzero
entry
fig

8 I 8
7
The Row-Reduction Algorithm

Forward Stage (reduction into echelon form)

(1) Start with the left-most column, say `th, with a nonzero entry.

(2) If entry at position (1, `) is 0, perform

E
rj ! r1

where rj is a row such that entry at position (j, `) is not zero.

7
ÉiiI
The Row-Reduction Algorithm

Forward Stage (reduction into echelon form)

(1) Start with the left-most column, say `th, with a nonzero entry.

T28 I T2 T
(2) If entry at position (1, `) is 0, perform

rj ! r1

where rj is a row such that entry at position (j, `) is not zero.

(3) Introduce zeros on the `th column underneath entry


at position (1, `) by row-replace operations.

7
The Row-Reduction Algorithm

Forward Stage (reduction into echelon form)

(1) Start with the left-most column, say `th, with a nonzero entry.

(2) If entry at position (1, `) is 0, perform

rj ! r1

where rj is a row such that entry at position (j, `) is not zero.

(3) Introduce zeros on the `th column underneath entry


at position (1, `) by row-replace operations.

(4) Repeat steps (1)-(4) after removing the first row.

on this
7 part it'd
The Row-Reduction Algorithm

Example (to illustrate the forward stage)

x2 + 3x3 = 8
3x1 + 2x2 x3 = 9
x1 x2 + 3x3 = 2

8
The Row-Reduction Algorithm

Example (to illustrate the forward stage)

interchange
x2 + 3x3 = 8
3x1 + 2x2 x3 = 9
x1 x2 + 3x3 = 2

need
2 3

gf
0 1 3 8
6 7
6 3 2 1 97
4 5
1 1 3 2

8
The Row-Reduction Algorithm

Example (to illustrate the forward stage)

x2 + 3x3 = 8
3x1 + 2x2 x3 = 9

3
x1 x2 + 3x3 = 2

add
3rd row
2 3 2 3
6
6 3
0 1
2
3
1
8
97
7
!
6
6 0
3 2
1
1
3
9
87
7 to
4 5 |{z} 4 5
r1 !r2

0
1 1 3 2 1 1 3 2

needs to be

8
The Row-Reduction Algorithm

Example (to illustrate the forward stage)

x2 + 3x3 = 8
3x1 + 2x2 x3 = 9
x1 x2 + 3x3 = 2

2 3 2 3
0 1 3 8 3 2 1 9
6 7 6 7
6 3 2 1 97 ! 6 0 1 3 87
4 5 |{z} 4 5
r1 !r2
1 1 3 2 1 1 3 2

2 3
3 2 1 9

I
6 7
! 6 0 1 3 87
|{z} 4 5
r3 :=r3 1/3r1
0 5/3 10/3 5

needs to be O

8
The Row-Reduction Algorithm

Example (to illustrate the forward stage)

x2 + 3x3 = 8
3x1 + 2x2 x3 = 9
x1 x2 + 3x3 = 2

2 3 2 3
0 1 3 8 3 2 1 9
6 7 6 7
6 3 2 1 97 ! 6 0 1 3 87
4 5 |{z} 4 5
r1 !r2
1 1 3 2 1 1 3 2

2 3
3 2 1 9
6 7
! 6 0 1 3 87
|{z} 4 5
r3 :=r3 1/3r1
0 5/3 10/3 5

2 3
3 2 1 9
6 7

000
! 6 0 1 3 87
|{z} 4 5
r3 :=r3 +5/3r2
0 0 25/3 25/3

8
echelon
The Row-Reduction Algorithm

Backward Stage (reduction into reduced echelon form)

isO x x x

I
809 I toy
reduced echelon
9
The Row-Reduction Algorithm

Backward Stage (reduction into reduced echelon form)


start with

EI EI
1. Start with the right-most column with a leading entry.

9
The Row-Reduction Algorithm

Backward Stage (reduction into reduced echelon form)

scale
1. Start with the right-most column with a leading entry.

tow
2. Set that leading entry equal to 1 by a row-scale.

1 O x XO x

9
The Row-Reduction Algorithm

Backward Stage (reduction into reduced echelon form)

1. Start with the right-most column with a leading entry.

2. Set that leading entry equal to 1 by a row-scale.

row replace
3. Introduce 0s on that column above the leading entry

Eitel
by row-replace operations.

9
The Row-Reduction Algorithm

Backward Stage (reduction into reduced echelon form)

1. Start with the right-most column with a leading entry.

2. Set that leading entry equal to 1 by a row-scale.

3. Introduce 0s on that column above the leading entry


by row-replace operations.

4. Move to the left to the nearest column with a leading entry,


and repeat (2)-(4).

9
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

2 3
3 2 1 9
6 7
6 0 1 3 87
4 5
0 0 25/3 25/3

10
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

2 3 2 3
3 2 1 9 3 2 1 9
6 7 6 7
6 0 1 3 87 ! 6 0 1 3 87
4 5 |{z} 4 5
r3 :=3/25r3
0 0 25/3 25/3 0 0 1 1

10
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

reef be O
If
2 3 2 3
3 2 1 9 3 2 1 9
6 7 6 7
6 0 1 3 87 ! 6 0 1 3 87
4 5 |{z} 4 5
r3 :=3/25r3
0 0 25/3 25/3 0 0 1 1

2 3
3 2 0 10
6 7
! 6 0 1 0 5 7
|{z} 4 5
r2 :=r2 3r3 , r1 :=r1 +r3
0 0 1 1

on
this
repeatcolumn

10
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

2 3 2 3
3 2 1 9 3 2 1 9
6 7 6 7
6 0 1 3 87 ! 6 0 1 3 87
4 5 |{z} 4 5
r3 :=3/25r3
0 0 25/3 25/3 0 0 1 1

2 3
3 2 0 10
6 7
! 6 0 1 0 5 7
|{z} 4 5
r2 :=r2 3r3 , r1 :=r1 +r3
0 0 1 1

2 3
3 0 0 0
6 7
! 6 0 1 0 5 7
|{z} 4 5
r1 :=r1 2r2
0 0 1 1

10
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

2 3 2 3
3 2 1 9 3 2 1 9
6 7 6 7
6 0 1 3 87 ! 6 0 1 3 87
4 5 |{z} 4 5
r3 :=3/25r3
0 0 25/3 25/3 0 0 1 1

2 3
3 2 0 10
6 7
! 6 0 1 0 5 7
|{z} 4 5
r2 :=r2 3r3 , r1 :=r1 +r3
0 0 1 1

2 3
3 0 0 0
6 7
! 6 0 1 0 5 7
|{z} 4 5
r1 :=r1 2r2
0 0 1 1

2 3
1 0 0 0
6 7
! 6 0 1 0 5 7
|{z} 4 5
r1 :=(1/3)r1
0 0 1 1

10
The Row-Reduction Algorithm

Example (to illustrate the backward stage)

2 3 2 3
3 2 1 9 3 2 1 9
6 7 6 7
6 0 1 3 87 ! 6 0 1 3 87
4 5 |{z} 4 5
r3 :=3/25r3
0 0 25/3 25/3 0 0 1 1

2 3
3 2 0 10
6 7
! 6 0 1 0 5 7
|{z} 4 5
r2 :=r2 3r3 , r1 :=r1 +r3
0 0 1 1

2 3
3 0 0 0
6 7
! 6 0 1 0 5 7
|{z} 4 5
r1 :=r1 2r2
0 0 1 1

2 3
1 0 0 0
6 7
! 6 0 1 0 5 7
|{z} 4 5
r1 :=(1/3)r1
0 0 1 1

Solution: x1 = 0, x2 = 5, x3 = 1

10
Example

Find the quadratic polynomial q(t) through

(1, 1), (2, 0), (3, 2).

11
Example variables
É3t
Find the quadratic polynomial q(t) through
Find
pct
Got tazÉ
such that p117 1 p122 0 p137
(1, 1), (2, 0), (3, 2).

25

ao a azs.t
20

15
Equivalently find
10 near ie
0
5 systems do t 2 a t Gaz
0
zegns
variables
row reduction alg
-5
z
the
-2 -1 0 1 2 3 4 5

interchange Apply to the augmented matrix


040
form

Backside 11
L Earl idea
Summary

• Echelon and Reduced Echelon Forms

• Elementary Row Operations

• The Row-Reduction Algorithm

12
1 Exercise — Temperature Example
0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2
System of Linear Equations
0.1
4T1 T2 T3 = 70
0
0 0.1 T1 0.2 0.5 ,
+ 4T20.3 T30.4 = 50 0.6 0.7 0.8 0.9 1

T1 T2 + 4T3 = 80

13

You might also like