PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dorgtr (f08ff)
Purpose
nag_lapack_dorgtr (f08ff) generates the real orthogonal matrix
, which was determined by
nag_lapack_dsytrd (f08fe) when reducing a symmetric matrix to tridiagonal form.
Syntax
Description
nag_lapack_dorgtr (f08ff) is intended to be used after a call to
nag_lapack_dsytrd (f08fe), which reduces a real symmetric matrix
to symmetric tridiagonal form
by an orthogonal similarity transformation:
.
nag_lapack_dsytrd (f08fe) represents the orthogonal matrix
as a product of
elementary reflectors.
This function may be used to generate explicitly as a square matrix.
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)
-
This
must be the same argument
uplo as supplied to
nag_lapack_dsytrd (f08fe).
Constraint:
or .
- 2:
– double array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
Details of the vectors which define the elementary reflectors, as returned by
nag_lapack_dsytrd (f08fe).
- 3:
– double array
-
The dimension of the array
tau
must be at least
Further details of the elementary reflectors, as returned by
nag_lapack_dsytrd (f08fe).
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:
– double array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
The by orthogonal matrix .
- 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:
uplo, 2:
n, 3:
a, 4:
lda, 5:
tau, 6:
work, 7:
lwork, 8:
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 matrix
differs from an exactly orthogonal matrix by a matrix
such that
where
is the
machine precision.
Further Comments
The total number of floating-point operations is approximately .
The complex analogue of this function is
nag_lapack_zungtr (f08ft).
Example
This example computes all the eigenvalues and eigenvectors of the matrix
, where
Here
is symmetric and must first be reduced to tridiagonal form by
nag_lapack_dsytrd (f08fe). The program then calls
nag_lapack_dorgtr (f08ff) to form
, and passes this matrix to
nag_lapack_dsteqr (f08je) which computes the eigenvalues and eigenvectors of
.
Open in the MATLAB editor:
f08ff_example
function f08ff_example
fprintf('f08ff example results\n\n');
uplo = 'L';
a = [ 2.07, 0, 0, 0;
3.87, -0.21, 0, 0;
4.20, 1.87, 1.15, 0;
-1.15, 0.63, 2.06, -1.81];
[t, d, e, tau, info] = f08fe( ...
uplo, a);
[q, info] = f08ff( ...
uplo, t, tau);
[w, e, z, info] = f08je( ...
'V', d, e, 'z', q);
disp('Eigenvalues');
disp(w');
disp('Eigenvectors');
disp(z);
f08ff example results
Eigenvalues
-5.0034 -1.9987 0.2013 8.0008
Eigenvectors
-0.5658 -0.2328 0.3965 -0.6845
0.3478 0.7994 0.1780 -0.4564
0.4740 -0.4087 -0.5381 -0.5645
-0.5781 0.3737 -0.7221 -0.0676
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015