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_ztrsen (f08qu)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_lapack_ztrsen (f08qu) reorders the Schur factorization of a complex general matrix so that a selected cluster of eigenvalues appears in the leading elements on the diagonal of the Schur form. The function also optionally computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

Syntax

[t, q, w, m, s, sep, info] = f08qu(job, compq, select, t, q, 'n', n)
[t, q, w, m, s, sep, info] = nag_lapack_ztrsen(job, compq, select, t, q, 'n', n)

Description

nag_lapack_ztrsen (f08qu) reorders the Schur factorization of a complex general matrix A=QTQH, so that a selected cluster of eigenvalues appears in the leading diagonal elements of the Schur form.
The reordered Schur form T~ is computed by a unitary similarity transformation: T~=ZHTZ. Optionally the updated matrix Q~ of Schur vectors is computed as Q~=QZ, giving A=Q~T~Q~H.
Let T~= T11 T12 0 T22 , where the selected eigenvalues are precisely the eigenvalues of the leading m by m sub-matrix T11. Let Q~ be correspondingly partitioned as Q1 Q2  where Q1 consists of the first m columns of Q. Then AQ1=Q1T11, and so the m columns of Q1 form an orthonormal basis for the invariant subspace corresponding to the selected cluster of eigenvalues.
Optionally the function also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.

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)
Indicates whether condition numbers are required for the cluster of eigenvalues and/or the invariant subspace.
job='N'
No condition numbers are required.
job='E'
Only the condition number for the cluster of eigenvalues is computed.
job='V'
Only the condition number for the invariant subspace is computed.
job='B'
Condition numbers for both the cluster of eigenvalues and the invariant subspace are computed.
Constraint: job='N', 'E', 'V' or 'B'.
2:     compq – string (length ≥ 1)
Indicates whether the matrix Q of Schur vectors is to be updated.
compq='V'
The matrix Q of Schur vectors is updated.
compq='N'
No Schur vectors are updated.
Constraint: compq='V' or 'N'.
3:     select: – logical array
The dimension of the array select must be at least max1,n
Specifies the eigenvalues in the selected cluster. To select a complex eigenvalue λj, selectj must be set true.
4:     tldt: – complex array
The first dimension of the array t must be at least max1,n.
The second dimension of the array t must be at least max1,n.
The n by n upper triangular matrix T, as returned by nag_lapack_zhseqr (f08ps).
5:     qldq: – complex array
The first dimension, ldq, of the array q must satisfy
  • if compq='V', ldq max1,n ;
  • if compq='N', ldq1.
The second dimension of the array q must be at least max1,n if compq='V' and at least 1 if compq='N'.
If compq='V', q must contain the n by n unitary matrix Q of Schur vectors, as returned by nag_lapack_zhseqr (f08ps).

Optional Input Parameters

1:     n int64int32nag_int scalar
Default: the first dimension of the array t and the second dimension of the array t. (An error is raised if these dimensions are not equal.)
n, the order of the matrix T.
Constraint: n0.

Output Parameters

1:     tldt: – complex array
The first dimension of the array t will be max1,n.
The second dimension of the array t will be max1,n.
t stores the updated matrix T~.
2:     qldq: – complex array
The first dimension, ldq, of the array q will be
  • if compq='V', ldq= max1,n ;
  • if compq='N', ldq=1.
