# NAG FL Interfacef06tqf (zutupd)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06tqf performs a $QR$ factorization (as a sequence of plane rotations) of a complex upper triangular matrix that has been augmented by a full row.

## 2Specification

Fortran Interface
 Subroutine f06tqf ( n, x, incx, a, lda, c, s)
 Integer, Intent (In) :: n, incx, lda Real (Kind=nag_wp), Intent (Out) :: c(n) Complex (Kind=nag_wp), Intent (In) :: alpha Complex (Kind=nag_wp), Intent (Inout) :: x(*), a(lda,*) Complex (Kind=nag_wp), Intent (Out) :: s(n)
#include <nag.h>
 void f06tqf_ (const Integer *n, const Complex *alpha, Complex x[], const Integer *incx, Complex a[], const Integer *lda, double c[], Complex s[])
The routine may be called by the names f06tqf or nagf_blas_zutupd.

## 3Description

f06tqf performs the factorization
 $( U αxT )=Q ( R 0 )$
where $U$ and $R$ are $n×n$ complex upper triangular matrices, $x$ is an $n$-element complex vector, $\alpha$ is a complex scalar, and $Q$ is a complex unitary matrix. If $U$ has real diagonal elements, then so does $R$.
$Q$ is formed as a sequence of plane rotations
 $QH = Qn ⋯ Q2 Q1$
where ${Q}_{k}$ is a rotation in the $\left(k,n+1\right)$ plane, chosen to annihilate ${x}_{k}$.
The $2×2$ plane rotation part of ${Q}_{k}$ has the form
 $( ck s¯k -sk ck )$
with ${c}_{k}$ real.
None.

## 5Arguments

1: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrices $U$ and $R$.
Constraint: ${\mathbf{n}}\ge 0$.
2: $\mathbf{alpha}$Complex (Kind=nag_wp) Input
On entry: the scalar $\alpha$.
3: $\mathbf{x}\left(*\right)$Complex (Kind=nag_wp) array Input/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 sequence of plane rotations.
4: $\mathbf{incx}$Integer Input
On entry: the increment in the subscripts of x between successive elements of $x$.
Constraint: ${\mathbf{incx}}>0$.
5: $\mathbf{a}\left({\mathbf{lda}},*\right)$Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least ${\mathbf{n}}$.
On entry: the $n×n$ upper triangular matrix $U$.
On exit: the upper triangular matrix $R$.
6: $\mathbf{lda}$Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06tqf is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
7: $\mathbf{c}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Output
On exit: the values ${c}_{\mathit{k}}$, the cosines of the rotations ${Q}_{\mathit{k}}$, for $\mathit{k}=1,2,\dots ,n$.
8: $\mathbf{s}\left({\mathbf{n}}\right)$Complex (Kind=nag_wp) array Output
On exit: the values ${s}_{\mathit{k}}$, the sines of the rotations ${Q}_{\mathit{k}}$, for $\mathit{k}=1,2,\dots ,n$.

None.

Not applicable.