SlideShare a Scribd company logo
1 of 32
Sulaiman M. KARIM
man_musaria@yahoo.com
Solving Linear Equation System
Outline
 Introduction
 Doolittle-crout method
 Cholesky method
Introduction
A linear equation in one unknown is an equation of the form
a x = b, where a and b are constants and x is an unknown that
we wish to solve for. Similarly, a linear equation in n unknowns
x1, x2, …, xn is an equation of the form: a1 · x1 + a2 · x2 + … +
an · xn = b, where a1, a2, …, an and b are constants. The name
linear comes from the fact that such an equation in two
unknowns or variables represents a straight line. A set of such
equations is called a system of linear equations.
In mathematics, a system of linear equations is a collection
of two or more linear equations with the same set of
variables in all the equations.
Some types of linear equation system:
 Elimination method
 Gauss elimination
 Gauss elimination with partial pivoting
 Iteration method
 Jacobi
 Gauss-seidel
 LU factorization/decomposition method
 Doolittle
 Crout
 Cholesky
 Thomas method
 Thomas algorithm
LU factorization/decomposition method
For a linear system
Ax = b
Use substitution of A = LU, where L is a
lower triangle
matrix, and U is upper triangular matrix.
LUx = b
Let
Ux = Y
Yields
LY = b
*There are a different between Doolittle, crout and Cholesky
method:
If [L] has ones on its diagonal, then you've done a Doolittle factorization.
If [U] has ones on its diagonal, then you've done a Crout factorization.
If [L] is the transpose of U, then you've done a Cholesky factorization.
[A] [L] [U]
[A] [L] [U]
Example one-Doolittle method
Doolittle’s Method LU factorization of A when the diagonal elements of lower
triangular matrix, L have a unit value.
x₁ + x₂ + x₃ =5
x ₁ + 2x₂ +2x₃ =6
x ₁ + 2x₂ +3x₃ =8
Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes
the variable vectors and B are the constants
1 1
1
1 2
2
1 2
3
A =
X ₁
X ₂
X ₃
X =
5
6
8
B=
Step2: Let A = LU, where L is the lower triangular matrix and U is the upper
triangular matrix assume that the diagonal entries L is equal to 1
Let A=LU
1 1
1
1 2
2
1 2
3
=
1 0
0
a 1
0
b c
1
d e
f
0 g
h
0 0
i
d e f
ad ae + g af
+ h
bd be + cg bf +
ch + i
=
*Find the values e=1d=
1
f=1
ad=1 Ae+g=2 Af+h=2
a=1 g=1 h=1bd=1
be+cg=2 Bf+ch+i=3 i=1b=1
c=1
1 1
1
1 2
2
1 2
3
Step3: Let Ly = B, solve for y’s
Y₁ =5
Y₁ +Y₂ =6
Y₁ + Y₂ + Y₃ =8
Y₁ =5, Y₂ =1, Y₃ =2
Let Ly=B
1 0
0
1 1
0
1 1
1
Y ₁
Y ₂
Y ₃
5
6
8
=
Step3: Let Ux = y, solve for the variable vectors x
X₃ =2
X₂ +X₃ =1
X₁ +X₂ +X₃ =5
X₁ =4, X₂ =-1, X₃ =2
X=
Let Ux=y
X ₁
X ₂
X ₃
5
1
2
=
4
-
1
2
1 1
1
0 1
1
0 0
1
Example two-Doolittle method
2x - y - 2z = -1
-4x + 6y +3z =13
-4x - 2y +8z = -6
Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes
the variable vectors and B are the constants
2 -1
-2
-4 6
3
-4 -2
8
A =
X
Y
Z
X =
-1
1
3
-6
B=
Step2: Let A = LU, where L is the lower triangular matrix and U is the upper
triangular matrix assume that the diagonal entries L is equal to 1
Let A=LU =
1 0
0
a 1
0
b c
1
d e
f
0 g
h
0 0
i
d e f
ad ae + g af
+ h
bd be + cg bf +
ch + i
=
*Find the values e= -1d=
2
f=-2
ad= -4 Ae+g=6 Af+h=3
a= -2 g=4 h= -1bd= -4
be+cg= -2 Bf+ch+i=8 i=3b= -2
c= -1
2 -1
-2
-4 6
3
-4 -2
8
2 -1
-2
-4 6
3
-4 -2
8
Step3: Let Ly = B, solve for y’s
Y₁ = -1, Y₂ =11, Y₃ =3
Let Ly=B
1 0
0
-2 1
0
-2 -1
1
Y ₁
Y ₂
Y ₃
-1
1
3
-6
=
Step4: Let Ux = y, solve for the variable vectors x
X₁ =2, X₂ =3, X₃ =1
X=
Let Ux=y
2 -1
2
0 4
-1
0 0
3
X ₁
X ₂
X ₃
-1
1
1
3
=
2
3
1
Example three-Crout method
5x₁ + 4x₂ + x₃ =3.4
10x ₁ + 9x₂ +4x₃ =8.8
10x ₁ + 13x₂ +15x₃ =19.2
Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes
the variable vectors and B are the constants
5 4
1
10 9
4
10 13
15
A =
X ₁
X ₂
X ₃
X =
3.4
8.8
19.
2
B=
Step2: Let A = LU, where L is the lower triangular matrix and U is the upper
triangular matrix assume that the diagonal entries U is equal to 1
Let A=LU =
a 0
0
b c
0
d e
f
1 g
h
0 1
i
0 0
1
a ag
ah
b bg + c
bh + ci
d dg + e dh +
ei + f
=
*Find the values b=
10
a=5 f=2
g=4/5 c=1 e=5
i=2 f=3h=1/5
5 4
1
10 9
4
10 13
15
5 4
1
10 9
4
10 13
15
Step3: Let Ly = B, solve for y’s
5y₁ =3.4, y₁ =0.68
10y₁ +y₂ =8.8, y₂ =2
10y₁ +5y₂ +3y₃ =19.2, y₃ =0.80
Let Ly=B
Y ₁
Y ₂
Y ₃
=
5 0
0
10 1
0
10 5
3
3.4
8.8
19.
2
Step4: Let Ux = y, solve for the variable vectors x
X3= 0.80
X2+2x3=2
x1+ 4/5x2 +1/5x3=0.68
X=
Let Ux=y
X ₁
X ₂
X ₃
=
0.2
0
0.4
0
0.8
0
1 4/5
1/5
0 1
2
0 0
1
0.6
8
2
0.8
0
Example four-Crout method
x + 2y + z= 4
2x + 3y - z = -3
3x + y +2z = 3
Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes
the variable vectors and B are the constants
1 2
1
2 -3
-1
3 1
2
A =
X
Y
Z
X =
4
-3
3
B=
Step2: Let A = LU, where L is the lower triangular matrix and U is the upper
triangular matrix assume that the diagonal entries U is equal to 1
Let A=LU =
a 0
0
b c
0
d e
f
1 g
h
0 1
i
0 0
1
a ag
ah
b bg + c
bh + ci
d dg + e dh +
ei + f
=
*Find the values b= 2a=1 f=8/7
g=2 c= -7 e= -5
i=3/7 f=3h=1
1 2
1
2 -3 -
1
3 1
2
1 2
1
2 -3 -
1
3 1
2
Step3: Let Ly = B, solve for y’s
y₁ = 4, y₁ =4
2y₁ - 7y₂ = -3, y₂ =11/7
3y₁ - 5y₂ + 8/7y₃ =3, y₃ = -1
Let Ly=B
Y ₁
Y ₂
Y ₃
=
1 0
0
2 -7
0
3 -5
8/7
4
-3
3
Step4: Let Ux = y, solve for the variable vectors x
X+2y+z=4
y+3/7z=11/7
Z=-1
Let Ux=y
X
Y
Z
=
x=1
Y=2
Z=-1
1 2
1
0 1
3/7
0 0
1
4
11/7
-1
Example five-Cholesky’s Method:
The Cholesky’s method, unlike the Doolittle’s and Crout’s does not have any
condition for the main diagonal entries. The matrix should be symmetric and for a
symmetric, positive definitive matrix.
4x₁ + 10x₂ + 8x₃ = 44
10x₁ + 26x₂ + 26x₂ = 128
8x₁ + 26x₂ + 61x₂ = 214
Step1: create matrix A, X and B.4 10
8
10 26
26
8 26
61
X ₁
X ₂
X ₃
44
12
8
21
4
A= B=X=
Step2: Let A = LLᵗ
A=LLᵗ =
a 0
0
b c
0
d e
f
a b
c
0 d
e
0 0
f
a² ag
ad
ab b² + c² bd +
ce
ad dg + e d² + e²
+ f²
=
*Find the values b= 5a=2 d=4
c=1 e=6f=3
4 10
8
10 26
26
8 26
61
4 10
8
10 26
26
8 26
61
Step3: Let Ly = B
2 0
0
5 1
0
4 6
3
Y ₁
Y ₂
Y ₃
44
12
8
21
4
=
Y ₁ = 22
Y ₂ = 18
Y ₃ = 6
Ly = B
Step4: Lᵗ x = y, then solve for x
x=2
x₂=6
2x₁ + 5x₂ + 4x ₃ = 22; x₁= -8
22
18
6
=Lᵗ x = y
X ₁
X ₂
X ₃
2 5
4
0 1
6
0 0
3
Example Six-Cholesky’s Method :
x₁ - x₂ + 2x₃ = 8
-x₁ + 5x₂ - 4x₃ = 2
2x₁ + 4x₂ + 6x₃ = 6
Step1: create matrix A, X and B.
1 -1
2
-1 5
-4
2 -4
6
X ₁
X ₂
X ₃
8
2
6
A= B=X=
Step2: Let A = LLᵗ
A=LLᵗ =
a 0
0
b c
0
d e
f
a b
c
0 d
e
0 0
f
a² ag
ad
ab b² + c² bd +
ce
ad dg + e d² + e²
+ f²
=
*Find the values b= -
1
a=1 d=2
c=2 e=-1f= 1
1 -1
2
-1 5
-4
2 -4
6
1 -1
2
-1 5
-4
2 -4
6
bd= -2
Step3: Let Ly = B
1 0
0
-1 2
0
2 -1
1
Y ₁
Y ₂
Y ₃
8
2
6
=
Y ₁ = 8
Y ₂ = 5
Y ₃ = -5
Ly = B
Step4: Lᵗ x = y, then solve for x
x1=18
X2=0
X3=-5
8
5
-5
=Lᵗ x = y
X ₁
X ₂
X ₃
1 -1
2
0 2
-1
0 0
1
Complexity of LU Decomposition
to solve Ax=b:
– decompose A into LU --
cost 2n³/3 flops
– solve Ly=b for y by forw. substitution
– solve Ux=y for x by back substitution
slower alternative:
– compute Aˉ¹ -- cost 2n³ flops --
cost n² flops
– multiply x=A ˉ¹ b -- cost 2n² flops --
cost n² flops
this costs about 3 times as much as LU
Solving linear equation   system

