Solve the following equations.
𝟐𝒙 + 𝟑𝒚 = 𝟔
𝒙 + 𝟐𝒚 = 𝟐
A𝐧𝐬𝐰𝐞𝐫
𝒙 = 𝟔
&
𝒚 = −𝟐
Methods of Solution of Linear
Equations
Traditional Method Matrix Method
Methods of Solution of Linear
Equations… Continue…
Traditional Method Matrix Method
Row Echelon
Method
Reduce Row
Echelon Method
Get the Upper
Triangle
Get the Identity
Matrix
Methods of Solution of Linear
Equations…Continue…
Row Echelon
Method
Reduce Row
Echelon Method
Get the Upper
Triangle
Get the Identity
Matrix
Gauss Elimination
Method
Gauss Jordan
Method
Derived at AD1850 Derived in AD1880
Why I’m
HappyToday?
Don’t think Jordan was Smarter than
Gauss.!!
Related Field
1.Number Theory,
2. algebra,
3. statistics,
4. analysis,
5. differential geometry,
6. geodesy,
7. geophysics,
8. electrostatics,
9. astronomy,
10. Matrix theory and
11. optics
Related Field
1. geodesy
Methods of Solution of Linear
Equations…Continue…
Now all we need is to construct a matrix from
given problem or set of equations.
This matrix is known as Augmented matrix.
Methods of Solution of Linear
Equations…Continue…
Are you able to get Augmented matrix from set of equations?
2𝑥 + 𝑦 − 𝑧 = 8
−3𝑥 − 𝑦 + 2𝑧 = −11
−2𝑥 + 𝑦 + 2𝑧 = −3
2𝑥 + 𝑦 − 𝑧 = 3
𝑦 + 𝑧 = 10
𝑥 + 2𝑧 = 9
𝑥 − 𝑦 + 2 = 0
𝑦 + 𝑧 = 7
𝑥 + 2𝑧 = 𝑦
2 1 −1
−3 −1 2
−2 1 2
|
|
|
8
−11
−3
2 1 −1
0 1 1
1 0 2
|
|
|
3
10
9
1 −1 0
0 1 1
1 −1 2
|
|
|
−2
7
0
Set of Equations Augmented matrix
Example of Gauss Elimination Method
Ex.1 Solve the following equations by Gauss Elimination or
Backward Substitution.
2𝑦 + 𝑧 = −8
𝑥 − 2𝑦 − 3𝑧 = 0
−𝑥 + 𝑦 + 2𝑧 = 3
Solution:
Augmented Matrix
0 2 1
1 −2 −3
−1 1 2
|
|
|
−8
0
3
Augmented Matrix
0 2 1
1 −2 −3
−1 1 2
|
|
|
−8
0
3
Interchange 𝑅1& 𝑅2
1 −2 −3
0 2 1
−1 1 2
|
|
|
0
−8
3
𝑅3 + 𝑅1
1 −2 −3
0 2 1
0 −1 −1
|
|
|
0
−8
3
Interchange 𝑅2& 𝑅3
1 −2 −3
0 −1 −1
0 2 1
|
|
|
0
3
−8
1 −2 −3
0 −1 −1
0 2 1
|
|
|
0
3
−8
𝑅3 + 𝑅2(2)
1 −2 −3
0 −1 −1
0 0 −1
|
|
|
0
3
−2
Therefore,
𝑥 − 2𝑦 − 3𝑧 = 0 … 1
−𝑦 − 𝑧 = 3 … 2
−𝑧 = −2 ⇒ 𝒛 = 𝟐 … (𝟑)
By using (3) in (2)
−𝑦 − 2 = 3 ⇒ −𝑦 = 5 ⇒ 𝒚 = −𝟓 … (𝟒)
By using (3), (4) in (1)
𝑥 − 2 −5 − 3 2 = 0
⇒ 𝑥 + 10 − 6 = 0
⇒ 𝒙 = −𝟒 … (𝟓)
Thus the solution of given equations
2𝑦 + 𝑧 = −8
𝑥 − 2𝑦 − 3𝑧 = 0
−𝑥 + 𝑦 + 2𝑧 = 3
are
𝒙 = −𝟒,
𝒚 = −𝟓
&
𝒛 = 𝟐
Example of Gauss Jordan Method
Ex.1 Solve the following equations by Gauss Jordan
Method.
2𝑦 + 𝑧 = −8
𝑥 − 2𝑦 − 3𝑧 = 0
−𝑥 + 𝑦 + 2𝑧 = 3
Solution:
Augmented Matrix
0 2 1
1 −2 −3
−1 1 2
|
|
|
−8
0
3
Augmented Matrix
0 2 1
1 −2 −3
−1 1 2
|
|
|
−8
0
3
Interchange 𝑅1& 𝑅2
1 −2 −3
0 2 1
−1 1 2
|
|
|
0
−8
3
𝑅3 + 𝑅1
1 −2 −3
0 2 1
0 −1 −1
|
|
|
0
−8
3
Interchange 𝑅2& 𝑅3
1 −2 −3
0 −1 −1
0 2 1
|
|
|
0
3
−8
1 −2 −3
0 −1 −1
0 2 1
|
|
|
0
3
−8
𝑅3 + 𝑅2(2)
1 −2 −3
0 −1 −1
0 0 −1
|
|
|
0
3
−2
𝑅1 − 𝑅2(2)
1 0 −1
0 −1 −1
0 0 −1
|
|
|
−6
3
−2
𝑅2 − 𝑅3 & 𝑅1 − 𝑅3
1 0 0
0 −1 0
0 0 −1
|
|
|
−4
5
−2
Therefore, 𝒙 = −𝟒, 𝒚 = −𝟓 & 𝒛 = 𝟐
Thus the solution of given equations
2𝑦 + 𝑧 = −8
𝑥 − 2𝑦 − 3𝑧 = 0
−𝑥 + 𝑦 + 2𝑧 = 3
are
𝒙 = −𝟒,
𝒚 = −𝟓
&
𝒛 = 𝟐
1 0 0
0 −1 0
0 0 −1
|
|
|
−4
5
−2
Multiply 𝑅2 & 𝑅3 both by (−1)
1 0 0
0 1 0
0 0 1
|
|
|
−4
−5
2
Which Method is Better for solution
purpose?
Why?
Traditional
or
Gaussian Elimination Method
Gauss Jordan Method
or
Can we extend these methods one
step ahead?
RocketVelocity
The upward velocity of a rocket is
given at three different times
The velocity data is approximated by a polynomial as:
Find: The Velocity at 𝑡 = 5,7, 7.5 and 8 seconds.
𝒗 𝒕 = 𝒂𝒕 𝟐 + 𝒃𝒕 + 𝒄 , 𝟐 ≤ 𝒕 ≤ 𝟖
Problem: Given is not linear equation.
Question: Can we treat it as a linear?
Let me Help you,…
𝒗 𝒕 = 𝒂𝒕 𝟐
+ 𝒃𝒕 + 𝒄 , 𝟐 ≤ 𝒕 ≤ 𝟖
In this equation 𝑣 𝑡 = 𝑎𝑡2
+ 𝑏𝑡 + 𝑐 … 1 ; 𝑡 & 𝑣 are given so
don’t worry about it. Time (𝑡)
In second (unit)
Velocity (𝑣)
In
𝐾.𝑚.
𝑠𝑒𝑐𝑜𝑛𝑑
(unit)
𝑡1 = 2 𝑣1 = 1
𝑡2 = 4 𝑣2 = 2
𝑡3 = 6 𝑣3 = 4
So, from 1st equation we have
𝑣1 = 𝑎𝑡1
2
+ 𝑏𝑡1 + 𝑐 … 2
𝑣2 = 𝑎𝑡2
2
+ 𝑏𝑡2 + 𝑐 … 3
𝑣3 = 𝑎𝑡3
2
+ 𝑏𝑡3 + 𝑐 … 4
Do you think equations 2′
, 3′
& 4′
are linear equations?
1 = 4𝑎 + 2𝑏 + 𝑐 … 2′
2 = 16𝑎 + 4𝑏 + 𝑐 … 3′
4 = 36𝑎 + 6𝑏 + 𝑐 … 4′
WillYou Generate Matrix from this…?
4 2 1
16 4 1
36 6 1
|
|
|
1
2
4
Have you got this…!
Okay, then solve…
Answer is 𝒂 = 𝟎. 𝟏𝟐𝟓
𝒃 = −𝟎. 𝟐𝟓𝟎
𝒄 = 𝟏. 𝟎𝟎𝟎
1 = 4𝑎 + 2𝑏 + 𝑐 … 2′
2 = 16𝑎 + 4𝑏 + 𝑐 … 3′
4 = 36𝑎 + 6𝑏 + 𝑐 … 4′
From the above values 𝑎 = 0.125
𝑏 = −0.250
𝑐 = 1.000
& equation_(1) 𝑣 𝑡 = 𝑎𝑡2 + 𝑏𝑡 + 𝑐
we have
𝒗 𝒕 = 𝟎. 𝟏𝟐𝟓𝒕 𝟐
− 𝟎. 𝟐𝟓𝒕 + 𝟏 … 𝟓
Equation_(5) Shows the Rocket Velocity equation in the time interval
of [2 8] seconds.
Now can you answer for these:
Find The Velocity at 𝑡 = 5,7, 7.5 and 8 seconds.
From equation_(5) 𝑣 𝑡 = 0.125𝒕2 − 0.25𝒕 + 1
Put 𝑡 = 5 ⇒ 𝑣 5 = 0.125 × 𝟓2
− 0.25 × 𝟓 + 1 ⇒ 𝒗 𝟓 = 𝟐. 𝟖𝟕𝟓
𝒌𝒎
𝒔
𝑡 = 7 ⇒ 𝑣 7 = 0.125 × 𝟕2
− 0.25 × 𝟕 + 1 ⇒ 𝒗 𝟕 = 𝟓. 𝟑𝟕𝟓
𝒌𝒎
𝒔
𝑡 = 7.5 ⇒ 𝑣 7.5 = 0.125 × 𝟕. 𝟓2 − 0.25 × 𝟕. 𝟓 + 1 ⇒ 𝒗 𝟕. 𝟓 = 𝟔. 𝟏𝟓𝟔
𝒌𝒎
𝒔
𝑡 = 8 ⇒ 𝑣 8 = 0.125 × 𝟖2 − 0.25 × 𝟖 + 1 ⇒ 𝒗 𝟖 = 𝟕. 𝟎𝟎
𝒌𝒎
Would you balance the following
chemical reactions for me?
𝐶𝐻4 + 𝑂2 → 𝐶𝑂2 + 𝐻2 𝑂
𝑁𝑎𝐻𝐶𝑂3 + 𝐻2 𝑆𝑂4 → 𝑁𝑎2 𝑆𝑂4 + 𝐶𝑂2 + 𝐻2 𝑂
𝑍𝑛(𝐶2 𝐻3 𝑂2)2+𝐻𝐵𝑟 → 𝑍𝑛𝐵𝑟2 + 𝐻𝐶2 𝐻3 𝑂2
𝐻2 + 𝑂2 → 2𝐻2 𝑂
Can We Generate Matrix for each
reaction?
We will see in next lecture…
IfYes then “HOW???”
Think & Come with pre-reading
What will be in next Lecture?
Can we solve Gauss Elimination &
Gauss Jordan Method in Mat-lab?
We will see in coming Lab.
IfYes then “How???”
Think & Come with pre-reading
For Lab. …
Gauss elimination & Gauss Jordan method

