PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zunmbr (f08ku)
Purpose
nag_lapack_zunmbr (f08ku) multiplies an arbitrary complex
by
matrix
by one of the complex unitary matrices
or
which were determined by
nag_lapack_zgebrd (f08ks) when reducing a complex matrix to bidiagonal form.
Syntax
[
c,
info] = f08ku(
vect,
side,
trans,
k,
a,
tau,
c, 'm',
m, 'n',
n)
[
c,
info] = nag_lapack_zunmbr(
vect,
side,
trans,
k,
a,
tau,
c, 'm',
m, 'n',
n)
Description
nag_lapack_zunmbr (f08ku) is intended to be used after a call to
nag_lapack_zgebrd (f08ks), which reduces a complex rectangular matrix
to real bidiagonal form
by a unitary transformation:
.
nag_lapack_zgebrd (f08ks) represents the matrices
and
as products of elementary reflectors.
This function may be used to form one of the matrix products
overwriting the result on
(which may be any complex rectangular matrix).
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Parameters
Note: in the descriptions below, denotes the order of or : if , and if , .
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Indicates whether
or
or
or
is to be applied to
.
- or is applied to .
- or is applied to .
Constraint:
or .
- 2:
– string (length ≥ 1)
-
Indicates how
or
or
or
is to be applied to
.
- or or or is applied to from the left.
- or or or is applied to from the right.
Constraint:
or .
- 3:
– string (length ≥ 1)
-
Indicates whether
or
or
or
is to be applied to
.
- or is applied to .
- or is applied to .
Constraint:
or .
- 4:
– int64int32nag_int scalar
-
If
, the number of columns in the original matrix
.
If , the number of rows in the original matrix .
Constraint:
.
- 5:
– complex array
-
The first dimension,
, of the array
a must satisfy
- if , ;
- if , .
The second dimension of the array
a must be at least
if
and at least
if
.
Details of the vectors which define the elementary reflectors, as returned by
nag_lapack_zgebrd (f08ks).
- 6:
– complex array
-
The dimension of the array
tau
must be at least
Further details of the elementary reflectors, as returned by
nag_lapack_zgebrd (f08ks) in its argument
tauq if
, or in its argument
taup if
.
- 7:
– complex array
-
The first dimension of the array
c must be at least
.
The second dimension of the array
c must be at least
.
The matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
c.
, the number of rows of the matrix .
Constraint:
.
- 2:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
c.
, the number of columns of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
c will be
.
The second dimension of the array
c will be
.
c stores
or
or
or
or
or
or
or
as specified by
vect,
side and
trans.
- 2:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
vect, 2:
side, 3:
trans, 4:
m, 5:
n, 6:
k, 7:
a, 8:
lda, 9:
tau, 10:
c, 11:
ldc, 12:
work, 13:
lwork, 14:
info.
It is possible that
info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
Accuracy
The computed result differs from the exact result by a matrix
such that
where
is the
machine precision.
Further Comments
The total number of real floating-point operations is approximately
- if and , ;
- if and , ;
- if and , ;
- if and , ,
where
is the value of the argument
kThe real analogue of this function is
nag_lapack_dormbr (f08kg).
Example
For this function two examples are presented. Both illustrate how the reduction to bidiagonal form of a matrix may be preceded by a or factorization of .
In the first example,
, and
The function first performs a
factorization of
as
and then reduces the factor
to bidiagonal form
:
. Finally it forms
and calls
nag_lapack_zunmbr (f08ku) to form
.
In the second example,
, and
The function first performs an
factorization of
as
and then reduces the factor
to bidiagonal form
:
. Finally it forms
and calls
nag_lapack_zunmbr (f08ku) to form
.
Open in the MATLAB editor:
f08ku_example
function f08ku_example
fprintf('f08ku example results\n\n');
ex1;
ex2;
function ex1
m = int64(6);
n = int64(4);
a = [ 0.96 - 0.81i, -0.03 + 0.96i, -0.91 + 2.06i, -0.05 + 0.41i;
-0.98 + 1.98i, -1.20 + 0.19i, -0.66 + 0.42i, -0.81 + 0.56i;
0.62 - 0.46i, 1.01 + 0.02i, 0.63 - 0.17i, -1.11 + 0.60i;
-0.37 + 0.38i, 0.19 - 0.54i, -0.98 - 0.36i, 0.22 - 0.20i;
0.83 + 0.51i, 0.20 + 0.01i, -0.17 - 0.46i, 1.47 + 1.59i;
1.08 - 0.28i, 0.20 - 0.12i, -0.07 + 1.23i, 0.26 + 0.26i];
[QR, tau, info] = f08as(a);
[Q, info] = f08at(QR, tau);
R = triu(QR(1:n,1:n));
[B, d, e, tauq, taup, info] = ...
f08ks(R);
vect = 'Q';
side = 'Right';
trans = 'No transpose';
[Q2, info] = f08ku( ...
vect, side, trans, n, B, tauq, Q);
fprintf('Example 1: bidiagonal matrix B\n Main diagonal ');
fprintf(' %7.3f',d);
fprintf('\n super-diagonal ');
fprintf(' %7.3f',e);
fprintf('\n\n');
disp('Example 1: Orthogonal matrix Q');
disp(Q2);
function ex2
m = int64(3);
n = int64(4);
a = [0.28 - 0.36i 0.50 - 0.86i -0.77 - 0.48i 1.58 + 0.66i;
-0.50 - 1.10i -1.21 + 0.76i -0.32 - 0.24i -0.27 - 1.15i;
0.36 - 0.51i -0.07 + 1.33i -0.75 + 0.47i -0.08 + 1.01i];
[LQ, tau, info] = f08av(a);
[Q, info] = f08aw(LQ, tau);
L = tril(LQ(1:m,1:m));
[B, d, e, tauq, taup, info] = ...
f08ks(L);
vect = 'P';
side = 'Left';
trans = 'Conjugate Transpose';
[P2, info] = f08ku( ...
vect, side, trans, n, B, taup, Q);
fprintf('Example 2: bidiagonal matrix B\n Main diagonal ');
fprintf(' %7.3f',d);
fprintf('\n super-diagonal ');
fprintf(' %7.3f',e);
fprintf('\n\n');
disp('Example 2: Orthogonal matrix P^H');
disp(P2);
f08ku example results
Example 1: bidiagonal matrix B
Main diagonal -3.087 -2.066 -1.873 -2.002
super-diagonal 2.113 -1.263 1.613
Example 1: Orthogonal matrix Q
-0.3110 + 0.2624i 0.6521 + 0.5532i 0.0427 + 0.0361i -0.2634 - 0.0741i
0.3175 - 0.6414i 0.3488 + 0.0721i 0.2287 + 0.0069i 0.1101 - 0.0326i
-0.2008 + 0.1490i -0.3103 + 0.0230i 0.1855 - 0.1817i -0.2956 + 0.5648i
0.1199 - 0.1231i -0.0046 - 0.0005i -0.3305 + 0.4821i -0.0675 + 0.3464i
-0.2689 - 0.1652i 0.1794 - 0.0586i -0.5235 - 0.2580i 0.3927 + 0.1450i
-0.3499 + 0.0907i 0.0829 - 0.0506i 0.3202 + 0.3038i 0.3174 + 0.3241i
Example 2: bidiagonal matrix B
Main diagonal 2.761 1.630 -1.327
super-diagonal -0.950 -1.018
Example 2: Orthogonal matrix P^H
-0.1258 + 0.1618i -0.2247 + 0.3864i 0.3460 + 0.2157i -0.7099 - 0.2966i
0.4148 + 0.1795i 0.1368 - 0.3976i 0.6885 + 0.3386i 0.1667 - 0.0494i
0.4575 - 0.4807i -0.2733 + 0.4981i -0.0230 + 0.3861i 0.1730 + 0.2395i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015