More Related Content

What's hot

System Of Linear Equations
System Of Linear EquationsSystem Of Linear Equations
System Of Linear Equationssaahil kshatriya
 
Gaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationStudent
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equationsswartzje
 
Quadratic equation slideshare
Quadratic equation slideshareQuadratic equation slideshare
Quadratic equation slideshareAnusharani771
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equationsAhmed Haider
 
Gauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodGauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodMeet Nayak
 
Lu decomposition
Lu decompositionLu decomposition
Lu decompositiongilandio
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its applicationMahmudul Alam
 
system linear equations and matrices
 system linear equations and matrices system linear equations and matrices
system linear equations and matricesAditya Vaishampayan
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Asad Ali
 
Graphing Linear Functions
Graphing Linear FunctionsGraphing Linear Functions
Graphing Linear Functionshisema01
 
Linear transformation.ppt
Linear transformation.pptLinear transformation.ppt
Linear transformation.pptRaj Parekh
 
Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applicationsPratik Gadhiya
 

What's hot (20)

System Of Linear Equations
System Of Linear EquationsSystem Of Linear Equations
System Of Linear Equations
 
Higher order differential equations
Higher order differential equationsHigher order differential equations
Higher order differential equations
 
Gaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equation
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
 
Quadratic equation slideshare
Quadratic equation slideshareQuadratic equation slideshare
Quadratic equation slideshare
 
