1SGGEV(1) LAPACK driver routine (version 3.2) SGGEV(1)
2
3
4
6 SGGEV - computes for a pair of N-by-N real nonsymmetric matrices (A,B)
7
9 SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
10 BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
11
12 CHARACTER JOBVL, JOBVR
13
14 INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
15
16 REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ), B( LDB, * ),
17 BETA( * ), VL( LDVL, * ), VR( LDVR, * ), WORK( * )
18
20 SGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)
21 the generalized eigenvalues, and optionally, the left and/or right gen‐
22 eralized eigenvectors.
23 A generalized eigenvalue for a pair of matrices (A,B) is a scalar
24 lambda or a ratio alpha/beta = lambda, such that A - lambda*B is singu‐
25 lar. It is usually represented as the pair (alpha,beta), as there is a
26 reasonable interpretation for beta=0, and even for both being zero.
27 The right eigenvector v(j) corresponding to the eigenvalue lambda(j) of
28 (A,B) satisfies
29 A * v(j) = lambda(j) * B * v(j).
30 The left eigenvector u(j) corresponding to the eigenvalue lambda(j) of
31 (A,B) satisfies
32 u(j)**H * A = lambda(j) * u(j)**H * B . where
33 u(j)**H is the conjugate-transpose of u(j).
34
36 JOBVL (input) CHARACTER*1
37 = 'N': do not compute the left generalized eigenvectors;
38 = 'V': compute the left generalized eigenvectors.
39
40 JOBVR (input) CHARACTER*1
41 = 'N': do not compute the right generalized eigenvectors;
42 = 'V': compute the right generalized eigenvectors.
43
44 N (input) INTEGER
45 The order of the matrices A, B, VL, and VR. N >= 0.
46
47 A (input/output) REAL array, dimension (LDA, N)
48 On entry, the matrix A in the pair (A,B). On exit, A has been
49 overwritten.
50
51 LDA (input) INTEGER
52 The leading dimension of A. LDA >= max(1,N).
53
54 B (input/output) REAL array, dimension (LDB, N)
55 On entry, the matrix B in the pair (A,B). On exit, B has been
56 overwritten.
57
58 LDB (input) INTEGER
59 The leading dimension of B. LDB >= max(1,N).
60
61 ALPHAR (output) REAL array, dimension (N)
62 ALPHAI (output) REAL array, dimension (N) BETA (output)
63 REAL array, dimension (N) On exit, (ALPHAR(j) +
64 ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the generalized eigen‐
65 values. If ALPHAI(j) is zero, then the j-th eigenvalue is
66 real; if positive, then the j-th and (j+1)-st eigenvalues are a
67 complex conjugate pair, with ALPHAI(j+1) negative. Note: the
68 quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) may easily
69 over- or underflow, and BETA(j) may even be zero. Thus, the
70 user should avoid naively computing the ratio alpha/beta. How‐
71 ever, ALPHAR and ALPHAI will be always less than and usually
72 comparable with norm(A) in magnitude, and BETA always less than
73 and usually comparable with norm(B).
74
75 VL (output) REAL array, dimension (LDVL,N)
76 If JOBVL = 'V', the left eigenvectors u(j) are stored one after
77 another in the columns of VL, in the same order as their eigen‐
78 values. If the j-th eigenvalue is real, then u(j) = VL(:,j),
79 the j-th column of VL. If the j-th and (j+1)-th eigenvalues
80 form a complex conjugate pair, then u(j) = VL(:,j)+i*VL(:,j+1)
81 and u(j+1) = VL(:,j)-i*VL(:,j+1). Each eigenvector is scaled
82 so the largest component has abs(real part)+abs(imag. part)=1.
83 Not referenced if JOBVL = 'N'.
84
85 LDVL (input) INTEGER
86 The leading dimension of the matrix VL. LDVL >= 1, and if JOBVL
87 = 'V', LDVL >= N.
88
89 VR (output) REAL array, dimension (LDVR,N)
90 If JOBVR = 'V', the right eigenvectors v(j) are stored one
91 after another in the columns of VR, in the same order as their
92 eigenvalues. If the j-th eigenvalue is real, then v(j) =
93 VR(:,j), the j-th column of VR. If the j-th and (j+1)-th eigen‐
94 values form a complex conjugate pair, then v(j) =
95 VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1). Each
96 eigenvector is scaled so the largest component has abs(real
97 part)+abs(imag. part)=1. Not referenced if JOBVR = 'N'.
98
99 LDVR (input) INTEGER
100 The leading dimension of the matrix VR. LDVR >= 1, and if JOBVR
101 = 'V', LDVR >= N.
102
103 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
104 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
105
106 LWORK (input) INTEGER
107 The dimension of the array WORK. LWORK >= max(1,8*N). For
108 good performance, LWORK must generally be larger. If LWORK =
109 -1, then a workspace query is assumed; the routine only calcu‐
110 lates the optimal size of the WORK array, returns this value as
111 the first entry of the WORK array, and no error message related
112 to LWORK is issued by XERBLA.
113
114 INFO (output) INTEGER
115 = 0: successful exit
116 < 0: if INFO = -i, the i-th argument had an illegal value.
117 = 1,...,N: The QZ iteration failed. No eigenvectors have been
118 calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) should be
119 correct for j=INFO+1,...,N. > N: =N+1: other than QZ itera‐
120 tion failed in SHGEQZ.
121 =N+2: error return from STGEVC.
122
123
124
125 LAPACK driver routine (version 3.N2o)vember 2008 SGGEV(1)