PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zunmtr (f08fu)
Purpose
nag_lapack_zunmtr (f08fu) multiplies an arbitrary complex matrix
by the complex unitary matrix
which was determined by
nag_lapack_zhetrd (f08fs) when reducing a complex Hermitian matrix to tridiagonal form.
Syntax
[
c,
info] = f08fu(
side,
uplo,
trans,
a,
tau,
c, 'm',
m, 'n',
n)
[
c,
info] = nag_lapack_zunmtr(
side,
uplo,
trans,
a,
tau,
c, 'm',
m, 'n',
n)
Description
nag_lapack_zunmtr (f08fu) is intended to be used after a call to
nag_lapack_zhetrd (f08fs), which reduces a complex Hermitian matrix
to real symmetric tridiagonal form
by a unitary similarity transformation:
.
nag_lapack_zhetrd (f08fs) represents the unitary matrix
as a product 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).
A common application of this function is to transform a matrix of eigenvectors of to the matrix of eigenvectors of .
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Indicates how
or
is to be applied to
.
- or is applied to from the left.
- or is applied to from the right.
Constraint:
or .
- 2:
– string (length ≥ 1)
-
This
must be the same argument
uplo as supplied to
nag_lapack_zhetrd (f08fs).
Constraint:
or .
- 3:
– string (length ≥ 1)
-
Indicates whether
or
is to be applied to
.
- is applied to .
- is applied to .
Constraint:
or .
- 4:
– 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_zhetrd (f08fs).
- 5:
– complex array
-
The dimension of the array
tau
must be at least
if
and at least
if
Further details of the elementary reflectors, as returned by
nag_lapack_zhetrd (f08fs).
- 6:
– 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 by matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
c.
, the number of rows of the matrix ; is also the order of if .
Constraint:
.
- 2:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
c.
, the number of columns of the matrix ; is also the order of if .
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
as specified by
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:
side, 2:
uplo, 3:
trans, 4:
m, 5:
n, 6:
a, 7:
lda, 8:
tau, 9:
c, 10:
ldc, 11:
work, 12:
lwork, 13:
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 .
The real analogue of this function is
nag_lapack_dormtr (f08fg).
Example
This example computes the two smallest eigenvalues, and the associated eigenvectors, of the matrix
, where
Here
is Hermitian and must first be reduced to tridiagonal form
by
nag_lapack_zhetrd (f08fs). The program then calls
nag_lapack_dstebz (f08jj) to compute the requested eigenvalues and
nag_lapack_zstein (f08jx) to compute the associated eigenvectors of
. Finally
nag_lapack_zunmtr (f08fu) is called to transform the eigenvectors to those of
.
Open in the MATLAB editor:
f08fu_example
function f08fu_example
fprintf('f08fu example results\n\n');
uplo = 'L';
a = [-2.28 + 0.00i, 0.00 + 0i, 0 + 0i, 0 + 0i;
1.78 + 2.03i, -1.12 + 0i, 0 + 0i, 0 + 0i;
2.26 - 0.10i, 0.01 - 0.43i, -0.37 + 0i, 0 + 0i;
-0.12 - 2.53i, -1.07 - 0.86i, 2.31 + 0.92i, -0.73 + 0i];
[aq, d, e, tau, info] = f08fs( ...
uplo, a);
range = 'Indices';
order = 'Block';
vl = 0;
vu = 0;
il = int64(1);
iu = int64(2);
abstol = 0;
[m, nsplit, w, iblock, isplit, info] = ...
f08jj( ...
range, order, vl, vu, il, iu, abstol, d, e);
[tz, ifailv, info] = f08jx( ...
d, e, m, w, iblock, isplit);
trans = 'No transpose';
side = 'Left';
[z, info] = f08fu( ...
side, uplo, trans, aq, tau, tz);
for i = 1:m
[~,k] = max(abs(real(z(:,i)))+abs(imag(z(:,i))));
z(:,i) = z(:,i)*conj(z(k,i))/abs(z(k,i));
end
disp(' Selected eigenvalues of A:');
disp(w(1:m));
disp(' Corresponding eigenvectors:');
disp(z);
f08fu example results
Selected eigenvalues of A:
-6.0002
-3.0030
Corresponding eigenvectors:
0.7299 + 0.0000i -0.2120 + 0.1497i
-0.1663 - 0.2061i 0.7307 + 0.0000i
-0.4165 - 0.1417i -0.3291 + 0.0479i
0.1743 + 0.4162i 0.5200 + 0.1329i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015