nag_dhsein (f08pkc) computes selected left and/or right eigenvectors of a real upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.
nag_dhsein (f08pkc) computes left and/or right eigenvectors of a real upper Hessenberg matrix , corresponding to selected eigenvalues.
The right eigenvector
, and the left eigenvector
, corresponding to an eigenvalue
, are defined by:
Note that even though
is real,
,
and
may be complex. If
is an eigenvector corresponding to a complex eigenvalue
, then the complex conjugate vector
is the eigenvector corresponding to the complex conjugate eigenvalue
.
The eigenvectors are computed by inverse iteration. They are scaled so that, for a real eigenvector ,
,
and for a complex eigenvector,
.
If
has been formed by reduction of a real general matrix
to upper Hessenberg form, then the eigenvectors of
may be transformed to eigenvectors of
by a call to
nag_dormhr (f08ngc).
- 1:
order – Nag_OrderTypeInput
-
On entry: the
order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by
. See
Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint:
or Nag_ColMajor.
- 2:
side – Nag_SideTypeInput
-
On entry: indicates whether left and/or right eigenvectors are to be computed.
- Only right eigenvectors are computed.
- Only left eigenvectors are computed.
- Both left and right eigenvectors are computed.
Constraint:
, or .
- 3:
eig_source – Nag_EigValsSourceTypeInput
-
On entry: indicates whether the eigenvalues of
(stored in
wr and
wi) were found using
nag_dhseqr (f08pec).
- The eigenvalues of were found using nag_dhseqr (f08pec); thus if has any zero subdiagonal elements (and so is block triangular), then the th eigenvalue can be assumed to be an eigenvalue of the block containing the th row/column. This property allows the function to perform inverse iteration on just one diagonal block.
- No such assumption is made and the function performs inverse iteration using the whole matrix.
Constraint:
or .
- 4:
initv – Nag_InitVeenumtypeInput
-
On entry: indicates whether you are supplying initial estimates for the selected eigenvectors.
- No initial estimates are supplied.
- Initial estimates are supplied in vl and/or vr.
Constraint:
or .
- 5:
select[] – Nag_BooleanInput/Output
-
Note: the dimension,
dim, of the array
select
must be at least
.
On entry: specifies which eigenvectors are to be computed. To obtain the real eigenvector corresponding to the real eigenvalue , must be set Nag_TRUE. To select the complex eigenvector corresponding to the complex eigenvalue with complex conjugate (), and/or must be set Nag_TRUE; the eigenvector corresponding to the first eigenvalue in the pair is computed.
On exit: if a complex eigenvector was selected as specified above, then is set to Nag_TRUE and to Nag_FALSE.
- 6:
n – IntegerInput
-
On entry:
, the order of the matrix .
Constraint:
.
- 7:
h[] – const doubleInput
-
Note: the dimension,
dim, of the array
h
must be at least
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the by upper Hessenberg matrix .
- 8:
pdh – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
h.
Constraint:
.
- 9:
wr[] – doubleInput/Output
- 10:
wi[] – const doubleInput
Note: the dimension,
dim, of the arrays
wr and
wi
must be at least
.
On entry: the real and imaginary parts, respectively, of the eigenvalues of the matrix
. Complex conjugate pairs of values must be stored in consecutive elements of the arrays. If
, the arrays
must be exactly as returned by
nag_dhseqr (f08pec).
On exit: some elements of
wr may be modified, as close eigenvalues are perturbed slightly in searching for independent eigenvectors.
- 11:
vl[] – doubleInput/Output
-
Note: the dimension,
dim, of the array
vl
must be at least
- when
or and
;
- when
or and
;
- when
.
The
th element of the matrix is stored in
- when ;
- when .
On entry: if
and
or
,
vl must contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same rows or columns as will be used to store the corresponding eigenvector (see below).
If
,
vl need not be set.
On exit: if
or
,
vl contains the computed left eigenvectors (as specified by
select). The eigenvectors are stored consecutively in the rows or columns of the array (depending on the value of
order), in the same order as their eigenvalues. Corresponding to each selected real eigenvalue is a real eigenvector, occupying one row or column. Corresponding to each selected complex eigenvalue is a complex eigenvector, occupying two rows or columns: the first row or column holds the real part and the second row or column holds the imaginary part.
If
,
vl is not referenced.
- 12:
pdvl – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
vl.
Constraints:
- if ,
- if or , ;
- if , ;
- if ,
- if or ,
;
- if ,
.
- 13:
vr[] – doubleInput/Output
-
Note: the dimension,
dim, of the array
vr
must be at least
- when
or and
;
- when
or and
;
- when
.
The
th element of the matrix is stored in
- when ;
- when .
On entry: if
and
or
,
vr must contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same rows or columns as will be used to store the corresponding eigenvector (see below).
If
,
vr need not be set.
On exit: if
or
,
vr contains the computed right eigenvectors (as specified by
select). The eigenvectors are stored consecutively in the rows or columns of the array (depending on the
order argument), in the same order as their eigenvalues. Corresponding to each selected real eigenvalue is a real eigenvector, occupying one row or column. Corresponding to each selected complex eigenvalue is a complex eigenvector, occupying two rows or columns: the first row or column holds the real part and the second row or column holds the imaginary part.
If
,
vr is not referenced.
- 14:
pdvr – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
vr.
Constraints:
- if ,
- if or , ;
- if , ;
- if ,
- if or ,
;
- if ,
.
- 15:
mm – IntegerInput
-
On entry: the number of columns in the arrays
vl and/or
vr
if
or the number of rows in the arrays if
. The actual number of
rows or
columns required,
, is obtained by counting
for each selected real eigenvector and
for each selected complex eigenvector (see
select);
.
Constraint:
.
- 16:
m – Integer *Output
-
On exit:
, the number of rows or columns of
vl and/or
vr required to store the selected eigenvectors.
- 17:
ifaill[] – IntegerOutput
-
Note: the dimension,
dim, of the array
ifaill
must be at least
- when or ;
- when .
On exit: if
or
, then
if the selected left eigenvector converged and
if the eigenvector stored in the
th row or column of
vl (corresponding to the
th eigenvalue as held in
failed to converge. If the
th and
th rows or columns of
vl contain a selected complex eigenvector, then
and
are set to the same value.
If
,
ifaill is not referenced.
- 18:
ifailr[] – IntegerOutput
-
Note: the dimension,
dim, of the array
ifailr
must be at least
- when or ;
- when .
On exit: if
or
, then
if the selected right eigenvector converged and
if the eigenvector stored in the
th row or column of
vr (corresponding to the
th eigenvalue as held in
) failed to converge. If the
th and
th rows or columns of
vr contain a selected complex eigenvector, then
and
are set to the same value.
If
,
ifailr is not referenced.
- 19:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_ALLOC_FAIL
Dynamic memory allocation failed.
- NE_BAD_PARAM
On entry, argument had an illegal value.
- NE_CONVERGENCE
eigenvectors (as indicated by arguments
ifaill and/or
ifailr) failed to converge. The corresponding columns of
vl and/or
vr contain no useful information.
- NE_ENUM_INT_2
On entry, , , .
Constraint: if or ,
;
if ,
.
On entry, , and .
Constraint: if or , ;
if , .
On entry, , , .
Constraint: if or ,
;
if ,
.
On entry, , and .
Constraint: if or , ;
if , .
- NE_INT
On entry, .
Constraint: , where is obtained by counting for each selected real eigenvector and for each selected complex eigenvector.
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
On entry, and .
Constraint: .
- NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
Each computed right eigenvector
is the exact eigenvector of a nearby matrix
, such that
. Hence the residual is small:
However, eigenvectors corresponding to close or coincident eigenvalues may not accurately span the relevant subspaces.
Similar remarks apply to computed left eigenvectors.
The complex analogue of this function is
nag_zhsein (f08pxc).