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

Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method Bhavik Vashi
 
Gauss elimination method
Gauss elimination methodGauss elimination method
Gauss elimination methodgilandio
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadraturesTarun Gehlot
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.Abu Kaisar
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative methodLuckshay Batra
 
Beta & Gamma Functions
Beta & Gamma FunctionsBeta & Gamma Functions
Beta & Gamma FunctionsDrDeepaChauhan
 
classification of second order partial differential equation
classification of second order partial differential equationclassification of second order partial differential equation
classification of second order partial differential equationjigar methaniya
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Syed Ahmed Zaki
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodNaimesh Bhavsar
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite differenceManthan Chavda
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward differenceRaj Parekh
 
Numerical differentiation
Numerical differentiationNumerical differentiation
Numerical differentiationandrushow
 
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
Runge  kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...Runge  kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...Prashant Goad
 

What's hot (20)

Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method
 
Gauss elimination method
Gauss elimination methodGauss elimination method
Gauss elimination method
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadratures
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.
 
1 d wave equation
1 d wave equation1 d wave equation
1 d wave equation
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 
Interpolation
InterpolationInterpolation
Interpolation
 
Beta & Gamma Functions
Beta & Gamma FunctionsBeta & Gamma Functions
Beta & Gamma Functions
 
classification of second order partial differential equation
classification of second order partial differential equationclassification of second order partial differential equation
classification of second order partial differential equation
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan method
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Euler and runge kutta method
Euler and runge kutta methodEuler and runge kutta method
Euler and runge kutta method
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite difference
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward difference
 
Numerical differentiation
Numerical differentiationNumerical differentiation
Numerical differentiation
 
GAUSS ELIMINATION METHOD
 GAUSS ELIMINATION METHOD GAUSS ELIMINATION METHOD
GAUSS ELIMINATION METHOD
 
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
Runge  kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...Runge  kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
Runge kutta method -by Prof.Prashant Goad(R.C.Patel Institute of Technology,...
 
Interpolation Methods
Interpolation MethodsInterpolation Methods
Interpolation Methods
 
Initial Value Problems
Initial Value ProblemsInitial Value Problems
Initial Value Problems
 

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

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
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
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
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
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
(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
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 

Recently uploaded (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
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
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
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
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
(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...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 

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