Lecture2
Lecture2
Week 1: Lecture 2
Emre Mengi
..
.
1
Solving a System of Linear Equations
..
.
1
Solving a System of Linear Equations
Augmented
A system of m linear equations in n variables
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
..
.
1
Echelon Form
I
row of the matrix.
leading entries
2
Echelon Form
Definition 2.1.
• all zero rows (if there are any) are underneath the nonzero
rows,
2
888
f
Echelon Form
echelon
Definition 2.1.
0008 0 02.7
echelon 2 echelon
Echelon Form
Definition 2.1.
• all zero rows (if there are any) are underneath the nonzero
rows,
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
Definition 2.1.
• all zero rows (if there are any) are underneath the nonzero
rows,
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
2
Reduced Echelon Form
Definition 2.2.
• it is in echelon form,
3
Reduced Echelon Form
Definition 2.2.
• it is in echelon form,
3
Reduced Echelon Form
Definition 2.2.
• it is in echelon form,
echelon
reduced
18 8t
a
echelon
• its each leading entry is 1,
8
reduced
echelon O
µ
3 Headingtry
Reduced Echelon Form
Definition 2.2.
• it is in echelon form,
Example
2 3
1 0 0 5
6 7
40 1 0 05
0 0 1 2
3
Elementary Row Operations
4
Elementary Row Operations
oil
E 2
(1) Row-replace
Add a multiple of a row to another row. o I
rj := rj + crk
I h
I 2 1 3
3
84 Y
4
Elementary Row Operations
(1) Row-replace
Add a multiple of a row to another row.
rj := rj + crk
(2) Row-interchange
Swap two rows.
rj ! rk
(swap jth and kth rows)
4
Elementary Row Operations
(1) Row-replace
Add a multiple of a row to another row.
rj := rj + crk
(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
4
Elementary Row Operations
(1) Row-replace
Add a multiple of a row to another row.
rj := rj + crk
(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
4
Example
5
Example
2 3
0 1 1 1
6 7
41 2 2 05
1 4 3 0
5
Example
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
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
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
6
The Row-Reduction Algorithm
Overall Procedure
6
The Row-Reduction Algorithm
Overall Procedure
6
The Row-Reduction Algorithm
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
(1) Start with the left-most column, say `th, with a nonzero entry.
E
rj ! r1
7
ÉiiI
The Row-Reduction Algorithm
(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
7
The Row-Reduction Algorithm
(1) Start with the left-most column, say `th, with a nonzero entry.
rj ! r1
on this
7 part it'd
The Row-Reduction Algorithm
x2 + 3x3 = 8
3x1 + 2x2 x3 = 9
x1 x2 + 3x3 = 2
8
The Row-Reduction Algorithm
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
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
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
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
isO x x x
I
809 I toy
reduced echelon
9
The Row-Reduction Algorithm
EI EI
1. Start with the right-most column with a leading entry.
9
The Row-Reduction Algorithm
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
row replace
3. Introduce 0s on that column above the leading entry
Eitel
by row-replace operations.
9
The Row-Reduction Algorithm
9
The Row-Reduction Algorithm
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
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
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
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
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
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
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
Backside 11
L Earl idea
Summary
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