0% found this document useful (0 votes)
46 views59 pages

Topic 2 System of Linear Equations

The document discusses linear systems and their solutions. It begins by defining linear equations and distinguishing them from nonlinear equations based on criteria like variables only occurring to the first power. It then discusses linear systems as a set of linear equations and their solutions. The document introduces solving linear systems using augmented matrices and elementary row operations to systematically eliminate variables. It provides examples of setting up augmented matrices and using elementary row operations like multiplication, interchange, and addition of rows to transform the matrix into reduced row echelon form and read the solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views59 pages

Topic 2 System of Linear Equations

The document discusses linear systems and their solutions. It begins by defining linear equations and distinguishing them from nonlinear equations based on criteria like variables only occurring to the first power. It then discusses linear systems as a set of linear equations and their solutions. The document introduces solving linear systems using augmented matrices and elementary row operations to systematically eliminate variables. It provides examples of setting up augmented matrices and using elementary row operations like multiplication, interchange, and addition of rows to transform the matrix into reduced row echelon form and read the solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 59

Topic 2

System of Linear Equations

1
Linear Equations

The equations below are examples of linear


equations.

Criteria of linear equation:


does not involve any products or roots of
variable
all variable occurs only to the first power
Do not appear as arguments for trigonometric,
logarithmic or exponential functions.
2
Non Linear Equations

Example of non linear equations:

3
Exercise 1

Which of the following are linear


equations?

4
Linear systems

A finite set of linear equations in the


variable x1, x2, ……….xn is called a
system of linear equations or a linear
system.
A sequence of numbers s1, s2,….sn is
called a solution of the linear system
if x1 = s1 , x2 = s2 , ….. xn = sn is a
solution of every equation in the
system.
5
Linear systems

Example:
The system

Has the solution


since these values satisfy both
equations.
6
Linear systems

However, not all systems of linear


equations have solutions. For example, if we
multiply the second equation with 2

it becomes evidence that there are no


solutions since the resulting equivalent
system has contradictory equations.

7
Linear systems

A system of equations that has no


solutions is said to be inconsistent; if
there is at least one solution of the
system, it is called consistent.
Every system of linear equation
either has no solutions, one solution
or many solutions

8
Linear systems & Matrix

An arbitrary system The system of linear


of m linear equations equations can be
in n unknowns can be transform into
written as matrices.

.
.
This is called
augmented matrix for
the system
9
Linear systems & Matrix

Example

10
Exercise 2

Find the augmented matrix for each of the


following linear equations systems.
a) b)

c) d)
𝟐
𝒒 − 𝒓 + 𝟏𝟏𝒑 = 𝟏𝟏
𝟑

11
Exercise 3

Find a system of linear equations


corresponding to the augmented matrix
(using x1, x2, x3, … xn).
a) b)

c)

12
Solving the Augmented Matrix

The basic method for solving a system of linear


equations is to replace the given system by a new
system that has the same solution set but which is
easier to solve.
This new system is generally obtained in a series
of steps by applying the following three types of
operations to eliminate unknowns systematically:
multiply an equation through by a non zero
constant
interchange two equations
add a multiple of one equation to another
13
Solving the Augmented Matrix –
Elementary Row Operations (ERO)

Basically, we will transform the elements in


the augmented matrix into one and zero in
order to get the solutions. (Looks like
Identity of the matrix).
Notes:
1. Perform the ERO, column by column
2. Change the element in main diagonal to 1
3. Next, change the other element in the
column to zero.
14
Solving the Augmented Matrix –
Elementary Row Operations (ERO)

Example: Solve the given system


using ERO

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:

The operation must also consider the elements in


other columns in the same row.
Column1 Column2 Column solution

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:

The operation must also consider the elements in


other columns in the same row.
Column1 Column2 Column solution

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:

The operation must also consider the elements in


other columns in the same row.
Column1 Column2 Column solution

19
Solving the Augmented Matrix –
Elementary Row Operations (ERO)

Solution,

20
Solving the Augmented Matrix –
Elementary Row Operations (ERO)

Example: Solve the system using


elementary row operation

21
Solving the Augmented Matrix –
Elementary Row Operations (ERO)

Step 1: convert to augmented matrix


form

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

Solve the following linear equations system


using Elementary Row Operations:
a)

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

3 properties of row-echelon form


