# ?pttrs

Solves a system of linear equations with a symmetric (Hermitian) positive-definite tridiagonal matrix using the factorization computed by ?pttrf.

## Syntax

FORTRAN 77:

call spttrs( n, nrhs, d, e, b, ldb, info )

call dpttrs( n, nrhs, d, e, b, ldb, info )

call cpttrs( uplo, n, nrhs, d, e, b, ldb, info )

call zpttrs( uplo, n, nrhs, d, e, b, ldb, info )

Fortran 95:

call pttrs( d, e, b [,info] )

call pttrs( d, e, b [,uplo] [,info] )

## Description

This routine solves for X a system of linear equations `A*X = B` with a symmetric (Hermitian) positive-definite tridiagonal matrix A. Before calling this routine, call ?pttrf to compute the `L*D*L'` for real data and the `L*D*L'` or `U'*D*U` factorization of A for complex data.

## Input Parameters

uplo

  CHARACTER*1. Used for cpttrs/zpttrs only. Must be 'U' or 'L'.

  Specifies whether the superdiagonal or the subdiagonal of the tridiagonal matrix A is stored and how A is factored:

  If `uplo = 'U'`, the array e stores the superdiagonal of A, and A is factored as `U'*D*U`.

  If `uplo = 'L'`, the array e stores the subdiagonal of A, and A is factored as `L*D*L'`.

n

  INTEGER. The order of A; n ≥ 0.

nrhs

  INTEGER. The number of right-hand sides, that is, the number of columns of the matrix B; nrhs ≥ 0.

d

  REAL for spttrs, cpttrs

  DOUBLE PRECISION for dpttrs, zpttrs.

  Array, dimension (n). Contains the diagonal elements of the diagonal matrix D from the factorization computed by ?pttrf.

e, b

  REAL for spttrs

  DOUBLE PRECISION for dpttrs

  COMPLEX for cpttrs

  DOUBLE COMPLEX for zpttrs.

  Arrays: e(n -1), b(ldb, nrhs).

  The array e contains the (n - 1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by ?pttrf (see uplo).

  The array b contains the matrix B whose columns are the right-hand sides for the systems of equations.

ldb

  INTEGER. The leading dimension of 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.

## Fortran 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their Fortran 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.

Specific details for the routine pttrs interface are as follows:

d

  Holds the vector of length (n).

e

  Holds the vector of length (n-1).

b

  Holds the matrix B of size (n, nrhs).

uplo

  Used in complex flavors only. Must be 'U' or 'L'. The default value is 'U'.

Parent topic: Routines for Solving Systems of Linear Equations