0% found this document useful (0 votes)
16 views

3.1 Solving Small Number of Equation

Uploaded by

faezuddeen14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

3.1 Solving Small Number of Equation

Uploaded by

faezuddeen14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

System of Equations

Solving Small Number of Equations


Instructor

ASSOC. PROF. DR. NORHAYATI ROSLI


Centre for Mathematical Sciences (CSM)
Universiti Malaysia Pahang (UMP)
Expertise: Numerical Methods, Mathematical Modelling
(Deterministic & Stochastic), Probability Theory,
Risk Based Inspection (RBI)
Tel: +609-5492276
Email: norhayati@ump.edu.my
https://psm.ump.edu.my/norhayati
System of Equations
• Introduction to System of Linear Algebraic Equations
• Solving Small Number of Linear Algebraic Equations
✓Graphical Method
✓Cramer’s Rule
• Direct Methods
✓Naïve Gauss Elimination Method
✓Gauss Elimination as LU
• Iterative Methods
✓Jacobi
✓Gauss Seidel
• Nonlinear System Prepared by Norhayati Rosli
Learning Outcomes

By the end of this subtopic, students should be able to:


✓ Transform the system of linear equations into
matrix form.
✓ Solve small numbers of equations by using
graphical method and Cramer’s rule.
Prepared by Norhayati Rosli
Introduction
System is defined as a group of entity or objects, real
or abstract, comprising a whole with each and every
component/element interacting or related to one
another. For example, solar system, blood system
and computer system.

Mathematically, system of linear equations is a


collection of linear equations involving the same
set of variables
Prepared by Norhayati Rosli
Introduction

System of linear
equations is
written as

Prepared by Norhayati Rosli


Introduction
 a11 a12 a1n   x1   b1 
a a22 a2 n   x2  b2 
It can be written in matrix form as  21 =
    
    
 am1 am 2 amn   xn  bn 

 a11 a12 a1n   x1   b1 


a x  b 
a22 a2 n 
where A =  21 , x =  ,
2
b =  2
     
     
 am1 am 2 amn   xn  bn 

Prepared by Norhayati Rosli


Introduction

 a11 a12 a1n b1 


 
 a21 a22 a2 n b2 
In Augmented Matrix  A b  =
 
 
 am1 am 2 amn bn 

Prepared by Norhayati Rosli


Introduction
Solving Small Number of Equations

Cramer’s Rule
2 1 Graphical Method

Two Types
of Methods

Prepared by Norhayati Rosli


Graphical Method
The graphical method is suitable to be applied to a linear algebraic system of two equations.
These equations are plotting on Cartesian Coordinate.
Each equation represents a straight line.
The intersection point provides the solution to the corresponding unknown.
For two equations
a11 x1 + a12 x2 = b 1
a21 x1 + a22 x2 = b 2

Solve both equations for 𝑥2 yields

a  b
x2 = −  11  x1 + 1  x2 = (slope) x1 + intercept
 a12  a12
a  b
x2 = −  21  x1 + 2
 a22  a22

Prepared by Norhayati Rosli


Graphical Method
Example 1
Use the graphical method to solve the following equations
x1 + 2 x2 = 7
−2 x1 + 3 x2 = 7
Solution

Solve both equations for 𝑥2 :

1 7
x2 = − x1 +
2 2
2 7
x2 = x1 +
3 3
Prepared by Norhayati Rosli
Graphical Method
Plot the two equations on Cartesian coordinate using Geogebra.
Go to link https://www.geogebra.org/graphing?lang=en

The solution is given by


the intersection point of
the two lines, 𝑥1 = 1 and
𝑥2 = 3.

Prepared by Norhayati Rosli


Graphical Method
Given the two lines 𝐿1 and 𝐿2 , one and only one of the following may occur:

If 𝐿1 and 𝐿2 intersect at exactly one point, there is a unique solution. The lines cross at
only one point.
If 𝐿1 and 𝐿2 are parallel and coincident, there is an infinitely many solutions.
If 𝐿1 and 𝐿2 are almost parallel, the system is ill-conditioned. The point of intersection
is difficult to detect visually due to the slopes are closed.
If 𝐿1 and 𝐿2 are parallel and distinct, there is no solution.

Prepared by Norhayati Rosli


Graphical Method
Example 2

Determine the nature of the solution for the following system of linear equations
x1 − 3 x2 = 3
3 x1 − 9 x2 = 5

Solution

No solution

Prepared by Norhayati Rosli


Graphical Method
Example 3
Determine the nature of the solution for the following system of linear equations

x1 − 3 x2 = 3
3 x1 − x2 = 9
Solution

