Tridiagonal matrix

From testwiki
Revision as of 23:25, 25 February 2025 by imported>Tc14Hd (Properties: Changed capitalization)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description In linear algebra, a tridiagonal matrix is a band matrix that has nonzero elements only on the main diagonal, the subdiagonal/lower diagonal (the first diagonal below this), and the supradiagonal/upper diagonal (the first diagonal above the main diagonal). For example, the following matrix is tridiagonal:

(1400341002340013).

The determinant of a tridiagonal matrix is given by the continuant of its elements.[1]

An orthogonal transformation of a symmetric (or Hermitian) matrix to tridiagonal form can be done with the Lanczos algorithm.

Properties

A tridiagonal matrix is a matrix that is both upper and lower Hessenberg matrix.[2] In particular, a tridiagonal matrix is a direct sum of p 1-by-1 and q 2-by-2 matrices such that Template:Nowrap — the dimension of the tridiagonal. Although a general tridiagonal matrix is not necessarily symmetric or Hermitian, many of those that arise when solving linear algebra problems have one of these properties. Furthermore, if a real tridiagonal matrix A satisfies ak,k+1 ak+1,k > 0 for all k, so that the signs of its entries are symmetric, then it is similar to a Hermitian matrix, by a diagonal change of basis matrix. Hence, its eigenvalues are real. If we replace the strict inequality by ak,k+1 ak+1,k ≥ 0, then by continuity, the eigenvalues are still guaranteed to be real, but the matrix need no longer be similar to a Hermitian matrix.[3]

The set of all n × n tridiagonal matrices forms a 3n-2 dimensional vector space.

Many linear algebra algorithms require significantly less computational effort when applied to diagonal matrices, and this improvement often carries over to tridiagonal matrices as well.

Determinant

Template:Main The determinant of a tridiagonal matrix A of order n can be computed from a three-term recurrence relation.[4] Write f1 = |a1| = a1 (i.e., f1 is the determinant of the 1 by 1 matrix consisting only of a1), and let

fn=|a1b1c1a2b2c2bn1cn1an|.

The sequence (fi) is called the continuant and satisfies the recurrence relation

fn=anfn1cn1bn1fn2

with initial values f0 = 1 and f−1 = 0. The cost of computing the determinant of a tridiagonal matrix using this formula is linear in n, while the cost is cubic for a general matrix.

Inversion

The inverse of a non-singular tridiagonal matrix T

T=(a1b1c1a2b2c2bn1cn1an)

is given by

(T1)ij={(1)i+jbibj1θi1ϕj+1/θn if i<jθi1ϕj+1/θn if i=j(1)i+jcjci1θj1ϕi+1/θn if i>j

where the θi satisfy the recurrence relation

θi=aiθi1bi1ci1θi2i=2,3,,n

with initial conditions θ0 = 1, θ1 = a1 and the ϕi satisfy

ϕi=aiϕi+1biciϕi+2i=n1,,1

with initial conditions ϕn+1 = 1 and ϕn = an.[5][6]

Closed form solutions can be computed for special cases such as symmetric matrices with all diagonal and off-diagonal elements equal[7] or Toeplitz matrices[8] and for the general case as well.[9][10]

In general, the inverse of a tridiagonal matrix is a semiseparable matrix and vice versa.[11] The inverse of a symmetric tridiagonal matrix can be written as a single-pair matrix (a.k.a. generator-representable semiseparable matrix) of the form[12][13]

(α1β1β1α2β2βn1βn1αn)1=(a1b1a1b2a1bna1b2a2b2a2bna1bna2bnanbn)=(amin(i,j)bmax(i,j))

where {ai=βiβn1δiδnbnbi=β1βi1d1di with {dn=αn,di1=αi1βi12di,i=n,n1,,2,δ1=α1,δi+1=αi+1βi2δi,i=1,2,,n1.

Solution of linear system

Template:Main A system of equations Ax = b for bn can be solved by an efficient form of Gaussian elimination when A is tridiagonal called tridiagonal matrix algorithm, requiring O(n) operations.[14]

Eigenvalues

When a tridiagonal matrix is also Toeplitz, there is a simple closed-form solution for its eigenvalues, namely:[15][16]

a2bccos(kπn+1),k=1,,n.

A real symmetric tridiagonal matrix has real eigenvalues, and all the eigenvalues are distinct (simple) if all off-diagonal elements are nonzero.[17] Numerous methods exist for the numerical computation of the eigenvalues of a real symmetric tridiagonal matrix to arbitrary finite precision, typically requiring O(n2) operations for a matrix of size n×n, although fast algorithms exist which (without parallel computation) require only O(nlogn).[18]

As a side note, an unreduced symmetric tridiagonal matrix is a matrix containing non-zero off-diagonal elements of the tridiagonal, where the eigenvalues are distinct while the eigenvectors are unique up to a scale factor and are mutually orthogonal.[19]

Similarity to symmetric tridiagonal matrix

For unsymmetric or nonsymmetric tridiagonal matrices one can compute the eigendecomposition using a similarity transformation. Given a real tridiagonal, nonsymmetric matrix

T=(a1b1c1a2b2c2bn1cn1an)

where bici. Assume that each product of off-diagonal entries is Template:Em positive bici>0 and define a transformation matrix D by[20]

D:=diag(δ1,,δn)forδi:={1,i=1ci1c1bi1b1,i=2,,n.

The similarity transformation D1TD yields a symmetric tridiagonal matrix J by:[21][20]

J:=D1TD=(a1sgnb1b1c1sgnb1b1c1a2sgnb2b2c2sgnb2b2c2sgnbn1bn1cn1sgnbn1bn1cn1an).

Note that T and J have the same eigenvalues.

Computer programming

A transformation that reduces a general matrix to Hessenberg form will reduce a Hermitian matrix to tridiagonal form. So, many eigenvalue algorithms, when applied to a Hermitian matrix, reduce the input Hermitian matrix to (symmetric real) tridiagonal form as a first step.[22]

A tridiagonal matrix can also be stored more efficiently than a general matrix by using a special storage scheme. For instance, the LAPACK Fortran package stores an unsymmetric tridiagonal matrix of order n in three one-dimensional arrays, one of length n containing the diagonal elements, and two of length n − 1 containing the subdiagonal and superdiagonal elements.

Applications

The discretization in space of the one-dimensional diffusion or heat equation

u(t,x)t=α2u(t,x)x2

using second order central finite differences results in

(u1(t)tu2(t)tuN(t)t)=αΔx2(2100121001210012)(u1(t)u2(t)uN(t))

with discretization constant Δx. The matrix is tridiagonal with ai=2 and bi=ci=1. Note: no boundary conditions are used here.

See also

Notes

Template:Matrix classes