Power series
Power series Power series
Power series
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equations
 
Gauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodGauss jordan and Guass elimination method
Gauss jordan and Guass elimination method
 
MEAN VALUE THEOREM
MEAN VALUE THEOREMMEAN VALUE THEOREM
MEAN VALUE THEOREM
 
Lu decomposition
Lu decompositionLu decomposition
Lu decomposition
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its application
 
system linear equations and matrices
 system linear equations and matrices system linear equations and matrices
system linear equations and matrices
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
Linear differential equation of second order
Linear differential equation of second orderLinear differential equation of second order
Linear differential equation of second order
 
simplex method
simplex methodsimplex method
simplex method
 
Theory of Equation
Theory of EquationTheory of Equation
Theory of Equation
 
Graphing Linear Functions
Graphing Linear FunctionsGraphing Linear Functions
Graphing Linear Functions
 
Determinants
DeterminantsDeterminants
Determinants
 
Linear transformation.ppt
Linear transformation.pptLinear transformation.ppt
Linear transformation.ppt
 
Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applications
 

Similar to Solving linear equation system

CST 504 Standard and Function Form of a Line
CST 504 Standard and Function Form of a LineCST 504 Standard and Function Form of a Line
CST 504 Standard and Function Form of a LineNeil MacIntosh
 
