Thomas algorithm to solve tridiagonal matrices

Slides:



Advertisements
Similar presentations
Chapter: 3c System of Linear Equations
Advertisements

Linear Systems LU Factorization CSE 541 Roger Crawfis.
Linear Systems of Equations
Solving Linear Systems (Numerical Recipes, Chap 2)
Numerical Analysis – Linear Equations(I) Hanyang University Jong-Il Park.
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Iterative Methods and QR Factorization Lecture 5 Alessandra Nardi Thanks to Prof. Jacob White, Suvranu De, Deepak Ramaswamy, Michal Rewienski, and Karen.
Modern iterative methods For basic iterative methods, converge linearly Modern iterative methods, converge faster –Krylov subspace method Steepest descent.
Solution of linear system of equations
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 3 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
Lecture 11 - LU Decomposition
Part 3 Chapter 10 LU Factorization PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies,
LU method 1) factor (decompose) A into L and U 2) given b, determine d 3) using Ux=d and backsubstitution, solve for x Advantage: Once you have L and U,
Special Matrices and Gauss-Siedel
Chapter 10 LU Decomposition.
Iterative methods for solving matrix equations 1. Jacobi 2. Gauss-Seidel 3. Successive overrelaxation (SOR) Idea behind iterative methods: Convert Ax=b.
1 Systems of Linear Equations Iterative Methods. 2 B. Direct Methods 1.Jacobi method and Gauss Seidel 2.Relaxation method for iterative methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
Special Matrices and Gauss-Siedel
ECIV 520 Structural Analysis II Review of Matrix Algebra.
Ordinary least squares regression (OLS)
1 Systems of Linear Equations (Optional) Special Matrices.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Iterative Methods for Solving Linear Systems of Equations ( part of the course given for the 2 nd grade at BGU, ME )
PETE 603 Lecture Session #28 Tuesday, 7/27/ Direct/Iterative Methods Iterative methods (systems of linear equations) –Computer time increases.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Chapter 8 Objectives Understanding matrix notation.
ITERATIVE TECHNIQUES FOR SOLVING NON-LINEAR SYSTEMS (AND LINEAR SYSTEMS)
Scientific Computing Linear Systems – LU Factorization.
Systems of Linear Equations Iterative Methods
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Solving Scalar Linear Systems Iterative approach Lecture 15 MA/CS 471 Fall 2003.
Iterative Methods for Solving Linear Systems Leo Magallon & Morgan Ulloa.
1 Iterative Solution Methods Starts with an initial approximation for the solution vector (x 0 ) At each iteration updates the x vector by using the sytem.
Introduction to Numerical Analysis I MATH/CMPSC 455 PA=LU.
Scientific Computing Partial Differential Equations Poisson Equation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 11.
Linear Systems Iterative Solutions CSE 541 Roger Crawfis.
Lecture 7 - Systems of Equations CVEN 302 June 17, 2002.
Elliptic PDEs and the Finite Difference Method
Lesson 3 CSPP58001.
Linear Systems – Iterative methods
Introduction to Scientific Computing II Overview Michael Bader.
Lecture 10 - Nonlinear gradient techniques and LU Decomposition CVEN 302 June 24, 2002.
1 Chapter 7 Numerical Methods for the Solution of Systems of Equations.
Linear Systems Numerical Methods. 2 Jacobi Iterative Method Choose an initial guess (i.e. all zeros) and Iterate until the equality is satisfied. No guarantee.
Gaoal of Chapter 2 To develop direct or iterative methods to solve linear systems Useful Words upper/lower triangular; back/forward substitution; coefficient;
3/6/ Gauss-Siedel Method Major: All Engineering Majors Author: دکتر ابوالفضل رنجبر نوعی
Implicit approximation can be solved using: Point iteration (G/S, SOR) Direct (matrix) solution Combination of matrix soln and iteration (used in MODFLOW)
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
4.1 An Introduction to Matrices Katie Montella Mod. 6 5/25/07.
Sinwook Lee Digital Media Lab. HYU.  Linear Equations  To gain the appropriate solution, 1..n of equations are necessary.  The num of equations < n.
Lecture 9 Numerical Analysis. Solution of Linear System of Equations Chapter 3.
Numerical Computation Lecture 6: Linear Systems – part II United International College.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
LU Decomposition ● In Gauss elimination; Forward elimination Backward substitution Major computational effort Low computational effort can be used for.
Iterative Solution Methods
Chapter: 3c System of Linear Equations
Solving Systems of Linear Equations: Iterative Methods
Numerical Analysis Lecture12.
Linear Equations.
Linear Algebra Lecture 15.
RECORD. RECORD Gaussian Elimination: derived system back-substitution.
Metode Eliminasi Pertemuan – 4, 5, 6 Mata Kuliah : Analisis Numerik
Part 3 Chapter 10 LU Factorization
Numerical Analysis Lecture10.
Chapter 11 Chapter 11.
The Gauss Jordan method
Ax = b Methods for Solution of the System of Equations:
Ax = b Methods for Solution of the System of Equations (ReCap):
Presentation transcript:

Thomas algorithm to solve tridiagonal matrices

Basically sets up an LU decomposition three parts 1) decomposition 2) forward substitution 3) backward substitution

1) decomposition loop from rows 2 to n ai = ai/bi-1 bi = bi-ai*ci-1 end loop 2) forward substitution loop from 2 to n ri = ri - ai*ri-1

3) back substitution xn = rn/bn loop from n-1 to 1 xi = (ri-ci*xi+1)/bi end loop

Example First decompose T

loop from rows 2 to 5 ai = ai/bi-1 bi = bi-ai*ci-1 end loop

forward substitution loop from 2 to n ri = ri - ai*ri-1 end loop

back substitution xn = rn/bn loop from n-1 to 1 xi = (ri-ci*xi+1)/bi end loop

Crout algorithm - alternate LU decomposition Instead of 1’s on diagonal of L, get 1’s on diagonal of U Operate on rows and columns sequentially, narrowing down to single element

Algorithm for j=2 to n-1 For j=n

Cholesky decomposition A decomposition for symmetric matrices Symmetric matrix e.g. a covariance matrix

For symmetric matrices, can write Can develop relationships for l

Example: 1st row Skip this equation

Row 2

Row 3

Row 4

Iterative methods for solving matrix equations 1. Jacobi 2. Gauss-Seidel 3. Successive overrelaxation (SOR) Idea behind iterative methods: Convert Ax=b into Cx=d, which has sequence of approximations x(1), x(2), … with

What are C and d? Recall from fixed-point iteration

Rewrite matrix equation in same way becomes

Then

Jacobi method is like fixed point iteration Example: Shape of a stretched membrane

Shape can be described by potential function Let us give some boundary conditions

Problem look likes this Solve for u’s

Leads to this system of equations

Choose an initial u=[1 1 1 1 …1]’ Iterate using x=Cx+d

Matlab solution, 49 iterations

Gauss-Seidel method differs from Jacobi by sequential updating - use new xi’s as they become available

Example: Jacobi Gauss-Seidel