The second dimension of the array q will be max1,n if compq='V' and at least 1 if compq='N'.
If compq='V', q contains the updated matrix of Schur vectors; the first m columns of Q form an orthonormal basis for the specified invariant subspace.
If compq='N', q is not referenced.
3:     w: – complex array
The dimension of the array w will be max1,n
The reordered eigenvalues of T~. The eigenvalues are stored in the same order as on the diagonal of T~.
4:     m int64int32nag_int scalar
m, the dimension of the specified invariant subspace, which is the same as the number of selected eigenvalues (see select); 0mn.
5:     s – double scalar
If job='E' or 'B', s is a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues. If m=0​ or ​n, s=1.
If job='N' or 'V', s is not referenced.
6:     sep – double scalar
If job='V' or 'B', sep is the estimated reciprocal condition number of the specified invariant subspace. If m=0​ or ​n, sep=T.
If job='N' or 'E', sep is not referenced.
7:     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: compq, 3: select, 4: n, 5: t, 6: ldt, 7: q, 8: ldq, 9: w, 10: m, 11: s, 12: sep, 13: work, 14: lwork, 15: 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 T~ is similar to a matrix T+E, where
E2 = Oε T2 ,  
and ε is the machine precision.
s cannot underestimate the true reciprocal condition number by more than a factor of minm,n-m. sep may differ from the true value by mn-m. The angle between the computed invariant subspace and the true subspace is OεA2sep .
The values of the eigenvalues are never changed by the reordering.

Further Comments

The real analogue of this function is nag_lapack_dtrsen (f08qg).

Example

This example reorders the Schur factorization of the matrix A=QTQH such that the eigenvalues stored in elements t11 and t44 appear as the leading elements on the diagonal of the reordered matrix T~, where
T = -6.0004-6.9999i 0.3637-0.3656i -0.1880+0.4787i 0.8785-0.2539i 0.0000+0.0000i -5.0000+2.0060i -0.0307-0.7217i -0.2290+0.1313i 0.0000+0.0000i 0.0000+0.0000i 7.9982-0.9964i 0.9357+0.5359i 0.0000+0.0000i 0.0000+0.0000i 0.0000+0.0000i 3.0023-3.9998i  
and
Q = -0.8347-0.1364i -0.0628+0.3806i 0.2765-0.0846i 0.0633-0.2199i 0.0664-0.2968i 0.2365+0.5240i -0.5877-0.4208i 0.0835+0.2183i -0.0362-0.3215i 0.3143-0.5473i 0.0576-0.5736i 0.0057-0.4058i 0.0086+0.2958i -0.3416-0.0757i -0.1900-0.1600i 0.8327-0.1868i .  
The original matrix A is given in Example in nag_lapack_zunghr (f08nt).
function f08qu_example


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

ilo = int64(1);
ihi = int64(4);
a = [ -3.97 - 5.04i, -4.11 + 3.70i, -0.34 + 1.01i,  1.29 - 0.86i;
       0.34 - 1.50i,  1.52 - 0.43i,  1.88 - 5.38i,  3.36 + 0.65i;
       3.31 - 3.85i,  2.50 + 3.45i,  0.88 - 1.08i,  0.64 - 1.48i;
      -1.10 + 0.82i,  1.81 - 1.59i,  3.25 + 1.33i,  1.57 - 3.44i];

% Reduce A to upper Hessenberg Form
[H, tau, info] = f08ns( ...
			ilo, ihi, a);

% Form Q
[Q, info] = f08nt( ...
		   ilo, ihi, H, tau);

% Schur factorize H = Y*T*Y' and form Z = QY  A = QY*T*(QQY)'
job   = 'Schur form';
compz = 'Vectors';
[T, w, Z, info] = f08ps( ...
			 job, compz, ilo, ihi, H, Q);

job = 'Both';
compq = 'Vectors';
select = [true; false;  false;  true];
[T, Q, w, m, s, sep, info] = f08qu( ...
				    job, compq, select, T, Z);

disp('selected eigenvalues:');
disp(w(1:m));
fprintf('Condition number estimate for selected eigenvalues = %7.4f\n',1/s);
fprintf('Condition number estimate for specified subspace   = %7.4f\n',1/sep);


f08qu example results

selected eigenvalues:
  -6.0004 - 6.9998i
   3.0023 - 3.9998i

Condition number estimate for selected eigenvalues =  1.0196
Condition number estimate for specified subspace   =  0.1822

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