Lesson 3.1
Lesson 3.1
Presented by Engr. Romulo C. Cruz, Jr. Electrical Engineering Department College of Engineering & Architecture
SYSTEM OF LINEAR EQUATIONS
Presented by Engr. Romulo C. Cruz, Jr. Electrical Engineering Department College of Engineering & Architecture
SUBSTITUTION METHOD
works by expressing one unknown in terms of the other unknowns, then substituting
this expression into the other equations; the process continues until the last expression
solves one of the unknown variables when substituted to the remaining equation
Presented by Engr. Romulo C. Cruz, Jr. Electrical Engineering Department College of Engineering & Architecture
EXAMPLE PROBLEM 1
Solve by substitution method:
3𝑥1 − 𝑥2 + 2𝑥3 = 151
−2𝑥1 − 2𝑥2 + 𝑥3 = 12
𝑥1 + 4𝑥2 − 𝑥3 = 16
SOLUTION:
From the first equation,
𝑥2 = 3𝑥1 +2𝑥3 − 151
SOLUTION…
This gives
620−13𝑥1
𝑥3 =
7
SOLUTION…
From equation 2.1 :
8𝑥1 + 3𝑥3 = 290
620−13𝑥1
8𝑥1 + 3 = 290
7
17 170
𝑥 =
7 1 7
𝒙𝟏 = 10
EXAMPLE PROBLEM 1
SOLUTION…
From equation 3.1 :
620−13(10)
𝑥3 =
7
𝒙𝟑 = 70
Substitute 𝑥1 and 𝑥3 into the first equation
𝑥2 = 3𝑥1 +2𝑥3 − 151 = 3 10 + 2 70 − 151
𝒙𝟐 = 19
ELIMINATION METHOD
works by adding or subtracting two equations to eliminate one unknown and reduce
the number of equations by 1; the process continues until only two equations remain so
that one of the unknowns can be eliminated and the other one determined by adding
or subtracting the remaining equations.
EXAMPLE PROBLEM 2
SOLUTION:
Eliminate first 𝑥3 by multiplying the third equation by (2) then adding the result to the first equation.
EXAMPLE PROBLEM 2
SOLUTION…
3𝑥1 − 𝑥2 + 2𝑥3 = 151 first equation
2𝑥1 + 8𝑥2 − 2𝑥3 = 32 third equation x (2)
5𝑥1 + 7𝑥2 = 183 equation 1.1
SOLUTION…
𝑥1 can now be eliminated by multiplying equation 2.1 by (5), then adding the result to equation 1.1. Here,
the value of 𝑥2 will be solved:
5𝑥1 + 7𝑥2 = 183 equation 1.1
−5𝑥1 + 10𝑥2 = 140 equation 2.1 x (5)
17𝑥2 = 323
𝟑𝟐𝟑
𝒙𝟐 = = 𝟏𝟗
𝟏𝟕
EXAMPLE PROBLEM 2
SOLUTION…
To eliminate 𝑥2 and determine 𝑥1 , multiply equation 1.1 by (2) and subtract by the product of equation
2.1 and (7):
10𝑥1 + 14𝑥2 = 366 equation 1.1 x (2)
−7𝑥1 + 14𝑥2 = 196 equation 2.1 x (7)
17𝑥1 = 170
𝟏𝟕𝟎
𝒙𝟏 = = 𝟏𝟎
𝟏𝟕
EXAMPLE PROBLEM 2
SOLUTION…
To determine 𝑥3 , eliminate 𝑥1 from the three equations. Multiply the third equation by (3), then subtract
the result from the first equation:
3𝑥1 − 𝑥2 + 2𝑥3 = 151 equation 1
3𝑥1 + 12𝑥2 − 3𝑥3 = 48 equation 3 x (3)
−13𝑥2 + 5𝑥3 = 103 equation 1.2
Multiply the third equation by (2), then add the result to the second equation:
EXAMPLE PROBLEM 2
SOLUTION…
−2𝑥1 − 2𝑥2 + 𝑥3 = 12 equation 2
2𝑥1 + 8𝑥2 − 2𝑥3 = 32 equation 3 x (2)
6𝑥2 − 𝑥3 = 44 equation 2.2
Eliminate 𝑥2 from equations 1.2 and 2.2; multiply equation 1.2 by (6), and equation 2.2 by (13) then add
the results:
EXAMPLE PROBLEM 2
SOLUTION…
−78𝑥2 + 30𝑥3 = 618 equation 1.2 x (6)
78𝑥2 − 13𝑥3 = 572 equation 2.2 x (13)
17𝑥3 = 1190
𝟏𝟏𝟗𝟎
𝒙𝟑 = = 𝟕𝟎
𝟏𝟕
CRAMER’S RULE
Cramer
photo credits: Wikipedia, the free encyclopedia
CRAMER’S RULE
Consider the system of linear equations
𝑎11 𝑥1 + 𝑎12 𝑥2 +…+ 𝑎1𝑛 𝑥𝑛 = 𝑐1
𝑎21 𝑥1 + 𝑎22 𝑥2 +…+ 𝑎2𝑛 𝑥𝑛 = 𝑐2
⋮
𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 +…+ 𝑎𝑛𝑛 𝑥𝑛 = 𝑐𝑛
𝑥1
𝑥2
𝑥= = 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝑢𝑛𝑘𝑛𝑜𝑤𝑛𝑠
⋮
𝑥𝑛
𝑐1
𝑐
𝑐= 2 = 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠
⋮
𝑐𝑛
CRAMER’S RULE
In symbols:
𝑨𝒙 = 𝒄
𝒅𝒆𝒕 𝑨𝒌
𝒙𝒌 =
𝒅𝒆𝒕 𝑨
where: 𝐴𝑘 = matrix formed by replacing the kth column of A by the column vector c
det (A) = determinant of A = |A|
det (Ak) = determinant of Ak = |Ak|
DETERMINANT OF A MATRIX
𝑎 𝑏
For a 2x2 matrix 𝐴 = ,
𝑐 𝑑
det (A) = ad – bc
𝑎 𝑏 𝑐
For a 3x3 matrix 𝐴 = 𝑑 𝑒 𝑓 ,
𝑔 ℎ 𝑖
NOTE: Multiply a by the determinant of the 2x2 matrix that is not in the row and column of a; the same
applies for b and c.
EXAMPLE PROBLEM 3
SOLUTION:
By Cramer’s Rule
𝒅𝒆𝒕 𝑨𝟏 |𝑨𝟏 |
𝒙𝟏 = =
𝒅𝒆𝒕 𝑨 |𝑨|
EXAMPLE PROBLEM 3
SOLUTION…
151 −1 2
𝐴1 = 12 −2 1
16 4 −1
= 151 −2 −1 − 1 4 − (−1) 12 −1 − 1 16 + 2 12 4 − −2 16
= 3 −2 −1 − 1 4 − (−1) −2 −1 − 1 1 + 2 −2 4 − −2 1
𝐴 = −6 + 1 − 12 = −17
Therefore,
−𝟏𝟕𝟎
𝒙𝟏 = = 𝟏𝟎
−𝟏𝟕
EXAMPLE PROBLEM 3
SOLUTION…
|𝑨𝟐 |
𝒙𝟐 =
|𝑨|
3 151 2
𝐴2 = −2 12 1
1 16 −1
= 3 12 −1 − 1 16 − 151 −2 −1 − 1 1 + 2 −2 16 − 12 1
Therefore, −𝟑𝟐𝟑
𝒙𝟐 = = 𝟏𝟗
−𝟏𝟕
EXAMPLE PROBLEM 3
SOLUTION…
|𝑨𝟑 |
𝒙𝟑 =
|𝑨|
3 −1 151
𝐴3 = −2 −2 12
1 4 16
= 3 −2 16 − 12 4 − (−1) −2 16 − 12 1 + 151 −2 4 − −2 1
𝐴3 = −240 − 44 − 906 = −1190
Therefore, −𝟏𝟏𝟗𝟎
𝒙𝟑 = = 𝟕𝟎
−𝟏𝟕
GAUSS ELIMINATION METHOD
The system of linear equations
𝑎11 𝑥1 + 𝑎12 𝑥2 +…+ 𝑎1𝑛 𝑥𝑛 = 𝑐1
𝑎21 𝑥1 + 𝑎22 𝑥2 +…+ 𝑎2𝑛 𝑥𝑛 = 𝑐2
⋮
𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 +…+ 𝑎𝑛𝑛 𝑥𝑛 = 𝑐𝑛
𝐴𝑥 = 𝑐
GAUSS ELIMINATION METHOD
The augmented matrix of the system is
𝑎11 𝑎12 … 𝑎1𝑛 𝑐1
𝑎21 𝑎22 … 𝑎2𝑛 𝑐2
𝐴ሚ = 𝐴 𝑐 =
⋮ ⋮ ⋮ ⋮
𝑎𝑛1 𝑎𝑛2 … 𝑎𝑛𝑛 𝑐𝑛
2. After eliminating 𝑥1 from the second row down to the last row, the second row (which no
longer contains 𝑥1 ) becomes the new pivot row; 𝑥2 is to be eliminated from the third row
down to the last row by adding suitable multiples of the second row to the third row up to the
last row.
NOTE: The element 𝑎22 is the new pivot; the first and second rows are left unaltered.
GAUSS ELIMINATION METHOD
ALGORITHM:
3. This process is to be repeated until the augmented matrix is transformed into an upper triangular
matrix. The unknowns can then be solved by backward substitution.
NOTE: The pivot 𝑎𝑘𝑘 must not be zero and should be large in absolute value* to avoid round-off
magnification** by the multiplication in the elimination.
NOTE: Forward substitution can be used if the augmented matrix is transformed into a lower triangular
matrix.
EXAMPLE PROBLEM 4
Solve the system as shown by Gauss Elimination Method
6𝑥2 + 13𝑥3 = 137.86
6𝑥1 − 8𝑥3 = −85.88
13𝑥1 − 8𝑥2 = 178.54
SOLUTION:
Since equation 1 has no 𝑥1 term, and equation 3 has the largest coefficient in column 1, interchange
equations 3 and 1:
EXAMPLE PROBLEM 4
SOLUTION…
The augmented matrix is
Pivot row 13 −8 0 178.54 R1 = r1
6 0 −8 −85.88 R2 = r2 – (6/13) (r1)
0 6 13 137.86 R3 = r3
SOLUTION…
The new matrix is
13 −8 0 178.54 R1 = r1
48
New pivot row 0 −8 −168.28 R2 = r2
13
0 6 13 137.86 R3 = r3 – (13/8) (r2)
26𝑥3 = 411.32
The unknowns can now be solved by backward substitution (i.e. starting from the last equation going up):
26𝑥3 411.32
=
26 26
𝒙𝟑 = 𝟏𝟓. 𝟖𝟐
EXAMPLE PROBLEM 4
SOLUTION…
Substitute the value of 𝑥3 into the second equation:
48
𝑥 − 8𝑥3 = −168.28
13 2
48
𝑥 = 8𝑥3 − 168.28 = 8 15.82 − 168.28 = −41.72
13 2
41.72
𝑥2 = − 48
13
𝒙𝟐 = −𝟏𝟏. 𝟑𝟎
EXAMPLE PROBLEM 4
SOLUTION…
Substitute the value of 𝑥2 into the first equation:
13𝑥1 − 8𝑥2 = 178.54
13𝑥1 = 8𝑥2 + 178.54 = 8 −11.30 + 178.54 = 88.14
88.14
𝑥1 =
13
𝒙𝟏 = 𝟔. 𝟕𝟖
EXAMPLE PROBLEM 4
ANOTHER SOLUTION:
The augmented matrix may also be transformed into a lower triangular matrix. Since equation 1 has the
largest 𝑥3 term, we interchange equations 1 and 3:
6𝑥2 + 13𝑥3 = 137.86
6𝑥1 − 8𝑥3 = −85.88
13𝑥1 − 8𝑥2 = 178.54
ANOTHER SOLUTION…
The augmented matrix in this case is
13 −8 0 178.54 R1 = r1
6 0 −8 −85.88 R2 = r2 + 8/13 (r3)
Pivot row 0 6 13 137.86 R3 = r3
26 0 0 176.29
48
6 0 −1.04
13
0 6 13 137.86
ANOTHER SOLUTION…
The unknowns can now be solved by forward substitution (i.e. starting from the first equation going
down):
26𝑥1 = 176.29
26𝑥1 176.29
=
26 26
𝒙𝟏 = 𝟔. 𝟕𝟖
EXAMPLE PROBLEM 4
ANOTHER SOLUTION…
Substitute 𝑥1 into the second equation:
48
6𝑥1 + 𝑥 = −1.04
13 2
48
𝑥 = −1.04 − 6𝑥1 = −1.04 − 6 6.78 = −41.72
13 2
41.72
𝑥2 = − 48
13
𝒙𝟐 = −𝟏𝟏. 𝟑𝟎
EXAMPLE PROBLEM 4
ANOTHER SOLUTION…
Substitute 𝑥2 into the second equation:
6𝑥2 + 13𝑥3 = 137.86
13𝑥3 = 137.86 − 6𝑥2 = 137.86 − 6 −11.30 = 205.66
13𝑥3 205.66
=
13 13
𝒙𝟑 = 𝟏𝟓. 𝟖𝟐