SlideShare a Scribd company logo
1 of 20
Thomas Algorithm
LU Decomposition for Tri-Diagonal Systems
S.K.PARIDHI
Banded matrix
A band matrix is a sparse matrix whose non-zero entries are
confined to a diagonal band, comprising the main diagonal
and zero or more diagonals on either side.
1 0 0
0 2 0
0 0 3
1 4 0
6 2 5
0 7 3
The matrix can be symmetric, having
the same number of sub- and super-
diagonals. If a matrix has only one
sub- and one super-diagonal, we have
a tridiagonal matrix etc. The number
of super-diagonals is called the upper
bandwidth (two in the example), and
the number of sub-diagonals is the
lower bandwidth (three in the
example). The total number of
diagonals, six in the example, is the
bandwidth.
Banded matrix
What is a TriDiagonal Matrix…??
A tridiagonal matrix is a band matrix that has nonzero
elements only on the main diagonal, the first diagonal
below this, and the first diagonal above the main
diagonal.
Considering a 4 X 4 Matrix
1 4 0 0
3 4 1 0
0 2 3 4
0 0 1 3
𝑎1 𝑏1 0 0
𝑐2 𝑎2 𝑏2 0
0 𝑐3 𝑎3 𝑏3
0 0 𝑐4 𝑎4
Tridiagonal Matrix Algorithm
• Thomas’ algorithm, also called TriDiagonal Matrix Algorithm
(TDMA) is essentially the result of applying Gaussian
elimination to the tridiagonal system of equations.
• A system of simultaneous algebraic equations with nonzero
coefficients only on the main diagonal, the lower diagonal, and
the upper diagonal is called a tridiagonal system of equations.
Generalizing Tridiagonal Matrix
Consider a tridiagonal system of N equations with N
unknowns, 𝑢1, 𝑢2, 𝑢3,··· 𝑢 𝑁as given below:
Generalizing Tridiagonal Matrix
The Matrix can be written as
𝑎𝑖 𝑢𝑖−1 + 𝑏𝑖 𝑢𝑖 + 𝑐𝑖 𝑢𝑖+1 = 𝑑𝑖
Looking at the system of equations, we see that 𝑖 𝑡ℎ unknown can
be
expressed as a function of (𝑖 + 1) 𝑡ℎunknown. That is
𝑢𝑖 = 𝛾𝑖 𝑢𝑖+1 + 𝜌𝑖
𝑢𝑖−1 = 𝛾𝑖−1 𝑢𝑖 + 𝜌𝑖−1
𝑵𝒐𝒕𝒆: 𝑎1 = 0 & 𝑐 𝑁 = 0
Lets solve a problem for clear
understanding..!!
Let us consider the system of equations
3𝑥1 − 𝑥2 + 0𝑥3 = −1
−𝑥1 + 3𝑥2 − 𝑥3 = 7
0𝑥1 − 𝑥2 + 3𝑥3 = 7
Matrix form is
3 −1 0
−1 3 −1
0 −1 3
𝑥1
𝑥2
𝑥3
=
−1
7
7
STAGE I : Converting Mx = r into Ux=𝜌
• Row 1
𝟑𝒙𝒍 − 𝒙 𝟐 = −𝟏
Divide the Equation by 𝑎1, in this case 𝑎1= 3
⇒ 𝒙 𝟏 −
𝟏
𝟑
𝒙 𝟐 =
−𝟏
𝟑
Assuming the coefficient of 𝑥2 as 𝛾1 and the remaining constants as 𝜌1.
Now the equations converts to,
⇒ 𝒙 𝟏 + 𝜸 𝟏 𝒙 𝟐 = 𝝆 𝟏
⇒ 𝝆 𝟏 = −
𝟏
𝟑
, 𝜸 𝟏 = −
𝟏
𝟑
After Changing Row 1
1 𝛾1 0
−1 3 −1
0 −1 3
𝑥1
𝑥2
𝑥3
=
𝜌1
7
7
Converting Mx = r into Ux=𝜌
• Row 2
Multiplying 𝒂 𝟐 (-1) in Row 1 and eliminating 𝒙 𝟏 Row 2
Row 2 −𝑥1 + 3𝑥2– 𝑥3 = 7
𝑎2 x Row 1 −𝑥1– 𝛾1 𝑥2– 0𝑥3 = −𝜌1
Subtracting 𝑥2 3 + 𝛾1 – 𝑥3 = 7 + 𝜌1
𝑥2 3 + 𝛾1 – 𝑥3 = 7 + 𝜌1
Divide by 3 + 𝛾1 ,
Equation becomes 𝒙 𝟐 + 𝜸 𝟐 𝒙 𝟑 = 𝝆 𝟐
𝜸2 =
−1
3 + γ1
= 0.375 𝝆2 =
7 + 𝜌1
3 + γ1
= 2.5
After Changing Row 2
1 𝛾1 0
0 1 𝛾2
0 −1 3
𝑥1
𝑥2
𝑥3
=
𝜌1
𝜌2
7
Converting Mx = r into Ux=𝜌
• Row 3
Multiplying 𝒂 𝟑 (-1) in Row 1 and eliminating 𝒙 𝟐 Row 3
Row 3 −𝑥2 + 3𝑥3 = 7
𝑎3 x Row 2 −𝑥2– 𝛾2 𝑥3 = −𝜌1
Subtracting 3 + 𝛾2 𝑥3 = 7 + 𝜌2
𝑥3 =
7 + 𝜌2
3 + 𝛾2
⇒ 𝜌3
𝝆3 =
7 + 𝜌2
3 + γ2
= 3.619 ⇒ 𝑥3 = 3.619
After Changing Row 3
1 𝛾1 0
0 1 𝛾2
0 0 1
𝑥1
𝑥2
𝑥3
=
𝜌1
𝜌2
𝜌3
STAGE II -> Backward Substitution
1 𝛾1 0
0 1 𝛾2
0 0 1
𝑥1
𝑥2
𝑥3
=
𝜌1
𝜌2
𝜌3
Row 2:
𝑥2 + 𝛾2 𝑥3 = 𝜌2
𝑥2 = 𝜌2 − 𝛾2 𝑥3
Substituting
𝜌2 = 2.5
𝛾2 = −0.375
𝑥2 = 3.857
STAGE II -> Backward Substitution
1 𝛾1 0
0 1 𝛾2
0 0 1
𝑥1
𝑥2
𝑥3
=
𝜌1
𝜌2
𝜌3
Row 1:
𝑥1 + 𝛾1 𝑥2 = 𝜌1
𝑥1 = 𝜌1 − 𝛾1 𝑥2
Substituting
𝜌1 = −0.333
𝛾1 = −0.333
𝑥1 = 0.952
SOLUTION
𝑥1 = 0.952
𝑥2 = 3.857
𝑥3 = 3.619
Why Thomas Algorithm is used ?
• This type of computation is quick.
• Tridiagonal system of equations are most
common.
• Even most of them convert the general system
of equations to tridiagonal system of
equations.
• It’s importance is clearly visible with a large
number of unknowns.
Limitations of Thomas Algorithm
• Algorithm is unstable when
𝑏𝑖 − 𝑎𝑖 𝛾𝑖−1 = 0
• This occurs if the tridiagonal matrix is
singular and in some cases non-singular also.
Singular
Matrix
(Determinant is Zero)
(*Square Matrix)
(It doesn’t have a
Inverse)
Non-Singular
Matrix
(Determinant is Non-Zero)
(*Square Matrix)
(It has a Inverse)
Condition for algorithm to be stable
𝑏𝑖 > 𝑎𝑖 + 𝐶𝑖 for every i.
What can be done when the algorithm is
numerically unstable..??
Pivoting of matrix