Chapter 3 solving systems of linear equations
Chapter 3 solving systems of linear equationsChapter 3 solving systems of linear equations
Chapter 3 solving systems of linear equationsssuser53ee01
 
Business Math Chapter 3
Business Math Chapter 3Business Math Chapter 3
Business Math Chapter 3Nazrin Nazdri
 
20200830230859_PPT4-Lines, Parabolas and Systems.pptx
20200830230859_PPT4-Lines, Parabolas and Systems.pptx20200830230859_PPT4-Lines, Parabolas and Systems.pptx
20200830230859_PPT4-Lines, Parabolas and Systems.pptxConanEdogawaShinichi
 
Mathematics 8 Systems of Linear Inequalities
Mathematics 8 Systems of Linear InequalitiesMathematics 8 Systems of Linear Inequalities
Mathematics 8 Systems of Linear InequalitiesJuan Miguel Palero
 
math1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdfmath1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdfHebaEng
 
Module 2 linear functions
Module 2   linear functionsModule 2   linear functions
Module 2 linear functionsdionesioable
 
Mathematics 8 Linear Functions
Mathematics 8 Linear FunctionsMathematics 8 Linear Functions
Mathematics 8 Linear FunctionsJuan Miguel Palero
 
M3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxM3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxJyothi122118
 
M3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxM3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxJyothi122118
 
Solving system of linear equations
Solving system of linear equationsSolving system of linear equations
Solving system of linear equationsMew Aornwara
 
Assignment chapters 3 to 7
Assignment chapters 3 to 7Assignment chapters 3 to 7
Assignment chapters 3 to 7KarunaGupta1982
 

Similar to Solving linear equation system (20)

CST 504 Standard and Function Form of a Line
CST 504 Standard and Function Form of a LineCST 504 Standard and Function Form of a Line
CST 504 Standard and Function Form of a Line
 
Chapter 3 solving systems of linear equations
Chapter 3 solving systems of linear equationsChapter 3 solving systems of linear equations
Chapter 3 solving systems of linear equations
 
Business Math Chapter 3
Business Math Chapter 3Business Math Chapter 3
Business Math Chapter 3
 
20200830230859_PPT4-Lines, Parabolas and Systems.pptx
20200830230859_PPT4-Lines, Parabolas and Systems.pptx20200830230859_PPT4-Lines, Parabolas and Systems.pptx
20200830230859_PPT4-Lines, Parabolas and Systems.pptx
 
Daa unit iv - problems
Daa   unit  iv - problemsDaa   unit  iv - problems
Daa unit iv - problems
 
Mathematics 8 Systems of Linear Inequalities
Mathematics 8 Systems of Linear InequalitiesMathematics 8 Systems of Linear Inequalities
Mathematics 8 Systems of Linear Inequalities
 
Form 4 add maths note
Form 4 add maths noteForm 4 add maths note
Form 4 add maths note
 
