F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06TMF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06TMF performs a Unitary similarity transformation (as a sequence of plane rotations) of a complex Hermitian matrix.

## 2  Specification

 SUBROUTINE F06TMF ( UPLO, PIVOT, DIRECT, N, K1, K2, C, S, A, LDA)
 INTEGER N, K1, K2, LDA REAL (KIND=nag_wp) C(*) COMPLEX (KIND=nag_wp) S(*), A(LDA,*) CHARACTER(1) UPLO, PIVOT, DIRECT

## 3  Description

F06TMF performs the transformation
 $A←PAPH$
where $A$ is an $n$ by $n$ complex Hermitian matrix, and $P$ is a complex unitary matrix defined as a sequence of plane rotations, ${P}_{k}$, applied in planes ${k}_{1}$ to ${k}_{2}$.
The $2$ by $2$ plane rotation part of ${P}_{k}$ is assumed to have the form
 $ck s-k -sk ck$
with ${c}_{k}$ real.

None.

## 5  Parameters

1:     UPLO – CHARACTER(1)Input
On entry: specifies whether the upper or lower triangular part of $A$ is stored.
${\mathbf{UPLO}}=\text{'U'}$
The upper triangular part of $A$ is stored.
${\mathbf{UPLO}}=\text{'L'}$
The lower triangular part of $A$ is stored.
Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$.
2:     PIVOT – CHARACTER(1)Input
On entry: specifies the plane rotated by ${P}_{k}$.
${\mathbf{PIVOT}}=\text{'V'}$ (variable pivot)
${P}_{k}$ rotates the $\left(k,k+1\right)$ plane.
${\mathbf{PIVOT}}=\text{'T'}$ (top pivot)
${P}_{k}$ rotates the $\left({k}_{1},k+1\right)$ plane.
${\mathbf{PIVOT}}=\text{'B'}$ (bottom pivot)
${P}_{k}$ rotates the $\left(k,{k}_{2}\right)$ plane.
Constraint: ${\mathbf{PIVOT}}=\text{'V'}$, $\text{'T'}$ or $\text{'B'}$.
3:     DIRECT – CHARACTER(1)Input
On entry: specifies the sequence direction.
${\mathbf{DIRECT}}=\text{'F'}$ (forward sequence)
$P={P}_{{k}_{2}-1}\cdots {P}_{{k}_{1}+1}{P}_{{k}_{1}}$.
${\mathbf{DIRECT}}=\text{'B'}$ (backward sequence)
$P={P}_{{k}_{1}}{P}_{{k}_{1}+1}\cdots {P}_{{k}_{2}-1}$.
Constraint: ${\mathbf{DIRECT}}=\text{'F'}$ or $\text{'B'}$.
4:     N – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
5:     K1 – INTEGERInput
6:     K2 – INTEGERInput
On entry: the values ${k}_{1}$ and ${k}_{2}$.
If ${\mathbf{K1}}<1$ or ${\mathbf{K2}}\le {\mathbf{K1}}$ or ${\mathbf{K2}}>{\mathbf{N}}$, an immediate return is effected.
7:     C($*$) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array C must be at least ${\mathbf{K2}}-{\mathbf{K1}}$.
On entry: ${\mathbf{C}}\left(\mathit{k}\right)$ must hold ${c}_{\mathit{k}}$, the cosine of the rotation ${P}_{\mathit{k}}$, for $\mathit{k}={\mathit{k}}_{1},\dots ,{\mathit{k}}_{2}-1$.
8:     S($*$) – COMPLEX (KIND=nag_wp) arrayInput
Note: the dimension of the array S must be at least ${\mathbf{K2}}-{\mathbf{K1}}$.
On entry: ${\mathbf{S}}\left(\mathit{k}\right)$ must hold ${s}_{\mathit{k}}$, the sine of the rotation ${P}_{\mathit{k}}$, for $\mathit{k}={\mathit{k}}_{1},\dots ,{\mathit{k}}_{2}-1$.
9:     A(LDA,$*$) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array A must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the $n$ by $n$ Hermitian matrix $A$.
• If ${\mathbf{UPLO}}=\text{'U'}$, the upper triangular part of $A$ must be stored and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{UPLO}}=\text{'L'}$, the lower triangular part of $A$ must be stored and the elements of the array above the diagonal are not referenced.
On exit: the transformed matrix $A$. The imaginary parts of the diagonal elements are set to zero.
10:   LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06TMF is called.
Constraint: ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.

None.

Not applicable.