Skip to content

Commit c10b79f

Browse files
committed
v1.0.0
1 parent 7eb0b3c commit c10b79f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# TDMA (Tridiagonal matrix algorithm)
22
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
3+
34
![Equations](docs/1.svg)
5+
46
where ![Equations](docs/2.svg) and ![Equations](docs/3.svg).
7+
58
![Equations](docs/4.svg)
69

710
## Install
@@ -42,16 +45,27 @@ console.log(answer);
4245

4346
## Method
4447
The forward sweep consists of modifying the coefficients as follows, denoting the new coefficients with primes:
48+
4549
![Equations](docs/5.svg)
50+
4651
and
52+
4753
![Equations](docs/6.svg)
54+
4855
The solution is then obtained by back substitution:
56+
4957
![Equations](docs/7.svg)
58+
5059
![Equations](docs/8.svg)
60+
5161
The method above preserves the original coefficient vectors. If this is not required, then a much simpler form of the algorithm is
62+
5263
![Equations](docs/9.svg)
64+
5365
followed by the back substitution
66+
5467
![Equations](docs/10.svg)
68+
5569
![Equations](docs/11.svg)
5670

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

0 commit comments

Comments
 (0)