Bonus math project
Bonus math projectBonus math project
Bonus math project
 
math1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdfmath1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdf
 
Module 2 linear functions
Module 2   linear functionsModule 2   linear functions
Module 2 linear functions
 
Mathematics 8 Linear Functions
Mathematics 8 Linear FunctionsMathematics 8 Linear Functions
Mathematics 8 Linear Functions
 
M3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxM3 PPT 22ESC143.docx
M3 PPT 22ESC143.docx
 
M3 PPT 22ESC143.docx
M3 PPT 22ESC143.docxM3 PPT 22ESC143.docx
M3 PPT 22ESC143.docx
 
Persamaan fungsi linier
Persamaan fungsi linierPersamaan fungsi linier
Persamaan fungsi linier
 
Differentiation.pdf
Differentiation.pdfDifferentiation.pdf
Differentiation.pdf
 
Solving system of linear equations
Solving system of linear equationsSolving system of linear equations
Solving system of linear equations
 
QUADRATIC.pptx
QUADRATIC.pptxQUADRATIC.pptx
QUADRATIC.pptx
 
Metrix[1]
Metrix[1]Metrix[1]
Metrix[1]
 
Assignment chapters 3 to 7
Assignment chapters 3 to 7Assignment chapters 3 to 7
Assignment chapters 3 to 7
 
Unit2.polynomials.algebraicfractions
Unit2.polynomials.algebraicfractionsUnit2.polynomials.algebraicfractions
Unit2.polynomials.algebraicfractions
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 

