MAT 1302A - Mathematical Methods II: Alistair Savage
MAT 1302A - Mathematical Methods II: Alistair Savage
MAT 1302A - Mathematical Methods II: Alistair Savage
Alistair Savage
Mathematics and Statistics
University of Ottawa
1 / 28
Overiew
Announcements
DGDS start next week.
Last Time
Overview of linear algebra
Linear equations
Systems of linear equations (linear systems)
Solution sets
Matrices (coefficient matrix and augmented matrix)
Todays goal
Develop a precise procedure for solving any system.
Alistair Savage (uOttawa)
2 / 28
Matrix terminology
Matrix terminology
zero row or column: row or column with all entries equal to zero
nonzero row or column: row or column with at least one nonzero entry
leading entry of a row: leftmost nonzero entry
Examples
2
0
0
0
0
0 0 0
0 1 5 9
0
0 0 0
4
0 0 8
0 1 3 4
0 0 0 0
0 0 0 8
3 / 28
Terminology
(Row) Echelon form
A matrix is in (row) echelon form if it satisfies the following 3 conditions:
1
The leading entry of a nonzero row is to the right of the leading entry
of any row above it.
All entries in a column below a leading entry are zeros (this actually
follows from the second condition).
4 / 28
Terminology
5 / 28
Examples
Example 1
1 0 0 1
0 1 0
0
2
0 0 1
Example 2
1 2 3
1
1
0
0 1
2
0
0
0
3
0
0
0
0
0
0
0
0
6 / 28
Examples
Example 3
1 0 0 1
1 1 0
0
2
0 0 1
Example 4
0
0
0
0
1 2 3
1
1
0
0 2 1
0
0
0
3
0
0
0
0
7 / 28
Examples (cont.)
Example 5
0 0
6= 0
0 0
6= 0
0 0
6= 0
0
0
0 0
0 0
0
0
0
0
0
0
6= 0
0
0 0
0 0
0 0
0 0
EF
(=arbitrary entry)
Example 6
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
RREF
8 / 28
Example
1 0
,
0 1
2 0
,
0 3
and
1 1
0 1
are all row equivalent and are all in echelon form. However, only the
leftmost matrix is in reduced row echelon form.
9 / 28
Overview
Goal: Develop an algorithm for solving LSs.
Technique:
/ Solution set
O
Linear system
Augmented matrix
row reduction
/ EF or RREF
We first focus on the bottom arrow (row reduction). We will forget about
LSs for the time being.
Lets work through another example and try to keep track of why we are
performing each step.
10 / 28
Example
0
0 1 2
7
2
2
R1 R2 0
1
3
2
5
2
2
1
3
6
2
4 2 7 2 17
4
2 1 3 2 5
2
R1 +R3
R2 +R4 0
0
0
1
2
7
2R1 +R4
0 0 0 4 3 0
0
0 0 1 2 7
1
3
2
5
0 1 2
7
1
3
6
2
2 7 2 17
1 3 2 5
0 1 2 7
EF
0 0 4 3
0 0 0 0
11 / 28
Previous example
0 1 2
7
0
1
3
2
5 row reduction
2
2
1
3
6
2
4 2 7 2 17
2
0
0
0
1
0
0
0
3
-1
0
0
2
2
4
0
7
EF
3
0
The boxed positions are the pivot positions and the first, third and fourth
columns are the pivot columns.
Alistair Savage (uOttawa)
12 / 28
Pivots
Definition
A pivot is a nonzero number in a pivot position used to create zeros via
row operations.
Previous example
0
0
2
1
2
1
4 2
2
R1 +R3
0
2R1 +R4
0
0
1 2
7
2
3
2
5 R1 R2 0
3
6
2
2
7 2 17
4
1
3
2 5
2
0 1 2 7
R
+R
4
2
0
0
0
0
4 3
0 1 2 7
0
1
3
2
5
0 1 2
7
1
3
6
2
2 7 2 17
1 3 2 5
0 1 2 7
EF
0 0 4 3
0 0 0 0
13 / 28
0
0
2
4
2 0 10
0 1 2 3 1 0 3
0
6
6
6
9 0
6
0
3
1 5 1 0 20
Step 1: Begin with the leftmost nonzero column. This is a pivot column
and the pivot position is at the top.
Step 2: Select a nonzero entry in the pivot column as a pivot. If necessary,
interchange rows to move this entry into the pivot position.
0 -1 2 3 1 0 3
R1 R2
0 0
2
4
2 0 10
0 6
6
6
9 0
6
0 3 1 5 1 0 20
Alistair Savage (uOttawa)
14 / 28
0
0
0
0
-1
0
6
3
2 3 1
2
4
2
6
6
9
1 5 1
0 3
0 10
0
6
0 20
0 1 2 3 1 0 3
6R1 +R3
0 0
2
4
2 0 10
3R1 +R4
0 0 6 12 3 0 12
0 0 7 14 4 0 29
Step 4: Ignore (cover) the row containing the pivot position and all rows
above it. Apply steps 1-3 to the remaining submatrix. Repeat this process
until there are no more nonzero rows to modify.
Alistair Savage (uOttawa)
15 / 28
0 1 2 3 1 0 3
0 0
2
4
2 0 10
0 0 6 12 3 0 12
0 0 7 14 4 0 29
0 1 2 3 1 0
3R2 +R3
7
R
+R
2
4
0 0
2
4
2 0
2
0 0
0
0
9 0
0 0
0
0
3 0
0 1 2 3 1 0 3
0 0
2
4
2 0 10
0 0
0
0
9 0 18
0 0
0
0
3 0 6
0 1 2 3 1 0
13 R3 +R4 0
0
2
4
2 0
0 0
0
0
9 0
0 0
0
0
0 0
3
10
18
6
3
10
18
0
EF
16 / 28
Step 5: Beginning with the rightmost pivot and working up/left, use a
scaling operation to make each pivot a 1 and use replacement to create
zeros above each pivot.
0 1 2 3 1 0 3
0 0
2
4
2 0 10
0 0
0
0
9 0 18
0 0
0
0
0 0 0
0 1 2 3 1 0 3
1
R3 0
0
2
4
2 0 10
9
0 0
0
0
1 0 2
0 0
0
0
0 0 0
0 1 2 3 0 0 1
R3 +R1
2
4
0 0 6
2R +R2
0 0
3
0 0
0
0
1 0 2
0 0
0
0
0 0 0
17 / 28
0 1 2 3
0 0
4
2
0 0
0
0
0 0
0
0
0 1 2 3
1
R
2
0 0
1
2
2
0 0
0
0
0 0
0
0
0 -1 0 1 0
2R2 +R1
0 0 1 2 0
0 0 0 0 1
0 0 0 0 0
0 1 0 1 0
0 0 1 2 0
R1
0 0 0 0 1
0 0 0 0 0
0
0
1
0
0
0
1
0
0 1
0 6
0 2
0 0
0 1
0 3
0 2
0 0
5
3
0
0
0
0 0
0 5
0 3
0 2
0 0
RREF
18 / 28
Another example
4
4 3 13
2
2 4 4 0 7
4
8
4 0 20
2 4 4 3
R2 R3
0 0 -4 6
0 0 0 3
3R3 +R1
2 4 4
6R3 +R2
0 0 -4
0 0 0
2 4 0
4R +R1
0 0 1
2
0 0 0
R1 +R2
2 4 4
6
2R1 +R3
8 0 0 0
2
0 0 4
13 6
2 4 4
1
R3
6 10 3 0 0 4
6
2
0 0 0
0 7 8
2 4 4
1
R2
4
0 6 14
0 0 1
1 2 23
0 0 0
1 2 0
0 13 6
1
R
2 1
7
0 0 1
0 3
2
2
2
0 0 0
1 2
3
MAT 1302A Mathematical Methods II
3 13 6
3
6
2
6 6 10
3 13 6
6 6 10
2
1
2
3
0 7 8
7
0 3
2
2
2
1 2
3
13
0 2
3
7
0 3
2
2
2
1 2
3
19 / 28
Different algorithms
20 / 28
/ Solution set
O
Linear system
??
Augmented matrix
/ EF or RREF
row reduction
Example 1
1 0 0 3
0 1 0 2
0 0 1 5
x1
x2
x3
= 3
=
2
=
5
Only solution is
x1 = 3,
Alistair Savage (uOttawa)
x2 = 2,
x3 = 5.
21 / 28
0
0
0
0
1
0
0
0
6 11 18 0
1 1 3 2
0 1
2 5
0 0
0 9
0 = 9 contradiction
Example 3
1 0 2 0 0
0 1 1 0 2
0 0 0 1 8
x1
+ 2x3
x2 x3
x4
= 0
= 2
= 8
22 / 28
+ 2x3
x2 x3
x4
= 0
= 2
= 8
We solve the reduced system of equations for the basic variables in terms
of the free variables.
x1 = 2x3
x2 = 2 + x3
x3 free
x4 = 8
23 / 28
(1)
x3 free
x4 = 8
Each basic variable occurs in exactly one equation. The free variables (x3
here) can have any value and the above equations determine the values of
the basic variables.
Example: If x3 = 2, the corresponding solution is
(x1 , x2 , x3 , x4 ) = (4, 4, 2, 8).
24 / 28
25 / 28
1
0
0
was
0 2 0 0
1 1 0 2
0 0 1 8
x1
+ 2x3
x2 x3
x4
= 0
= 2
= 8
+ 2x3
(2 + x3 ) x3
= 0
= 2
8 = 8
X
X
X
26 / 28
27 / 28
Next time
To Do:
Read Section TSS of the text.
Do the recommended exercises.
Next Time:
More on general solutions
Geometric interpretation of linear systems
Existence of solutions (when is a system consistent?)
Uniqueness of solutions (is there just one solution or many?)
28 / 28