Unique solution

Prepared by Norhayati Rosli


Graphical Method
Example 4
Determine the nature of the solution for the following system of linear equations
x1 − 3 x2 = 3
0.35 x1 − x2 = 1.1015

Solution

ill-conditioned

Prepared by Norhayati Rosli


Graphical Method
Example 5
Determine the nature of the solution for the following system of linear equations

x1 − 3 x2 = 3
2 x1 − 6 x2 = 6

Solution

Many solutions

Prepared by Norhayati Rosli


Cramer’s Rule
Definition

Cramer’s rule states that each unknown in a system of linear equations may be expressed as a fraction
of two determinants. The denominator, 𝐷 is a determinant of 𝑨 matrix. The numerator, 𝐷𝑛 is obtained
by replacing the column of the coefficients of the unknown by the vector 𝒃.

Dn
Cramer’s rule formula: xn =
D

Prepared by Norhayati Rosli


Cramer’s Rule
Determinant for small dimension of matrices

1 1 a11 = a11
a11 a12
2 2 = a11a22 − a12 a21
a21 a22
a11 a12 a13
a22 a23 a21 a23 a21 a22
3 3 a21 a22 a23 = a11 − a12 + a13
a32 a33 a31 a33 a31 a32
a31 a32 a33
= a11 (a22 a33 − a23a32 ) − a12 (a21a33 − a23a31 ) + a13 (a21a32 − a22 a31 )

Prepared by Norhayati Rosli


Cramer’s Rule
For 3 × 3 matrices, the Cramer’s rule are:

b1 a12 a13 a11 b1 a13 a11 a12 b1


b2 a22 a23 a21 b2 a23 a21 a22 b2
b3 a32 a33 a31 b3 a33 a31 a32 b3
x1 = , x2 = , x3 =
a11 a12 a13 a11 a12 a13 a11 a12 a13
a21 a22 a23 a21 a22 a23 a21 a22 a23
a31 a32 a33 a31 a32 a33 a31 a32 a33

Prepared by Norhayati Rosli


Cramer’s Rule
Example 5
Given the system of linear equations

x1 + 3x2 − x3 = −8
2 x1 − x2 + 3x3 = 13
3x1 + 2 x2 − x3 = −4
a) Transform the above system into a matrix form of 𝐀𝐱 = 𝐛.
b) Compute 𝑥1 , 𝑥2 and 𝑥3 by using Cramer’s rule.

Solution

a) 1 3 −1  x1   −8
 2 −1 3   x  = 13 
  2  
 3 2 −1  x3   −4 

Prepared by Norhayati Rosli


Cramer’s Rule
Solution (Cont.)

b) Find the determinant of the matrix 𝐀

1 3 −1
−1 3 2 3 2 −1
D = A = 2 −1 3 = (1) −3 + (−1) = 21
2 −1 3 −1 3 2
3 2 −1

Find the determinants of 𝐷1 , 𝐷2 and 𝐷3 by replacing the first, second and third column in 𝐀 with 𝐛.

−8 3 −1
−1 3 13 3 13 −1
D1 = 13 −1 3 = (−8) −3 + (−1) = 21
2 −1 −4 −1 −4 2
−4 2 −1

Prepared by Norhayati Rosli


Cramer’s Rule
Solution (Cont.)

1 −8 −1
13 3 2 3 2 13
D2 = 2 13 3 = (1) − (−8) + (−1) 3 = −42
−4 −1 3 −1 −4 −4
3 −4 −1

1 3 −8
−1 13 2 13 2 −1
D3 = 2 −1 13 = (1) −3 + (−8) = 63
2 −4 3 −4 3 2
3 2 −4

21 −42 63
x1 = = 1, x2 = = −2, x3 = =3
21 21 21

Therefore, 𝑥1 = 1, 𝑥2 = −2, 𝑥3 = 3.
Prepared by Norhayati Rosli
Summary

Graphical method is applicable for system with two equations only.


Cramer’s rule are suitable to solve 3×3 system.
However, the difficulty arise in Cramer’s rule when the dimension of the
matrix is high as one needs to compute the determinant of the matrix.

Prepared by Norhayati Rosli


References

✓ Norhayati Rosli, Nadirah Mohd Nasir, Mohd Zuki Salleh, Rozieana Khairuddin,
Nurfatihah Mohamad Hanafi, Noraziah Adzhar. Numerical Methods, Second
Edition, UMP, 2017.
✓ Chapra, C. S. & Canale, R. P. Numerical Methods for Engineers, Sixth Edition,
McGraw–Hill, 2010.

Prepared by Norhayati Rosli


Thank You!

26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy