# ?opgtr

Generates the real orthogonal matrix Q determined by ?sptrd.

## Syntax

FORTRAN 77:

call sopgtr(uplo, n, ap, tau, q, ldq, work, info)

call dopgtr(uplo, n, ap, tau, q, ldq, work, info)

Fortran 95:

call opgtr(a, tau, q [,uplo] [,info])

## Description

The routine explicitly generates the n-by-n orthogonal matrix Q formed by ?sptrd when reducing a packed real symmetric matrix A to tridiagonal form: `A = Q*T*QT`. Use this routine after a call to ?sptrd.

## Input Parameters

uplo

  CHARACTER*1. Must be 'U' or 'L'. Use the same uplo as supplied to ?sptrd.

n

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

ap, tau

  REAL for sopgtr

  DOUBLE PRECISION for dopgtr.

  Arrays ap and tau, as returned by ?sptrd.

  The dimension of ap must be at least max(1, n(n+1)/2).

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

ldq

  INTEGER. The first dimension of the output array q; at least max(1, n).

work

  REAL for sopgtr

  DOUBLE PRECISION for dopgtr.

  Workspace array, DIMENSION at least max(1, n-1).

## Output Parameters

q

  REAL for sopgtr

  DOUBLE PRECISION for dopgtr.

  Array, DIMENSION (ldq,*).

  Contains the computed matrix Q.

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

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 opgtr 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).

q

  Holds the matrix Q of size (n,n).

uplo

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

## Application Notes

The computed matrix Q differs from an exactly orthogonal matrix by a matrix E such that `||E||2 = O(ε)`, where ε is the machine precision.

The approximate number of floating-point operations is `(4/3)n3`.

The complex counterpart of this routine is ?upgtr.

Parent topic: Symmetric Eigenvalue Problems