Solving linear equation system

  • 2. Outline  Introduction  Doolittle-crout method  Cholesky method
  • 3. Introduction A linear equation in one unknown is an equation of the form a x = b, where a and b are constants and x is an unknown that we wish to solve for. Similarly, a linear equation in n unknowns x1, x2, …, xn is an equation of the form: a1 · x1 + a2 · x2 + … + an · xn = b, where a1, a2, …, an and b are constants. The name linear comes from the fact that such an equation in two unknowns or variables represents a straight line. A set of such equations is called a system of linear equations. In mathematics, a system of linear equations is a collection of two or more linear equations with the same set of variables in all the equations.
  • 4. Some types of linear equation system:  Elimination method  Gauss elimination  Gauss elimination with partial pivoting  Iteration method  Jacobi  Gauss-seidel  LU factorization/decomposition method  Doolittle  Crout  Cholesky  Thomas method  Thomas algorithm
  • 5. LU factorization/decomposition method For a linear system Ax = b Use substitution of A = LU, where L is a lower triangle matrix, and U is upper triangular matrix. LUx = b Let Ux = Y Yields LY = b
  • 6. *There are a different between Doolittle, crout and Cholesky method: If [L] has ones on its diagonal, then you've done a Doolittle factorization. If [U] has ones on its diagonal, then you've done a Crout factorization. If [L] is the transpose of U, then you've done a Cholesky factorization. [A] [L] [U] [A] [L] [U]
  • 7. Example one-Doolittle method Doolittle’s Method LU factorization of A when the diagonal elements of lower triangular matrix, L have a unit value. x₁ + x₂ + x₃ =5 x ₁ + 2x₂ +2x₃ =6 x ₁ + 2x₂ +3x₃ =8 Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes the variable vectors and B are the constants 1 1 1 1 2 2 1 2 3 A = X ₁ X ₂ X ₃ X = 5 6 8 B=
  • 8. Step2: Let A = LU, where L is the lower triangular matrix and U is the upper triangular matrix assume that the diagonal entries L is equal to 1 Let A=LU 1 1 1 1 2 2 1 2 3 = 1 0 0 a 1 0 b c 1 d e f 0 g h 0 0 i d e f ad ae + g af + h bd be + cg bf + ch + i = *Find the values e=1d= 1 f=1 ad=1 Ae+g=2 Af+h=2 a=1 g=1 h=1bd=1 be+cg=2 Bf+ch+i=3 i=1b=1 c=1 1 1 1 1 2 2 1 2 3
  • 9. Step3: Let Ly = B, solve for y’s Y₁ =5 Y₁ +Y₂ =6 Y₁ + Y₂ + Y₃ =8 Y₁ =5, Y₂ =1, Y₃ =2 Let Ly=B 1 0 0 1 1 0 1 1 1 Y ₁ Y ₂ Y ₃ 5 6 8 =
  • 10. Step3: Let Ux = y, solve for the variable vectors x X₃ =2 X₂ +X₃ =1 X₁ +X₂ +X₃ =5 X₁ =4, X₂ =-1, X₃ =2 X= Let Ux=y X ₁ X ₂ X ₃ 5 1 2 = 4 - 1 2 1 1 1 0 1 1 0 0 1
  • 11. Example two-Doolittle method 2x - y - 2z = -1 -4x + 6y +3z =13 -4x - 2y +8z = -6 Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes the variable vectors and B are the constants 2 -1 -2 -4 6 3 -4 -2 8 A = X Y Z X = -1 1 3 -6 B=
  • 12. Step2: Let A = LU, where L is the lower triangular matrix and U is the upper triangular matrix assume that the diagonal entries L is equal to 1 Let A=LU = 1 0 0 a 1 0 b c 1 d e f 0 g h 0 0 i d e f ad ae + g af + h bd be + cg bf + ch + i = *Find the values e= -1d= 2 f=-2 ad= -4 Ae+g=6 Af+h=3 a= -2 g=4 h= -1bd= -4 be+cg= -2 Bf+ch+i=8 i=3b= -2 c= -1 2 -1 -2 -4 6 3 -4 -2 8 2 -1 -2 -4 6 3 -4 -2 8
  • 13. Step3: Let Ly = B, solve for y’s Y₁ = -1, Y₂ =11, Y₃ =3 Let Ly=B 1 0 0 -2 1 0 -2 -1 1 Y ₁ Y ₂ Y ₃ -1 1 3 -6 =
  • 14. Step4: Let Ux = y, solve for the variable vectors x X₁ =2, X₂ =3, X₃ =1 X= Let Ux=y 2 -1 2 0 4 -1 0 0 3 X ₁ X ₂ X ₃ -1 1 1 3 = 2 3 1
  • 15. Example three-Crout method 5x₁ + 4x₂ + x₃ =3.4 10x ₁ + 9x₂ +4x₃ =8.8 10x ₁ + 13x₂ +15x₃ =19.2 Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes the variable vectors and B are the constants 5 4 1 10 9 4 10 13 15 A = X ₁ X ₂ X ₃ X = 3.4 8.8 19. 2 B=
  • 16. Step2: Let A = LU, where L is the lower triangular matrix and U is the upper triangular matrix assume that the diagonal entries U is equal to 1 Let A=LU = a 0 0 b c 0 d e f 1 g h 0 1 i 0 0 1 a ag ah b bg + c bh + ci d dg + e dh + ei + f = *Find the values b= 10 a=5 f=2 g=4/5 c=1 e=5 i=2 f=3h=1/5 5 4 1 10 9 4 10 13 15 5 4 1 10 9 4 10 13 15
  • 17. Step3: Let Ly = B, solve for y’s 5y₁ =3.4, y₁ =0.68 10y₁ +y₂ =8.8, y₂ =2 10y₁ +5y₂ +3y₃ =19.2, y₃ =0.80 Let Ly=B Y ₁ Y ₂ Y ₃ = 5 0 0 10 1 0 10 5 3 3.4 8.8 19. 2
  • 18. Step4: Let Ux = y, solve for the variable vectors x X3= 0.80 X2+2x3=2 x1+ 4/5x2 +1/5x3=0.68 X= Let Ux=y X ₁ X ₂ X ₃ = 0.2 0 0.4 0 0.8 0 1 4/5 1/5 0 1 2 0 0 1 0.6 8 2 0.8 0
  • 19. Example four-Crout method x + 2y + z= 4 2x + 3y - z = -3 3x + y +2z = 3 Step 1: Create matrices A, X and B , where A is the augmented matrix, X constitutes the variable vectors and B are the constants 1 2 1 2 -3 -1 3 1 2 A = X Y Z X = 4 -3 3 B=
  • 20. Step2: Let A = LU, where L is the lower triangular matrix and U is the upper triangular matrix assume that the diagonal entries U is equal to 1 Let A=LU = a 0 0 b c 0 d e f 1 g h 0 1 i 0 0 1 a ag ah b bg + c bh + ci d dg + e dh + ei + f = *Find the values b= 2a=1 f=8/7 g=2 c= -7 e= -5 i=3/7 f=3h=1 1 2 1 2 -3 - 1 3 1 2 1 2 1 2 -3 - 1 3 1 2
  • 21. Step3: Let Ly = B, solve for y’s y₁ = 4, y₁ =4 2y₁ - 7y₂ = -3, y₂ =11/7 3y₁ - 5y₂ + 8/7y₃ =3, y₃ = -1 Let Ly=B Y ₁ Y ₂ Y ₃ = 1 0 0 2 -7 0 3 -5 8/7 4 -3 3
  • 22. Step4: Let Ux = y, solve for the variable vectors x X+2y+z=4 y+3/7z=11/7 Z=-1 Let Ux=y X Y Z = x=1 Y=2 Z=-1 1 2 1 0 1 3/7 0 0 1 4 11/7 -1
  • 23. Example five-Cholesky’s Method: The Cholesky’s method, unlike the Doolittle’s and Crout’s does not have any condition for the main diagonal entries. The matrix should be symmetric and for a symmetric, positive definitive matrix. 4x₁ + 10x₂ + 8x₃ = 44 10x₁ + 26x₂ + 26x₂ = 128 8x₁ + 26x₂ + 61x₂ = 214 Step1: create matrix A, X and B.4 10 8 10 26 26 8 26 61 X ₁ X ₂ X ₃ 44 12 8 21 4 A= B=X=
  • 24. Step2: Let A = LLᵗ A=LLᵗ = a 0 0 b c 0 d e f a b c 0 d e 0 0 f a² ag ad ab b² + c² bd + ce ad dg + e d² + e² + f² = *Find the values b= 5a=2 d=4 c=1 e=6f=3 4 10 8 10 26 26 8 26 61 4 10 8 10 26 26 8 26 61
  • 25. Step3: Let Ly = B 2 0 0 5 1 0 4 6 3 Y ₁ Y ₂ Y ₃ 44 12 8 21 4 = Y ₁ = 22 Y ₂ = 18 Y ₃ = 6 Ly = B
  • 26. Step4: Lᵗ x = y, then solve for x x=2 x₂=6 2x₁ + 5x₂ + 4x ₃ = 22; x₁= -8 22 18 6 =Lᵗ x = y X ₁ X ₂ X ₃ 2 5 4 0 1 6 0 0 3
  • 27. Example Six-Cholesky’s Method : x₁ - x₂ + 2x₃ = 8 -x₁ + 5x₂ - 4x₃ = 2 2x₁ + 4x₂ + 6x₃ = 6 Step1: create matrix A, X and B. 1 -1 2 -1 5 -4 2 -4 6 X ₁ X ₂ X ₃ 8 2 6 A= B=X=
  • 28. Step2: Let A = LLᵗ A=LLᵗ = a 0 0 b c 0 d e f a b c 0 d e 0 0 f a² ag ad ab b² + c² bd + ce ad dg + e d² + e² + f² = *Find the values b= - 1 a=1 d=2 c=2 e=-1f= 1 1 -1 2 -1 5 -4 2 -4 6 1 -1 2 -1 5 -4 2 -4 6 bd= -2
  • 29. Step3: Let Ly = B 1 0 0 -1 2 0 2 -1 1 Y ₁ Y ₂ Y ₃ 8 2 6 = Y ₁ = 8 Y ₂ = 5 Y ₃ = -5 Ly = B
  • 30. Step4: Lᵗ x = y, then solve for x x1=18 X2=0 X3=-5 8 5 -5 =Lᵗ x = y X ₁ X ₂ X ₃ 1 -1 2 0 2 -1 0 0 1
  • 31. Complexity of LU Decomposition to solve Ax=b: – decompose A into LU -- cost 2n³/3 flops – solve Ly=b for y by forw. substitution – solve Ux=y for x by back substitution slower alternative: – compute Aˉ¹ -- cost 2n³ flops -- cost n² flops – multiply x=A ˉ¹ b -- cost 2n² flops -- cost n² flops this costs about 3 times as much as LU