F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06FSF

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

F06FSF generates a real elementary reflection in the LINPACK (as opposed to NAG) style.

## 2  Specification

 SUBROUTINE F06FSF ( N, ALPHA, X, INCX, TOL, Z1)
 INTEGER N, INCX REAL (KIND=nag_wp) ALPHA, X(*), TOL, Z1

## 3  Description

F06FSF generates details of a real elementary reflection (Householder matrix), $P$, such that
 $P α x = β 0$
where $P$ is orthogonal, $\alpha$ and $\beta$ are real scalars, and $x$ is an $n$-element real vector.
$P$ is given in the form
 $P=I-1ζ ζ z ζ zT ,$
where $z$ is an $n$-element real vector and $\zeta$ is a real scalar. (This form is compatible with that used by LINPACK.)
If the elements of $x$ are all zero, or if the elements of $x$ are all less than $\mathit{tol}×\left|\alpha \right|$ in absolute value, then $\zeta$ is set to $0$ and $P$ can be taken to be the unit matrix. Otherwise $\zeta$ always lies in the range $\left(1,2\right)$.
None.

## 5  Parameters

1:     N – INTEGERInput
On entry: $n$, the number of elements in $x$ and $z$.
2:     ALPHA – REAL (KIND=nag_wp)Input/Output
On entry: the scalar $\alpha$.
On exit: the scalar $\beta$.
3:     X($*$) – REAL (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array X must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{N}}-1\right)×{\mathbf{INCX}}\right)$.
On entry: the $n$-element vector $x$. ${x}_{\mathit{i}}$ must be stored in ${\mathbf{X}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{INCX}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{N}}$.
Intermediate elements of X are not referenced.
On exit: the referenced elements are overwritten by details of the real elementary reflection.
4:     INCX – INTEGERInput
On entry: the increment in the subscripts of X between successive elements of $x$.
Constraint: ${\mathbf{INCX}}>0$.
5:     TOL – REAL (KIND=nag_wp)Input
On entry: the value $\mathit{tol}$.
If TOL is not in the range $\left(0,1\right)$, then the value $0$ is used for $\mathit{tol}$.
6:     Z1 – REAL (KIND=nag_wp)Output
On exit: the scalar $\zeta$.

None.

Not applicable.