Gauss elimination & Gauss Jordan method

  • 3.
    Solve the followingequations. 𝟐𝒙 + 𝟑𝒚 = 𝟔 𝒙 + 𝟐𝒚 = 𝟐 A𝐧𝐬𝐰𝐞𝐫 𝒙 = 𝟔 & 𝒚 = −𝟐
  • 4.
    Methods of Solutionof Linear Equations Traditional Method Matrix Method
  • 5.
    Methods of Solutionof Linear Equations… Continue… Traditional Method Matrix Method Row Echelon Method Reduce Row Echelon Method Get the Upper Triangle Get the Identity Matrix
  • 6.
    Methods of Solutionof Linear Equations…Continue… Row Echelon Method Reduce Row Echelon Method Get the Upper Triangle Get the Identity Matrix Gauss Elimination Method Gauss Jordan Method Derived at AD1850 Derived in AD1880 Why I’m HappyToday?
  • 7.
    Don’t think Jordanwas Smarter than Gauss.!! Related Field 1.Number Theory, 2. algebra, 3. statistics, 4. analysis, 5. differential geometry, 6. geodesy, 7. geophysics, 8. electrostatics, 9. astronomy, 10. Matrix theory and 11. optics Related Field 1. geodesy
  • 8.
    Methods of Solutionof Linear Equations…Continue… Now all we need is to construct a matrix from given problem or set of equations. This matrix is known as Augmented matrix.
  • 9.
    Methods of Solutionof Linear Equations…Continue… Are you able to get Augmented matrix from set of equations? 2𝑥 + 𝑦 − 𝑧 = 8 −3𝑥 − 𝑦 + 2𝑧 = −11 −2𝑥 + 𝑦 + 2𝑧 = −3 2𝑥 + 𝑦 − 𝑧 = 3 𝑦 + 𝑧 = 10 𝑥 + 2𝑧 = 9 𝑥 − 𝑦 + 2 = 0 𝑦 + 𝑧 = 7 𝑥 + 2𝑧 = 𝑦 2 1 −1 −3 −1 2 −2 1 2 | | | 8 −11 −3 2 1 −1 0 1 1 1 0 2 | | | 3 10 9 1 −1 0 0 1 1 1 −1 2 | | | −2 7 0 Set of Equations Augmented matrix
  • 10.
    Example of GaussElimination Method Ex.1 Solve the following equations by Gauss Elimination or Backward Substitution. 2𝑦 + 𝑧 = −8 𝑥 − 2𝑦 − 3𝑧 = 0 −𝑥 + 𝑦 + 2𝑧 = 3 Solution: Augmented Matrix 0 2 1 1 −2 −3 −1 1 2 | | | −8 0 3
  • 11.
    Augmented Matrix 0 21 1 −2 −3 −1 1 2 | | | −8 0 3 Interchange 𝑅1& 𝑅2 1 −2 −3 0 2 1 −1 1 2 | | | 0 −8 3 𝑅3 + 𝑅1 1 −2 −3 0 2 1 0 −1 −1 | | | 0 −8 3 Interchange 𝑅2& 𝑅3 1 −2 −3 0 −1 −1 0 2 1 | | | 0 3 −8
  • 12.
    1 −2 −3 0−1 −1 0 2 1 | | | 0 3 −8 𝑅3 + 𝑅2(2) 1 −2 −3 0 −1 −1 0 0 −1 | | | 0 3 −2 Therefore, 𝑥 − 2𝑦 − 3𝑧 = 0 … 1 −𝑦 − 𝑧 = 3 … 2 −𝑧 = −2 ⇒ 𝒛 = 𝟐 … (𝟑) By using (3) in (2) −𝑦 − 2 = 3 ⇒ −𝑦 = 5 ⇒ 𝒚 = −𝟓 … (𝟒) By using (3), (4) in (1) 𝑥 − 2 −5 − 3 2 = 0 ⇒ 𝑥 + 10 − 6 = 0 ⇒ 𝒙 = −𝟒 … (𝟓)
  • 13.
    Thus the solutionof given equations 2𝑦 + 𝑧 = −8 𝑥 − 2𝑦 − 3𝑧 = 0 −𝑥 + 𝑦 + 2𝑧 = 3 are 𝒙 = −𝟒, 𝒚 = −𝟓 & 𝒛 = 𝟐
  • 14.
    Example of GaussJordan Method Ex.1 Solve the following equations by Gauss Jordan Method. 2𝑦 + 𝑧 = −8 𝑥 − 2𝑦 − 3𝑧 = 0 −𝑥 + 𝑦 + 2𝑧 = 3 Solution: Augmented Matrix 0 2 1 1 −2 −3 −1 1 2 | | | −8 0 3
  • 15.
    Augmented Matrix 0 21 1 −2 −3 −1 1 2 | | | −8 0 3 Interchange 𝑅1& 𝑅2 1 −2 −3 0 2 1 −1 1 2 | | | 0 −8 3 𝑅3 + 𝑅1 1 −2 −3 0 2 1 0 −1 −1 | | | 0 −8 3 Interchange 𝑅2& 𝑅3 1 −2 −3 0 −1 −1 0 2 1 | | | 0 3 −8
  • 16.
    1 −2 −3 0−1 −1 0 2 1 | | | 0 3 −8 𝑅3 + 𝑅2(2) 1 −2 −3 0 −1 −1 0 0 −1 | | | 0 3 −2 𝑅1 − 𝑅2(2) 1 0 −1 0 −1 −1 0 0 −1 | | | −6 3 −2 𝑅2 − 𝑅3 & 𝑅1 − 𝑅3 1 0 0 0 −1 0 0 0 −1 | | | −4 5 −2
  • 17.
    Therefore, 𝒙 =−𝟒, 𝒚 = −𝟓 & 𝒛 = 𝟐 Thus the solution of given equations 2𝑦 + 𝑧 = −8 𝑥 − 2𝑦 − 3𝑧 = 0 −𝑥 + 𝑦 + 2𝑧 = 3 are 𝒙 = −𝟒, 𝒚 = −𝟓 & 𝒛 = 𝟐 1 0 0 0 −1 0 0 0 −1 | | | −4 5 −2 Multiply 𝑅2 & 𝑅3 both by (−1) 1 0 0 0 1 0 0 0 1 | | | −4 −5 2
  • 18.
    Which Method isBetter for solution purpose? Why? Traditional or Gaussian Elimination Method Gauss Jordan Method or
  • 19.
    Can we extendthese methods one step ahead? RocketVelocity The upward velocity of a rocket is given at three different times The velocity data is approximated by a polynomial as: Find: The Velocity at 𝑡 = 5,7, 7.5 and 8 seconds. 𝒗 𝒕 = 𝒂𝒕 𝟐 + 𝒃𝒕 + 𝒄 , 𝟐 ≤ 𝒕 ≤ 𝟖
  • 20.
    Problem: Given isnot linear equation. Question: Can we treat it as a linear?
  • 21.
    Let me Helpyou,… 𝒗 𝒕 = 𝒂𝒕 𝟐 + 𝒃𝒕 + 𝒄 , 𝟐 ≤ 𝒕 ≤ 𝟖 In this equation 𝑣 𝑡 = 𝑎𝑡2 + 𝑏𝑡 + 𝑐 … 1 ; 𝑡 & 𝑣 are given so don’t worry about it. Time (𝑡) In second (unit) Velocity (𝑣) In 𝐾.𝑚. 𝑠𝑒𝑐𝑜𝑛𝑑 (unit) 𝑡1 = 2 𝑣1 = 1 𝑡2 = 4 𝑣2 = 2 𝑡3 = 6 𝑣3 = 4 So, from 1st equation we have 𝑣1 = 𝑎𝑡1 2 + 𝑏𝑡1 + 𝑐 … 2 𝑣2 = 𝑎𝑡2 2 + 𝑏𝑡2 + 𝑐 … 3 𝑣3 = 𝑎𝑡3 2 + 𝑏𝑡3 + 𝑐 … 4 Do you think equations 2′ , 3′ & 4′ are linear equations? 1 = 4𝑎 + 2𝑏 + 𝑐 … 2′ 2 = 16𝑎 + 4𝑏 + 𝑐 … 3′ 4 = 36𝑎 + 6𝑏 + 𝑐 … 4′
  • 22.
    WillYou Generate Matrixfrom this…? 4 2 1 16 4 1 36 6 1 | | | 1 2 4 Have you got this…! Okay, then solve… Answer is 𝒂 = 𝟎. 𝟏𝟐𝟓 𝒃 = −𝟎. 𝟐𝟓𝟎 𝒄 = 𝟏. 𝟎𝟎𝟎 1 = 4𝑎 + 2𝑏 + 𝑐 … 2′ 2 = 16𝑎 + 4𝑏 + 𝑐 … 3′ 4 = 36𝑎 + 6𝑏 + 𝑐 … 4′
  • 23.
    From the abovevalues 𝑎 = 0.125 𝑏 = −0.250 𝑐 = 1.000 & equation_(1) 𝑣 𝑡 = 𝑎𝑡2 + 𝑏𝑡 + 𝑐 we have 𝒗 𝒕 = 𝟎. 𝟏𝟐𝟓𝒕 𝟐 − 𝟎. 𝟐𝟓𝒕 + 𝟏 … 𝟓 Equation_(5) Shows the Rocket Velocity equation in the time interval of [2 8] seconds. Now can you answer for these: Find The Velocity at 𝑡 = 5,7, 7.5 and 8 seconds. From equation_(5) 𝑣 𝑡 = 0.125𝒕2 − 0.25𝒕 + 1 Put 𝑡 = 5 ⇒ 𝑣 5 = 0.125 × 𝟓2 − 0.25 × 𝟓 + 1 ⇒ 𝒗 𝟓 = 𝟐. 𝟖𝟕𝟓 𝒌𝒎 𝒔 𝑡 = 7 ⇒ 𝑣 7 = 0.125 × 𝟕2 − 0.25 × 𝟕 + 1 ⇒ 𝒗 𝟕 = 𝟓. 𝟑𝟕𝟓 𝒌𝒎 𝒔 𝑡 = 7.5 ⇒ 𝑣 7.5 = 0.125 × 𝟕. 𝟓2 − 0.25 × 𝟕. 𝟓 + 1 ⇒ 𝒗 𝟕. 𝟓 = 𝟔. 𝟏𝟓𝟔 𝒌𝒎 𝒔 𝑡 = 8 ⇒ 𝑣 8 = 0.125 × 𝟖2 − 0.25 × 𝟖 + 1 ⇒ 𝒗 𝟖 = 𝟕. 𝟎𝟎 𝒌𝒎
  • 24.
    Would you balancethe following chemical reactions for me? 𝐶𝐻4 + 𝑂2 → 𝐶𝑂2 + 𝐻2 𝑂 𝑁𝑎𝐻𝐶𝑂3 + 𝐻2 𝑆𝑂4 → 𝑁𝑎2 𝑆𝑂4 + 𝐶𝑂2 + 𝐻2 𝑂 𝑍𝑛(𝐶2 𝐻3 𝑂2)2+𝐻𝐵𝑟 → 𝑍𝑛𝐵𝑟2 + 𝐻𝐶2 𝐻3 𝑂2 𝐻2 + 𝑂2 → 2𝐻2 𝑂
  • 25.
    Can We GenerateMatrix for each reaction? We will see in next lecture… IfYes then “HOW???” Think & Come with pre-reading What will be in next Lecture?
  • 26.
    Can we solveGauss Elimination & Gauss Jordan Method in Mat-lab? We will see in coming Lab. IfYes then “How???” Think & Come with pre-reading For Lab. …