More Related Content

What's hot

NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)krishnapriya R
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical AnalysisMohammad Tawfik
 
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equationsRifat Rahamatullah
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first ordervishalgohel12195
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation Meet Patel
 
Eigenvalues and Eigenvectors
Eigenvalues and EigenvectorsEigenvalues and Eigenvectors
Eigenvalues and EigenvectorsVinod Srivastava
 
Numerical method for solving non linear equations
Numerical method for solving non linear equationsNumerical method for solving non linear equations
Numerical method for solving non linear equationsMdHaque78
 
Finite difference method
Finite difference methodFinite difference method
Finite difference methodDivyansh Verma
 
Orthogonal Matrices
Orthogonal MatricesOrthogonal Matrices
Orthogonal MatricesTahirAziz48
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite differenceManthan Chavda
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform 001Abhishek1
 
Bisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisBisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisHamza Nawaz
 
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical MethodsGauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical MethodsJanki Shah
 
Laplace equation
Laplace equationLaplace equation
Laplace equationalexkhan129
 
Jacobi iteration method
Jacobi iteration methodJacobi iteration method
Jacobi iteration methodMONIRUL ISLAM
 

What's hot (20)

NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Jacobi method
Jacobi methodJacobi method
Jacobi method
 
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equations
 
