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