Math 2.0

Numerical analysis Direct methods for linear systems Theorem

Tridiagonal matrix algorithm

Builds on Tridiagonal matrixDiagonally dominant matrixGaussian eliminationLU decompositionBack substitutionSystem of linear equations

Statement

Let n≥2n \ge 2 and consider the linear system aixi−1+bixi+cixi+1=di,i=1,…,n,a_i x_{i-1} + b_i x_i + c_i x_{i+1} = d_i, \qquad i = 1, \dots, n, with real or complex coefficients, a1=0a_1 = 0 and cn=0c_n = 0, whose matrix AA is tridiagonal. Assume that AA is strictly diagonally dominant by rows: ∣bi∣>∣ai∣+∣ci∣\abs{b_i} > \abs{a_i} + \abs{c_i} for all ii. The tridiagonal matrix algorithm (or Thomas algorithm) computes c1′=c1b1,d1′=d1b1,ci′=cibi−aici−1′,di′=di−aidi−1′bi−aici−1′(i=2,…,n),c'_1 = \frac{c_1}{b_1}, \quad d'_1 = \frac{d_1}{b_1}, \qquad c'_i = \frac{c_i}{b_i - a_i c'_{i-1}}, \quad d'_i = \frac{d_i - a_i d'_{i-1}}{b_i - a_i c'_{i-1}} \quad (i = 2, \dots, n), and then xn=dn′,xi=di′−ci′xi+1(i=n−1,…,1).x_n = d'_n, \qquad x_i = d'_i - c'_i x_{i+1} \quad (i = n - 1, \dots, 1). Then every denominator bi−aici−1′b_i - a_i c'_{i-1} is nonzero, ∣ci′∣<1\abs{c'_i} < 1 for all ii, and (x1,…,xn)(x_1, \dots, x_n) is the unique solution of the system. The algorithm uses O(n)O(n) arithmetic operations.

Remarks

The proof is an induction on ii. If ∣ci−1′∣<1\abs{c'_{i-1}} < 1, then ∣bi−aici−1′∣≥∣bi∣−∣ai∣>∣ci∣≥0\abs{b_i - a_i c'_{i-1}} \ge \abs{b_i} - \abs{a_i} > \abs{c_i} \ge 0, so the denominator is nonzero and ∣ci′∣<1\abs{c'_i} < 1. The forward sweep is Gaussian elimination without pivoting, which keeps the tridiagonal shape, and it computes the LU decomposition of AA with bidiagonal factors; the second sweep is back substitution. For diagonally dominant or symmetric positive definite matrices, the algorithm is also numerically stable. Without such a hypothesis a denominator can vanish even when AA is invertible: for b1=0b_1 = 0, c1=1c_1 = 1, a2=1a_2 = 1, b2=0b_2 = 0, the matrix (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} is invertible but the first step divides by 00. Example: the system 2x1−x2=12x_1 - x_2 = 1, −x1+2x2=1-x_1 + 2x_2 = 1 is diagonally dominant by rows; the algorithm gives c1′=−1/2c'_1 = -1/2, d1′=1/2d'_1 = 1/2, d2′=(1+1/2)/(2−1/2)=1d'_2 = (1 + 1/2)/(2 - 1/2) = 1, so x2=1x_2 = 1 and x1=1/2+1/2=1x_1 = 1/2 + 1/2 = 1.

Going deeper

For a student

The algorithm is Gaussian elimination specialized to tridiagonal matrices, with no fill-in and no pivoting. Strict diagonal dominance is a simple condition that guarantees it never divides by zero. The finite difference matrix of −u′′=f-u'' = f, with rows (−1,2,−1)(-1, 2, -1), is only weakly diagonally dominant, but it is symmetric positive definite, and the algorithm works for it too. For tridiagonal systems that are not diagonally dominant, one uses Gaussian elimination with partial pivoting on the band instead.

Reading path

To understand this page from the ground up, read these 7 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Back substitution concept
  2. Diagonally dominant matrix concept
  3. Gaussian elimination concept
  4. LU decomposition concept
  5. System of linear equations concept
  6. Tridiagonal matrix concept
  7. Tridiagonal matrix algorithm statement

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm
About this page
TagF1QWA1PEQQ
URIm2://F1QWA1PEQQ
Kindstatement, theorem
WritingW0 stub
MSC65F05
StatusThis copy of the site has no build data. Run m2 status F1QWA1PEQQ.
AboutTridiagonal matrix, System of linear equations
UsesTridiagonal matrix, Diagonally dominant matrix, Gaussian elimination, LU decomposition, Back substitution, System of linear equations
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by