Couette flow
Couette flowCouette flow
Couette flow
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first order
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
 
Eigenvalues and Eigenvectors
Eigenvalues and EigenvectorsEigenvalues and Eigenvectors
Eigenvalues and Eigenvectors
 
Numerical method for solving non linear equations
Numerical method for solving non linear equationsNumerical method for solving non linear equations
Numerical method for solving non linear equations
 
Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Bender schmidt method
Bender schmidt methodBender schmidt method
Bender schmidt method
 
Orthogonal Matrices
Orthogonal MatricesOrthogonal Matrices
Orthogonal Matrices
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite difference
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform
 
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
 
Bisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisBisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysis
 
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical MethodsGauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
 
Laplace equation
Laplace equationLaplace equation
Laplace equation
 
Jacobi iteration method
Jacobi iteration methodJacobi iteration method
Jacobi iteration method
 

Similar to Thomas algorithm

Gauss Jordan
Gauss JordanGauss Jordan
Gauss JordanEzzat Gul
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSRai University
 
system linear equations and matrices
 system linear equations and matrices system linear equations and matrices
system linear equations and matricesAditya Vaishampayan
 
Solving Linear system of equations Mathematics.pdf.pptx
Solving Linear system of equations Mathematics.pdf.pptxSolving Linear system of equations Mathematics.pdf.pptx
Solving Linear system of equations Mathematics.pdf.pptxOmarAh4
 
Semana 31 matrices álgebra uni ccesa007
Semana 31 matrices  álgebra uni ccesa007Semana 31 matrices  álgebra uni ccesa007
Semana 31 matrices álgebra uni ccesa007Demetrio Ccesa Rayme
 
Linear equations
Linear equationsLinear equations
Linear equationsNisarg Amin
 
matrices and algbra
matrices and algbramatrices and algbra
matrices and algbragandhinagar
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
System of equations
System of equationsSystem of equations
System of equationsmariacadena
 
University of duhok
University of duhokUniversity of duhok
University of duhokRwan Kamal
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Rwan Kamal
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Abdullaا Hajy
 

Similar to Thomas algorithm (20)

Gauss Jordan
Gauss JordanGauss Jordan
Gauss Jordan
 
Systems of linear equations; matrices
Systems of linear equations; matricesSystems of linear equations; matrices
Systems of linear equations; matrices
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
 
Matrices
MatricesMatrices
Matrices
 
system linear equations and matrices
 system linear equations and matrices system linear equations and matrices
system linear equations and matrices
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Solving Linear system of equations Mathematics.pdf.pptx
Solving Linear system of equations Mathematics.pdf.pptxSolving Linear system of equations Mathematics.pdf.pptx
Solving Linear system of equations Mathematics.pdf.pptx
 
Semana 31 matrices álgebra uni ccesa007
Semana 31 matrices  álgebra uni ccesa007Semana 31 matrices  álgebra uni ccesa007
Semana 31 matrices álgebra uni ccesa007
 
Matrix
MatrixMatrix
Matrix
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
Linear equations
Linear equationsLinear equations
Linear equations
 