Each column that contains a leading 1
has zeros everywhere else.
𝟏 𝟎 𝟎
𝟎 𝟏 𝟎
𝟎 𝟎 𝟏

35
Example of reduced row echelon
form

𝟏 𝟐 𝟎 𝟎 −𝟑 𝟏 𝟎
𝟎 𝟎 𝟏 𝟎 𝟒 −𝟏 𝟎
𝟎 𝟎 𝟎 𝟏 𝟑 −𝟐 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎 𝟎 𝟎

36
Exercise 5

Determine (YES or NO) whether the given matrix


is in row echelon form. If it is, determine (YES or
NO) whether it is also in reduced row-echelon
form.
1. 𝟏 𝟎 𝟐 𝟏 2. 𝟏 −𝟕 𝟓 𝟓 3. 𝟐 𝟒 𝟏
𝟎 𝟏 𝟑 𝟒 𝟎 𝟏 𝟑 𝟐 𝟎 −𝟏 𝟐
𝟎 𝟎 𝟏 𝟎 𝟎 𝟎 𝟎
4. 𝟏 𝟎 𝟎 𝟓 5. 𝟏 𝟐 𝟎 𝟑 𝟎
𝟎 𝟎 𝟏 𝟑 𝟎 𝟎 𝟏 𝟏 𝟎
𝟎 𝟏 𝟎 𝟒 𝟎 𝟎 𝟎 𝟎 𝟏
𝟎 𝟎 𝟎 𝟎 𝟎
37
Solving the Augmented Matrix –
Gaussian Elimination

To solve the augmented matrix using


Gaussian Elimination is to convert the
augmented matrix to row-echelon
form and then do the back
substitution.

38
Solving the Augmented Matrix –
Gaussian Elimination

Example: Solve the given system


using Gaussion 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:

The operation must also consider the elements in


other columns in the same row.
Column1 Column2 Column solution

41
Solving the Augmented Matrix –
Gaussian Elimination
step 4:
change element in column 2, row 2 to 1
Change -3 to 1 using:

The operation must also consider the elements in


other columns in the same row.
Column1 Column2 Column solution

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

Example: Solve the following systems


by Gaussian Elimination
𝟐𝒙𝟏 − 𝟑𝒙𝟐 = −𝟐
𝟐𝒙𝟏 + 𝒙𝟐 = 𝟏
𝟑𝒙𝟏 + 𝟐𝒙𝟐 = 𝟏
Step 1:
2 −3 𝑥 −2 2 −3 −2
1 𝑥 = 1 @
1
2 2 1 ቮ1
2
3 2 1 3 2 1
44
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

Solve the following linear equations


system using Gaussian Elimination.
𝒂) 𝟒𝒙𝟏 − 𝟖𝒙𝟐 = 𝟏𝟐 𝒃) 𝟑𝒙𝟏 + 𝟐𝒙𝟐 − 𝒙𝟑 = −𝟏𝟓
𝟑𝒙𝟏 − 𝟔𝒙𝟐 = 𝟗 𝟓𝒙𝟏 + 𝟑𝒙𝟐 + 𝟐𝒙𝟑 = 𝟎
−𝟐𝒙𝟏 + 𝟒𝒙𝟐 = −𝟔 𝟑𝒙𝟏 + 𝒙𝟐 − 𝟑𝒙𝟑 = 𝟏𝟏
−𝟔𝒙𝟏 − 𝟒𝒙𝟐 + 𝟐𝒙𝟑 = 𝟑𝟎
𝒄) 𝟓𝒙𝟏 − 𝟐𝒙𝟐 + 𝟔𝒙𝟑 = 𝟎
−𝟐𝒙𝟏 + 𝒙𝟐 + 𝟑𝒙𝟑 = 𝟏

51
Solving the Augmented Matrix –
Matrix Inverse

Example: Solve the given system


using 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

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

Solve the following linear equations


system using Matrix Inverse.
𝒂) 𝒑 + 𝟐𝒒 = 𝟏𝟏 𝒃) 𝒙 + 𝒚 + 𝟐𝒛 = 𝟗
𝒒 = 𝟕𝒑 − 𝟑𝒒 + 𝟔 𝟐𝒙 + 𝟒𝒚 − 𝟑𝒛 = 𝟏
𝟑𝒙 + 𝟔𝒚 − 𝟓𝒛 = 𝟎

59

You might also like