F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06QXF

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

F06QXF applies a sequence of plane rotations to a real rectangular matrix.

## 2  Specification

 SUBROUTINE F06QXF ( SIDE, PIVOT, DIRECT, M, N, K1, K2, C, S, A, LDA)
 INTEGER M, N, K1, K2, LDA REAL (KIND=nag_wp) C(K2-1), S(K2-1), A(LDA,*) CHARACTER(1) SIDE, PIVOT, DIRECT

## 3  Description

F06QXF performs the transformation
 $A←PA or A←APT ,$
where $A$ is an $m$ by $n$ real matrix and $P$ is a real orthogonal 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 sk -sk ck .$

None.

## 5  Parameters

1:     SIDE – CHARACTER(1)Input
On entry: specifies whether $A$ is operated on from the left or the right.
${\mathbf{SIDE}}=\text{'L'}$
$A$ is pre-multiplied from the left.
${\mathbf{SIDE}}=\text{'R'}$
$A$ is post-multiplied from the right.
Constraint: ${\mathbf{SIDE}}=\text{'L'}$ or $\text{'R'}$.
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:     M – INTEGERInput
On entry: $m$, the number of rows of the matrix $A$.
If ${\mathbf{M}}<1$, an immediate return is effected.
Constraint: ${\mathbf{M}}\ge 0$.
5:     N – INTEGERInput
On entry: $n$, the number of columns of the matrix $A$.
If ${\mathbf{N}}<1$, an immediate return is effected.
Constraint: ${\mathbf{N}}\ge 0$.
6:     K1 – INTEGERInput
7:     K2 – INTEGERInput
On entry: the values ${k}_{1}$ and ${k}_{2}$.
If ${\mathbf{K1}}<1$ or ${\mathbf{K2}}\le {\mathbf{K1}}$, or ${\mathbf{SIDE}}=\text{'L'}$ and ${\mathbf{K2}}>{\mathbf{M}}$, or ${\mathbf{SIDE}}=\text{'R'}$ and ${\mathbf{K2}}>{\mathbf{N}}$, an immediate return is effected.
8:     C(${\mathbf{K2}}-1$) – REAL (KIND=nag_wp) arrayInput
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$.
9:     S(${\mathbf{K2}}-1$) – REAL (KIND=nag_wp) arrayInput
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$.
10:   A(LDA,$*$) – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array A must be at least ${\mathbf{N}}$.
On entry: the $m$ by $n$ matrix $A$.
On exit: the transformed matrix $A$.
11:   LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06QXF is called.
Constraint: ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.

None.

Not applicable.