# ?dttrsv

Solves a general tridiagonal system of linear equations using the LU factorization computed by ?dttrf.

## Syntax

call sdttrsv(uplo, trans, n, nrhs, dl, d, du, b, ldb, info)

call ddttrsv(uplo, trans, n, nrhs, dl, d, du, b, ldb, info)

call cdttrsv(uplo, trans, n, nrhs, dl, d, du, b, ldb, info)

call zdttrsv(uplo, trans, n, nrhs, dl, d, du, b, ldb, info)

## Description

This routine solves one of the following systems of linear equations:

`L*X = B`, `LT*X = B`, or `LH*X = B`,

`U*X = B`, `UT*X = B`, or `UH*X = B`

with factors of the tridiagonal matrix A from the LU factorization computed by ?dttrf.

## Input Parameters

uplo

  CHARACTER*1.

  Specifies whether to solve with L or U.

trans

  CHARACTER. Must be 'N' or 'T' or 'C'.

  Indicates the form of the equations:

  If `trans = 'N'`, then ``A*X=B`` is solved for X (no transpose).

  If `trans = 'T'`, then `AT*X = B` is solved for X (transpose).

  If `trans = 'C'`, then `AH*X = B` is solved for X (conjugate transpose).

n

  INTEGER. The order of the matrix A`(n ≥ 0)`.

nrhs

  INTEGER. The number of right-hand sides, that is, the number of columns in the matrix B`(nrhs ≥ 0)`.

dl,d,du,b

  REAL for sdttrsv

  DOUBLE PRECISION for ddttrsv

  COMPLEX for cdttrsv

  COMPLEX*16 for zdttrsv.

  Arrays of DIMENSIONs: `dl(n -1 )`, `d(n)`, `du(n -1 )`, `b(ldb,nrhs)`.

  The array dl contains the `(n - 1)` multipliers that define the matrix L from the LU factorization of A.

  The array d contains n diagonal elements of the upper triangular matrix U from the LU factorization of A.

  The array du contains the `(n - 1)` elements of the first super-diagonal of U.

  On entry, the array b contains the right-hand side matrix B.

ldb

  INTEGER. The leading dimension of the array b; `ldb ≥ max(1, n)`.

## Output Parameters

b

  Overwritten by the solution matrix X.

info

  INTEGER. If `info=0`, the execution is successful.

  If `info = -i`, the i-th parameter had an illegal value.

Parent topic: Auxiliary Routines