# ?sptrd

Reduces a real symmetric matrix to tridiagonal form using packed storage.

## Syntax

FORTRAN 77:

call ssptrd(uplo, n, ap, d, e, tau, info)

call dsptrd(uplo, n, ap, d, e, tau, info)

Fortran 95:

call sptrd(a, tau [,uplo] [,info])

## Description

This routine reduces a packed real symmetric matrix A to symmetric tridiagonal form T by an orthogonal similarity transformation: `A = Q*T*QT`. The orthogonal matrix Q is not formed explicitly but is represented as a product of n-1 elementary reflectors. Routines are provided for working with Q in this representation (see Application Notes below).

## Input Parameters

uplo

  CHARACTER*1. Must be 'U' or 'L'.

  If `uplo = 'U'`, ap stores the packed upper triangle of A.

  If `uplo = 'L'`, ap stores the packed lower triangle of A.

n

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

ap

  REAL for ssptrd

  DOUBLE PRECISION for dsptrd.

  Array, DIMENSION at least max(1, n(n+1)/2). Contains either upper or lower triangle of A (as specified by uplo) in packed form.

## Output Parameters

ap

  Overwritten by the tridiagonal matrix T and details of the orthogonal matrix Q, as specified by uplo.

d, e, tau

  REAL for ssptrd

  DOUBLE PRECISION for dsptrd.

  Arrays:

  d(*) contains the diagonal elements of the matrix T.

  The dimension of d must be at least max(1, n).

  e(*) contains the off-diagonal elements of T.

  The dimension of e must be at least max(1, n-1).

  tau(*) stores further details of the matrix Q.

  The dimension of tau must be at least max(1, n-1).

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 restorable arguments, see Fortran 95 Interface Conventions.

Specific details for the routine sptrd interface are the following:

a

  Stands for argument ap in Fortan 77 interface. Holds the array A of size (n*(n+1)/2).

tau

  Holds the vector of length (n-1).

d

  Holds the vector of length (n).

e

  Holds the vector of length (n-1).

uplo

  Must be 'U' or 'L'. The default value is 'U'.

## Application Notes

The computed matrix T is exactly similar to a matrix `A+E`, where ``||E||2 = c(n)*ε*||A||2``, `c(n)` is a modestly increasing function of n, and ε is the machine precision. The approximate number of floating-point operations is `(4/3)n3`.

After calling this routine, you can call the following:

?opgtr

  to form the computed matrix Q explicitly

?opmtr

  to multiply a real matrix by Q.

The complex counterpart of this routine is ?hptrd.

Parent topic: Symmetric Eigenvalue Problems