PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zhetrd (f08fs)
Purpose
nag_lapack_zhetrd (f08fs) reduces a complex Hermitian matrix to tridiagonal form.
Syntax
Description
nag_lapack_zhetrd (f08fs) reduces a complex Hermitian matrix to real symmetric tridiagonal form by a unitary similarity transformation: .
The matrix
is not formed explicitly but is represented as a product of
elementary reflectors (see the
F08 Chapter Introduction for details). Functions are provided to work with
in this representation (see
Further Comments).
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 whether the upper or lower triangular part of
is stored.
- The upper triangular part of is stored.
- The lower triangular part of is stored.
Constraint:
or .
- 2:
– complex array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The
by
Hermitian matrix
.
- If , the upper triangular part of must be stored and the elements of the array below the diagonal are not referenced.
- If , the lower triangular part of must be stored and the elements of the array above the diagonal are not referenced.
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
a and the second dimension of the array
a.
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
a stores the tridiagonal matrix
and details of the unitary matrix
as specified by
uplo.
- 2:
– double array
-
The dimension of the array
d will be
The diagonal elements of the tridiagonal matrix .
- 3:
– double array
-
The dimension of the array
e will be
The off-diagonal elements of the tridiagonal matrix .
- 4:
– complex array
-
The dimension of the array
tau will be
Further details of the unitary matrix .
- 5:
– 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:
uplo, 2:
n, 3:
a, 4:
lda, 5:
d, 6:
e, 7:
tau, 8:
work, 9:
lwork, 10:
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 tridiagonal matrix
is exactly similar to a nearby matrix
, where
is a modestly increasing function of
, and
is the
machine precision.
The elements of themselves may be sensitive to small perturbations in or to rounding errors in the computation, but this does not affect the stability of the eigenvalues and eigenvectors.
Further Comments
The total number of real floating-point operations is approximately .
To form the unitary matrix
nag_lapack_zhetrd (f08fs) may be followed by a call to
nag_lapack_zungtr (f08ft):
[a, info] = f08ft(uplo, a, tau);
To apply
to an
by
complex matrix
nag_lapack_zhetrd (f08fs) may be followed by a call to
nag_lapack_zunmtr (f08fu). For example,
[c, info] = f08fu('Left', uplo, 'No Transpose', a, tau, c);
forms the matrix product
.
The real analogue of this function is
nag_lapack_dsytrd (f08fe).
Example
This example reduces the matrix
to tridiagonal form, where
Open in the MATLAB editor:
f08fs_example
function f08fs_example
fprintf('f08fs 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];
[QT, d, e, tau, info] = f08fs(uplo, a);
disp('Main diagonal of T:');
disp (d');
disp('Off diagonal of T (absolute values):');
disp (abs(e)');
f08fs example results
Main diagonal of T:
-2.2800 -0.1285 -0.1666 -1.9249
Off diagonal of T (absolute values):
4.3385 2.0226 1.8023
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015