## Tridiagonal Matrix Algorithm (Thomas Alg.) (tridiagonal)

version 4.0.0 (228 KB) by
Solves the tridiagonal linear system Ax=d for x using the tridiagonal matrix algorithm (i.e. the Thomas algorithm).

Updated 29 Aug 2021

From GitHub

# tridiagonal

Solves the tridiagonal linear system for using the tridiagonal matrix algorithm (i.e. the Thomas algorithm).

## Syntax

x = tridiagonal(A,d)

## Description

x = tridiagonal(A,d) solves the tridiagonal linear system for , where is a tridiagonal matrix and .

## Tridiagonal Matrix Convention

For this implementation, I use the following convention for denoting the elements of the tridiagonal matrix :

Most other references have 's ranging from to both in the definition of the tridiagonal matrix and in the algorithm used to solve the corresponding linear system. In this implementation, I have the 's ranging from to ; this makes the algorithm slightly more straightforward to implement.

### Cite As

Tamas Kis (2021). Tridiagonal Matrix Algorithm (Thomas Alg.) (tridiagonal) (https://github.com/tamaskis/tridiagonal-MATLAB/releases/tag/v4.0.0), GitHub. Retrieved .

##### MATLAB Release Compatibility
Created with R2021a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux