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

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

Updated 17 Apr 2022

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 (2022). Tridiagonal Matrix Algorithm (Thomas Alg.) (tridiagonal) (https://github.com/tamaskis/tridiagonal-MATLAB/releases/tag/v5.1.0), GitHub. Retrieved .

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