hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_ddisna (f08fl)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_lapack_ddisna (f08fl) computes the reciprocal condition numbers for the eigenvectors of a real symmetric or complex Hermitian m by m matrix A, or for the left or right singular vectors of a general m by n matrix A.

Syntax

[sep, info] = f08fl(job, m, n, d)
[sep, info] = nag_lapack_ddisna(job, m, n, d)

Description

The bound on the error, measured by the angle in radians, for the ith computed vector is given by ε A2 / sepi , where ε is the machine precision and sepi  is the reciprocal condition number for the vectors, returned in the array element sepi . sepi  is restricted to be at least ε A2  in order to limit the size of the error bound.

References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Parameters

Compulsory Input Parameters

1:     job – string (length ≥ 1)
Specifies for which problem the reciprocal condition number should be computed.
job='E'
The eigenvectors of a symmetric or Hermitian matrix.
job='L'
The left singular vectors of a general matrix.
job='R'
The right singular vectors of a general matrix.
Constraint: job='E', 'L' or 'R'.
2:     m int64int32nag_int scalar
m, the number of rows of the matrix A.
Constraint: m0.
3:     n int64int32nag_int scalar
n, the number of columns of the matrix when job='L' or 'R'.
If job='E', n is not referenced.
Constraint: if job='L' or 'R', n0.
4:     d: – double array
The dimension of the array d must be at least max1,m if job='E' and at least max1,minm,n if job='L' or 'R'
The eigenvalues if job='E', or singular values if job='L' or 'R' of the matrix A.
Constraints:
  • the elements of the array d must be in either increasing or decreasing order;
  • if job='L' or 'R' the elements of d must be non-negative.

Optional Input Parameters

None.

Output Parameters

1:     sep: – double array
The dimension of the array sep will be max1,m if job='E' and at least max1,minm,n if job='L' or 'R'
The reciprocal condition numbers of the vectors.
2:     info int64int32nag_int scalar
info=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

   info=-i
If info=-i, parameter i had an illegal value on entry. The parameters are numbered as follows:
1: job, 2: m, 3: n, 4: d, 5: sep, 6: info.

Accuracy

The reciprocal condition numbers are computed to machine precision relative to the size of the eigenvalues, or singular values.

Further Comments

nag_lapack_ddisna (f08fl) may also be used towards computing error bounds for the eigenvectors of the generalized symmetric or Hermitian definite eigenproblem. See Golub and Van Loan (1996) for further details on the error bounds.

Example

The use of nag_lapack_ddisna (f08fl) in computing error bounds for eigenvectors of the symmetric eigenvalue problem is illustrated in Example in nag_lapack_dsyev (f08fa); its use in computing error bounds for singular vectors is illustrated in Example in nag_lapack_dgesvd (f08kb); and its use in computing error bounds for eigenvectors of the generalized symmetric definite eigenvalue problem is illustrated in Example in nag_lapack_dsygv (f08sa).
function f08fl_example


fprintf('f08fl example results\n\n');

a = [1, 2, 3, 4;
     0, 2, 3, 4;
     0, 0, 3, 4;
     0, 0, 0, 4];
n = int64(size(a,1));

% Eigenvalues and eogenvectors of upper triangular A
jobz = 'Vectors';
uplo = 'Upper';
[v, w, info] = f08fa( ...
		      jobz, uplo, a);

disp('Eigenvectors');
disp(v);

% Eigenvalue error bound
errbnd = x02aj*max(abs(w(1)),abs(w(end)));
% Eigenvector condition numbers
[rcondz, info] = f08fl( ...
		        'Eigenvectors', n, n, w);

% Eigenvector error bounds
zerrbd = errbnd./rcondz;

disp('Error estimate for the eigenvalues');
fprintf('%12.1e\n',errbnd);
disp('Error estimates for the eigenvectors');
fprintf('%12.1e',zerrbd);
fprintf('\n');


f08fl example results

Eigenvectors
    0.7003   -0.5144    0.2767    0.4103
    0.3592    0.4851   -0.6634    0.4422
   -0.1569    0.5420    0.6504    0.5085
   -0.5965   -0.4543   -0.2457    0.6144

Error estimate for the eigenvalues
     1.4e-15
Error estimates for the eigenvectors
     9.3e-16     6.5e-15     6.5e-15     1.1e-16

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015