matrices and algbra
matrices and algbramatrices and algbra
matrices and algbra
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 
System of equations
System of equationsSystem of equations
System of equations
 
University of duhok
University of duhokUniversity of duhok
University of duhok
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
 

Recently uploaded

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
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

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
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
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
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Thomas algorithm

  • 1. Thomas Algorithm LU Decomposition for Tri-Diagonal Systems S.K.PARIDHI
  • 2. Banded matrix A band matrix is a sparse matrix whose non-zero entries are confined to a diagonal band, comprising the main diagonal and zero or more diagonals on either side. 1 0 0 0 2 0 0 0 3 1 4 0 6 2 5 0 7 3
  • 3. The matrix can be symmetric, having the same number of sub- and super- diagonals. If a matrix has only one sub- and one super-diagonal, we have a tridiagonal matrix etc. The number of super-diagonals is called the upper bandwidth (two in the example), and the number of sub-diagonals is the lower bandwidth (three in the example). The total number of diagonals, six in the example, is the bandwidth. Banded matrix
  • 4. What is a TriDiagonal Matrix…?? A tridiagonal matrix is a band matrix that has nonzero elements only on the main diagonal, the first diagonal below this, and the first diagonal above the main diagonal. Considering a 4 X 4 Matrix 1 4 0 0 3 4 1 0 0 2 3 4 0 0 1 3 𝑎1 𝑏1 0 0 𝑐2 𝑎2 𝑏2 0 0 𝑐3 𝑎3 𝑏3 0 0 𝑐4 𝑎4
  • 5. Tridiagonal Matrix Algorithm • Thomas’ algorithm, also called TriDiagonal Matrix Algorithm (TDMA) is essentially the result of applying Gaussian elimination to the tridiagonal system of equations. • A system of simultaneous algebraic equations with nonzero coefficients only on the main diagonal, the lower diagonal, and the upper diagonal is called a tridiagonal system of equations.
  • 6. Generalizing Tridiagonal Matrix Consider a tridiagonal system of N equations with N unknowns, 𝑢1, 𝑢2, 𝑢3,··· 𝑢 𝑁as given below:
  • 7. Generalizing Tridiagonal Matrix The Matrix can be written as 𝑎𝑖 𝑢𝑖−1 + 𝑏𝑖 𝑢𝑖 + 𝑐𝑖 𝑢𝑖+1 = 𝑑𝑖 Looking at the system of equations, we see that 𝑖 𝑡ℎ unknown can be expressed as a function of (𝑖 + 1) 𝑡ℎunknown. That is 𝑢𝑖 = 𝛾𝑖 𝑢𝑖+1 + 𝜌𝑖 𝑢𝑖−1 = 𝛾𝑖−1 𝑢𝑖 + 𝜌𝑖−1 𝑵𝒐𝒕𝒆: 𝑎1 = 0 & 𝑐 𝑁 = 0
  • 8. Lets solve a problem for clear understanding..!! Let us consider the system of equations 3𝑥1 − 𝑥2 + 0𝑥3 = −1 −𝑥1 + 3𝑥2 − 𝑥3 = 7 0𝑥1 − 𝑥2 + 3𝑥3 = 7 Matrix form is 3 −1 0 −1 3 −1 0 −1 3 𝑥1 𝑥2 𝑥3 = −1 7 7
  • 9. STAGE I : Converting Mx = r into Ux=𝜌 • Row 1 𝟑𝒙𝒍 − 𝒙 𝟐 = −𝟏 Divide the Equation by 𝑎1, in this case 𝑎1= 3 ⇒ 𝒙 𝟏 − 𝟏 𝟑 𝒙 𝟐 = −𝟏 𝟑 Assuming the coefficient of 𝑥2 as 𝛾1 and the remaining constants as 𝜌1. Now the equations converts to, ⇒ 𝒙 𝟏 + 𝜸 𝟏 𝒙 𝟐 = 𝝆 𝟏 ⇒ 𝝆 𝟏 = − 𝟏 𝟑 , 𝜸 𝟏 = − 𝟏 𝟑
  • 10. After Changing Row 1 1 𝛾1 0 −1 3 −1 0 −1 3 𝑥1 𝑥2 𝑥3 = 𝜌1 7 7
  • 11. Converting Mx = r into Ux=𝜌 • Row 2 Multiplying 𝒂 𝟐 (-1) in Row 1 and eliminating 𝒙 𝟏 Row 2 Row 2 −𝑥1 + 3𝑥2– 𝑥3 = 7 𝑎2 x Row 1 −𝑥1– 𝛾1 𝑥2– 0𝑥3 = −𝜌1 Subtracting 𝑥2 3 + 𝛾1 – 𝑥3 = 7 + 𝜌1 𝑥2 3 + 𝛾1 – 𝑥3 = 7 + 𝜌1 Divide by 3 + 𝛾1 , Equation becomes 𝒙 𝟐 + 𝜸 𝟐 𝒙 𝟑 = 𝝆 𝟐 𝜸2 = −1 3 + γ1 = 0.375 𝝆2 = 7 + 𝜌1 3 + γ1 = 2.5
  • 12. After Changing Row 2 1 𝛾1 0 0 1 𝛾2 0 −1 3 𝑥1 𝑥2 𝑥3 = 𝜌1 𝜌2 7
  • 13. Converting Mx = r into Ux=𝜌 • Row 3 Multiplying 𝒂 𝟑 (-1) in Row 1 and eliminating 𝒙 𝟐 Row 3 Row 3 −𝑥2 + 3𝑥3 = 7 𝑎3 x Row 2 −𝑥2– 𝛾2 𝑥3 = −𝜌1 Subtracting 3 + 𝛾2 𝑥3 = 7 + 𝜌2 𝑥3 = 7 + 𝜌2 3 + 𝛾2 ⇒ 𝜌3 𝝆3 = 7 + 𝜌2 3 + γ2 = 3.619 ⇒ 𝑥3 = 3.619
  • 14. After Changing Row 3 1 𝛾1 0 0 1 𝛾2 0 0 1 𝑥1 𝑥2 𝑥3 = 𝜌1 𝜌2 𝜌3
  • 15. STAGE II -> Backward Substitution 1 𝛾1 0 0 1 𝛾2 0 0 1 𝑥1 𝑥2 𝑥3 = 𝜌1 𝜌2 𝜌3 Row 2: 𝑥2 + 𝛾2 𝑥3 = 𝜌2 𝑥2 = 𝜌2 − 𝛾2 𝑥3 Substituting 𝜌2 = 2.5 𝛾2 = −0.375 𝑥2 = 3.857
  • 16. STAGE II -> Backward Substitution 1 𝛾1 0 0 1 𝛾2 0 0 1 𝑥1 𝑥2 𝑥3 = 𝜌1 𝜌2 𝜌3 Row 1: 𝑥1 + 𝛾1 𝑥2 = 𝜌1 𝑥1 = 𝜌1 − 𝛾1 𝑥2 Substituting 𝜌1 = −0.333 𝛾1 = −0.333 𝑥1 = 0.952
  • 17. SOLUTION 𝑥1 = 0.952 𝑥2 = 3.857 𝑥3 = 3.619
  • 18. Why Thomas Algorithm is used ? • This type of computation is quick. • Tridiagonal system of equations are most common. • Even most of them convert the general system of equations to tridiagonal system of equations. • It’s importance is clearly visible with a large number of unknowns.
  • 19. Limitations of Thomas Algorithm • Algorithm is unstable when 𝑏𝑖 − 𝑎𝑖 𝛾𝑖−1 = 0 • This occurs if the tridiagonal matrix is singular and in some cases non-singular also. Singular Matrix (Determinant is Zero) (*Square Matrix) (It doesn’t have a Inverse) Non-Singular Matrix (Determinant is Non-Zero) (*Square Matrix) (It has a Inverse)
  • 20. Condition for algorithm to be stable 𝑏𝑖 > 𝑎𝑖 + 𝐶𝑖 for every i. What can be done when the algorithm is numerically unstable..?? Pivoting of matrix