Topic 2 System of Linear Equations
Topic 2 System of Linear Equations
1
Linear Equations
3
Exercise 1
4
Linear systems
Example:
The system
7
Linear systems
8
Linear systems & Matrix
.
.
This is called
augmented matrix for
the system
9
Linear systems & Matrix
Example
10
Exercise 2
c) d)
𝟐
𝒒 − 𝒓 + 𝟏𝟏𝒑 = 𝟏𝟏
𝟑
11
Exercise 3
c)
12
Solving the Augmented Matrix
Solution:
step 1: convert to augmented matrix
15
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
step 2:
change element in column 1, row 1 to 1
the element is already 1 (no changes)
16
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
step 3:
change element in column 1, row 2 to 0
Change 2 to 0 using:
17
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
step 4:
change element in column 2, row 2 to 1
Change -3 to 1 using:
18
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
step 5:
change element in column 2, row 1 to 0
Change 2 to 0 using:
19
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Solution,
20
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
21
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
22
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 2:
R1 No changes
R2 Change to 0 using R1(-2) + R2
R3
Column 1 Column 2 Column 3 Column solution
= R1(-2) + R2 = R1(-2) + R2 = R1(-2) + R2 = R1(-2) + R2
= 1(-2) + 2 = -2(-2) + 1 = 3(-2) + 1 = 7(-2) + 4
= 0 = 5 = -5 = -10
𝟏 −𝟐 𝟑 𝟕
𝟎 𝟓 −𝟓 ቮ−𝟏𝟎
𝟑 −𝟐 𝟐 𝟏𝟎 23
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1 𝟏 −𝟐 𝟑 𝟕
R2 𝟎 𝟓 −𝟓 ቮ−𝟏𝟎
R3 𝟑 −𝟐 𝟐 𝟏𝟎 Change to 0 using R1(-3) + R3
Column 1 Column 2 Column 3 Column solution
= R1(-3) + R3 = R1(-3) + R3 = R1(-3) + R3 = R1(-3) + R3
= 1(-3) + 3 = -2(-3) + (-2) = 3(-3) + 2 = 7(-3) + 10
= 0 = 4 = -7 = -11
𝟏 −𝟐 𝟑 𝟕
𝟎 𝟓 −𝟓 ቮ−𝟏𝟎
𝟎 𝟒 −𝟕 −𝟏𝟏 24
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1 𝟏 −𝟐 𝟑 𝟕
R2 𝟎 𝟓 −𝟓 ቮ−𝟏𝟎
R3 𝟎 𝟒 −𝟕 −𝟏𝟏
Column 1 Column 2 Column 3 Column solution
𝑹𝟐 𝟎 𝑹𝟐 𝟓 𝑹𝟐 −𝟓 𝑹𝟐 −𝟏𝟎
= = = = = = = =
𝟓 𝟓 𝟓 𝟓 𝟓 𝟓 𝟓 𝟓
=𝟎 =𝟏 = −𝟏 = −𝟐
𝟏 −𝟐 𝟑 𝟕
𝟎 𝟏 −𝟏 ቮ −𝟐
𝟎 𝟒 −𝟕 −𝟏𝟏 25
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1 𝟏 −𝟐 𝟑 𝟕
R2 𝟎 𝟏 −𝟏 ቮ −𝟐
R3 𝟎 𝟒 −𝟕 −𝟏𝟏 Change to 0 using R2(-4) + R3
Column 1 Column 2 Column 3 Column solution
= R2(-4) + R3 = R2(-4) + R3 =R2(-4) + R3 =R2(-4) + R3
= 0(-4) + 0 = 1(-4) + 4 =-1(-4) + (-7) =-2(-4) + (-11)
= 0 = 0 =-3 =-3
𝟏 −𝟐 𝟑 𝟕
𝟎 𝟏 −𝟏 ቮ−𝟐
𝟎 𝟎 −𝟑 −𝟑 26
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1 𝟏 −𝟐 𝟑 𝟕 Change to 0 using R2(2) + R1
R2 𝟎 𝟏 −𝟏 ቮ−𝟐
R3 𝟎 𝟎 −𝟑 −𝟑
Column 1 Column 2 Column 3 Column solution
= R2(2) + R1 = R2(2) + R1 = R2(2) + R1 =R2(2) + R1
= 0(2) + 1 = 1(2) + (-2) =-1(2) + (3) =-2(2) + (7)
= 1 = 0 =1 =3
𝟏 𝟎 𝟏 𝟑
𝟎 𝟏 −𝟏 ቮ−𝟐
𝟎 𝟎 −𝟑 −𝟑 27
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1
𝟏 𝟎 𝟏 𝟑
R2 𝟎 𝟏 −𝟏 ቮ−𝟐
𝑹𝟑
R3 𝟎 𝟎 −𝟑 −𝟑 Change to 1 using
−𝟑
Column 1 Column 2 Column 3 Column solution
𝑹𝟑 𝟎 𝑹𝟑 𝟎 𝑹𝟑 −𝟑 𝑹𝟑 −𝟑
= = = = = = = =
−𝟑 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑
=𝟎 =𝟎 =𝟏 =𝟏
𝟏 𝟎 𝟏 𝟑
𝟎 𝟏 −𝟏 ቮ−𝟐
𝟎 𝟎 𝟏 𝟏 28
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1
𝟏 𝟎 𝟏 𝟑
R2 𝟎 𝟏 −𝟏 ቮ−𝟐 Change to 0 using R3(1) + R2
R3 𝟎 𝟎 𝟏 𝟏
Column 1 Column 2 Column 3 Column solution
= R3(1) + R2 = R3(1) + R2 = R3(1) + R2 = R3(1) + R2
= 0(1) + 0 = 0(1) + (1) =1(1) + (-1) =1(1) + (-2)
= 0 = 1 = 0 =-1
𝟏 𝟎 𝟏 𝟑
𝟎 𝟏 𝟎 ቮ−𝟏
𝟎 𝟎 𝟏 𝟏 29
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
Step 3:
R1 𝟏 𝟎 𝟏 𝟑 Change to 0 using R3(-1) + R1
R2 𝟎 𝟏 𝟎 ቮ−𝟏
R3 𝟎 𝟎 𝟏 𝟏
Column 1 Column 2 Column 3 Column solution
= R3(-1) + R1 = R3(-1) + R1 = R3(-1) + R1 = R3(-1) + R1
= 0(-1) + 1 = 0(-1) + (0) =1(-1) + (1) =1(-1) + (3)
= 1 = 0 = 0 =2
𝟏 𝟎 𝟎 𝟐
𝟎 𝟏 𝟎 ቮ−𝟏
𝟎 𝟎 𝟏 𝟏 30
Solving the Augmented Matrix –
Elementary Row Operations (ERO)
𝟏 𝟎 𝟎 𝟐
𝟎 𝟏 𝟎 ቮ−𝟏
𝟎 𝟎 𝟏 𝟏
x = 2, y = -1, z = 1
31
Exercise 4
b)
32
Row-Echelon Form 𝟏 𝟔 𝟖
𝟎 𝟏 𝟕
𝟎 𝟎 𝟏
If a row does not consist entirely of zeros,
then the first non zero number in the row
is a 1 (this is called leading 1).
If there are any rows that consist entirely
of zero, then they are grouped together at
the bottom of the matrix.
If any two successive rows that do not
consist entirely of zeros, the leading 1 in
the lower row occurs farther to the right
than the leading 1 in higher row.
33
Identify whether Row-Echelon
Form or not
a) 𝟐 𝟒 𝟏 c) 𝟏 𝟏 𝟐 𝟏
𝟎 −𝟏 𝟐 𝟎 𝟎 𝟏 𝟑
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎
𝟎 𝟐 𝟎 𝟏 −𝟏 𝟑
b) 𝟏 𝟎 𝟏 d)
𝟎 𝟏 𝟓 𝟎 𝟎 −𝟏 𝟏 𝟐 𝟐
𝟎 𝟎 𝟒 𝟎 𝟎 𝟎 𝟎 𝟒 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟓
34
Reduced Row-Echelon Form
35
Example of reduced row echelon
form
𝟏 𝟐 𝟎 𝟎 −𝟑 𝟏 𝟎
𝟎 𝟎 𝟏 𝟎 𝟒 −𝟏 𝟎
𝟎 𝟎 𝟎 𝟏 𝟑 −𝟐 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎
36
Exercise 5
38
Solving the Augmented Matrix –
Gaussian Elimination
Solution:
step 1: convert to augmented matrix
39
Solving the Augmented Matrix –
Gaussian Elimination
step 2:
change element in column 1, row 1 to 1
the element is already 1 (no changes)
40
Solving the Augmented Matrix –
Gaussian Elimination
step 3:
change element in column 1, row 2 to 0
Change 2 to 0 using:
41
Solving the Augmented Matrix –
Gaussian Elimination
step 4:
change element in column 2, row 2 to 1
Change -3 to 1 using:
42
Solving the Augmented Matrix –
Gaussian Elimination
step 5:
The augmented matrix has been converted to row
echelon form
𝟏 𝟐 𝒙 𝟕
=
𝟎 𝟏 𝒚 𝟐
Convert the augmented matrix to linear equation
system 𝒙 + 𝟐𝒚 = 𝟕 … . . (𝟏)
𝒚 = 𝟐….. 𝟐
Substitute 𝒚 = 𝟐 into (𝟏):
𝒙 + 𝟐(𝟐) = 𝟕
𝒙+𝟒=𝟕
𝒙=𝟑 43
Solving the Augmented Matrix –
Gaussian Elimination
𝑅1
2 −3 −2 𝑅1 =
2 1 ቮ1 2
3 2 1
−3
2 −3 −2 1 −1
= 1ቤ ฬ = −1 2 ቮ1
2 2 2 2 1
1
3 2
45
Solving the Augmented Matrix –
Gaussian Elimination
−3 −1
1
2 ተ
2 1 1 𝑅2 = 𝑅1 −2 + 𝑅2
3 2 1
−3 −1
1
1 −2 + 2 3 −1 −2 + 1 2 ተ
− −2 + 1 0 4 3
=0 2 =3
=4 3 2 1
46
Solving the Augmented Matrix –
Gaussian Elimination
−3 −1
1
2 ተ
0 4 3
3 2 1 𝑅3 = 𝑅1 −3 + 𝑅3
−3 −1
1 −3 + 3 3
1
− −3 + 2 −1 −3 + 1 2
=0 2 =4 0 4 3
13 13
=
2 0
2 4
47
Solving the Augmented Matrix –
Gaussian Elimination
−3 −1
1
2 𝑅2
0 4 3 𝑅2 =
13 4
0
2 4
−3
0 4 3 1 −1
=0 =1 = 2 3
4 4 4 0 1
13 4
0 4 48
2
Solving the Augmented Matrix –
Gaussian Elimination
−3
1 −1
2 3
0 1 13
13 4 𝑅 =𝑅 − + 𝑅3
3 2
0 4 2
2
−3
13 13 13 3 13 1 −1
0 − +0 1 − + − +4 2 3
2 2 2 4 2 0 1
=0 4
=0 7 7
=− 0 0 −
8 8 49
Solving the Augmented Matrix –
Gaussian Elimination
−3
1 −1
2 3
0 1
4
7
0 0 −
8
No solution @ inconsistent
50
Exercise 6
51
Solving the Augmented Matrix –
Matrix Inverse
Solution:
step 1: convert to augmented matrix
52
Solving the Augmented Matrix –
Matrix Inverse
1 2 𝑥 7
𝑦 =
2 1 8
A x = B
A-1A x = A-1B
I x = A-1B
x = A-1B
53
Solving the Augmented Matrix –
Matrix Inverse
Step 2: Find A-1
1 2
A=
2 1
1 1 −2
A =
-1
1 1 −2(2) −2 1
1 1 −2
=
−3 −2 1
− 1Τ3 2Τ3
= 2
Τ3 − 1Τ3 54
Solving the Augmented Matrix –
Matrix Inverse
Step 3: x = A-1B
− 1Τ3 2Τ3 7
= 2
Τ3 − 1Τ3 8
− 7Τ3 + 16Τ3
= 14
Τ3 − 8Τ3
9Τ
3
= 6Τ
3
=
3 2
55
Solving the Augmented Matrix –
Matrix Inverse
𝑥 3
x=𝑦 =
2
Solution, 𝑥 = 3 𝑎𝑛𝑑 𝑦 = 2
56
Solving the Augmented Matrix –
Matrix Inverse
Example: Solve the following linear
equations using matrix inverse
𝑥−𝑦 =2
𝑥−𝑧 =5
−6𝑥 + 2𝑦 + 3𝑧 = −1
1 −1 0 𝑥 2
Step 1: 1 0 −1 𝑦 = 5
−6 2 3 𝑧 −1
A x = B
x = A-1B 57
Solving the Augmented Matrix –
Matrix Inverse
Step 2: Find A-1
−2 −3 −1 This answer is from
A-1 = −3 −3 −1 example in topic 1 matrix,
−2 −4 −1 from slide 55 to 61
−2 −3 −1 2
x=A-1B = −3 −3 −1 5
−2 −4 −1 −1
−4 − 15 + 1 −18 𝑥 = −18
= −6 − 15 + 1 = −20 𝑦 = −20
−4 − 20 + 1 −23 𝑧 = −23 58
Exercise 7
59