Function Repository Resource:

# TridiagonalInverse

Evaluate the inverse of a tridiagonal matrix

Contributed by: Jan Mangaldan
 ResourceFunction["TridiagonalInverse"][a,b,c] gives the inverse of the tridiagonal matrix with subdiagonal a, diagonal b and superdiagonal c.

## Examples

### Basic Examples (2)

The inverse of a 3×3 tridiagonal matrix:

 In[1]:=
 Out[1]=

Multiply with the original tridiagonal matrix:

 In[2]:=
 Out[2]=

### Scope (1)

TridiagonalInverse can be used with numerical entries:

 In[3]:=
 Out[3]=
 In[4]:=
 Out[4]=

### Applications (2)

Construct a natural cubic spline interpolant to data:

 In[5]:=
 Out[5]=

Plot the interpolant along with the data:

 In[6]:=
 Out[6]=

Approximately solve the boundary value problem u{XMLElement[span, {class -> stylebox}, {x, XMLElement[i, {class -> ti}, {x}]}]}+u=f;u(0)=u(1)=0:

 In[7]:=
 Out[7]=

Show the error compared with the exact solution:

 In[8]:=
 Out[8]=

### Properties and Relations (1)

TridiagonalInverse can be faster than using Inverse on a tridiagonal matrix constructed with SparseArray and Band:

 In[9]:=
 In[10]:=
 Out[10]=

## Version History

• 1.0.0 – 21 June 2021