Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
armancodv committed Sep 30, 2019
1 parent 7eb0b3c commit c10b79f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# TDMA (Tridiagonal matrix algorithm)
In numerical linear algebra, the tridiagonal matrix algorithm, also known as the Thomas algorithm (named after Llewellyn Thomas), is a simplified form of Gaussian elimination that can be used to solve tridiagonal systems of equations. A tridiagonal system for n unknowns may be written as

![Equations](docs/1.svg)

where ![Equations](docs/2.svg) and ![Equations](docs/3.svg).

![Equations](docs/4.svg)

## Install
Expand Down Expand Up @@ -42,16 +45,27 @@ console.log(answer);

## Method
The forward sweep consists of modifying the coefficients as follows, denoting the new coefficients with primes:

![Equations](docs/5.svg)

and

![Equations](docs/6.svg)

The solution is then obtained by back substitution:

![Equations](docs/7.svg)

![Equations](docs/8.svg)

The method above preserves the original coefficient vectors. If this is not required, then a much simpler form of the algorithm is

![Equations](docs/9.svg)

followed by the back substitution

![Equations](docs/10.svg)

![Equations](docs/11.svg)

Reference: https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm

0 comments on commit c10b79f

Please sign in to comment.