# ?ptsv

Computes the solution to the system of linear equations with a symmetric or Hermitian positive definite tridiagonal matrix A and multiple right-hand sides.

## Syntax

FORTRAN 77:

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

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

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

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

Fortran 95:

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

## Description

This routine solves for X the real or complex system of linear equations `A*X = B`, where A is an n-by-n symmetric/Hermitian positive-definite tridiagonal matrix, the columns of matrix B are individual right-hand sides, and the columns of X are the corresponding solutions.

A is factored as `A = L*D*LT` (real flavors) or `A = L*D*LH` (complex flavors), and the factored form of A is then used to solve the system of equations `A*X = B`.

## Input Parameters

n

  INTEGER. The order of matrix A; n ≥ 0.

nrhs

  INTEGER. The number of right-hand sides, the number of columns in `B; nrhs ≥ 0`.

d

  REAL for single precision flavors

  DOUBLE PRECISION for double precision flavors.

  Array, dimension at least `max(1, n)`. Contains the diagonal elements of the tridiagonal matrix A.

e, b

  REAL for sptsv

  DOUBLE PRECISION for dptsv

  COMPLEX for cptsv

  DOUBLE COMPLEX for zptsv.

  Arrays: `e(n - 1)` , `b(ldb,*)`. The array e contains the `(n - 1)` subdiagonal elements of A.

  The array b contains the matrix B whose columns are the right-hand sides for the systems of equations. The second dimension of b must be at least `max(1,nrhs)`.

ldb

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

## Output Parameters

d

  Overwritten by the n diagonal elements of the diagonal matrix D from the `L*D*LT` (real)/ `L*D*LH` (complex) factorization of A.

e

  Overwritten by the `(n - 1)` subdiagonal elements of the unit bidiagonal factor L from the factorization of A.

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.

  If `info = i`, the leading minor of order i (and therefore the matrix A itself) is not positive-definite, and the solution has not been computed. The factorization has not been completed unless `i = n`.

## 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 ptsv 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`).

Parent topic: Driver Routines