F08NGF (DORMHR) multiplies an arbitrary real matrix
C by the real orthogonal matrix
Q which was determined by
F08NEF (DGEHRD) when reducing a real general matrix to Hessenberg form.
SUBROUTINE F08NGF ( |
SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, LDC, WORK, LWORK, INFO) |
INTEGER |
M, N, ILO, IHI, LDA, LDC, LWORK, INFO |
REAL (KIND=nag_wp) |
A(LDA,*), TAU(*), C(LDC,*), WORK(max(1,LWORK)) |
CHARACTER(1) |
SIDE, TRANS |
|
F08NGF (DORMHR) is intended to be used following a call to
F08NEF (DGEHRD), which reduces a real general matrix
A to upper Hessenberg form
H by an orthogonal similarity transformation:
A=QHQT.
F08NEF (DGEHRD) represents the matrix
Q as a product of
ihi-ilo elementary reflectors. Here
ilo and
ihi are values determined by
F08NHF (DGEBAL) when balancing the matrix; if the matrix has not been balanced,
ilo=1 and
ihi=n.
This routine may be used to form one of the matrix products
overwriting the result on
C (which may be any real rectangular matrix).
Golub G H and Van Loan C F (1996)
Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
The computed result differs from the exact result by a matrix
E such that
where
ε is the
machine precision.
The complex analogue of this routine is
F08NUF (ZUNMHR).
This example computes all the eigenvalues of the matrix
A, where
and those eigenvectors which correspond to eigenvalues
λ such that
Reλ<0. Here
A is general and must first be reduced to upper Hessenberg form
H by
F08NEF (DGEHRD). The program then calls
F08PEF (DHSEQR) to compute the eigenvalues, and
F08PKF (DHSEIN) to compute the required eigenvectors of
H by inverse iteration. Finally F08NGF (DORMHR) is called to transform the eigenvectors of
H back to eigenvectors of the original matrix
A.