1SGEEV(1) LAPACK driver routine (version 3.2) SGEEV(1)
2
3
4
6 SGEEV - computes for an N-by-N real nonsymmetric matrix A, the eigen‐
7 values and, optionally, the left and/or right eigenvectors
8
10 SUBROUTINE SGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR,
11 WORK, LWORK, INFO )
12
13 CHARACTER JOBVL, JOBVR
14
15 INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
16
17 REAL A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), WI( * ),
18 WORK( * ), WR( * )
19
21 SGEEV computes for an N-by-N real nonsymmetric matrix A, the eigenval‐
22 ues and, optionally, the left and/or right eigenvectors. The right
23 eigenvector v(j) of A satisfies
24 A * v(j) = lambda(j) * v(j)
25 where lambda(j) is its eigenvalue.
26 The left eigenvector u(j) of A satisfies
27 u(j)**H * A = lambda(j) * u(j)**H
28 where u(j)**H denotes the conjugate transpose of u(j).
29 The computed eigenvectors are normalized to have Euclidean norm equal
30 to 1 and largest component real.
31
33 JOBVL (input) CHARACTER*1
34 = 'N': left eigenvectors of A are not computed;
35 = 'V': left eigenvectors of A are computed.
36
37 JOBVR (input) CHARACTER*1
38 = 'N': right eigenvectors of A are not computed;
39 = 'V': right eigenvectors of A are computed.
40
41 N (input) INTEGER
42 The order of the matrix A. N >= 0.
43
44 A (input/output) REAL array, dimension (LDA,N)
45 On entry, the N-by-N matrix A. On exit, A has been overwrit‐
46 ten.
47
48 LDA (input) INTEGER
49 The leading dimension of the array A. LDA >= max(1,N).
50
51 WR (output) REAL array, dimension (N)
52 WI (output) REAL array, dimension (N) WR and WI contain
53 the real and imaginary parts, respectively, of the computed ei‐
54 genvalues. Complex conjugate pairs of eigenvalues appear con‐
55 secutively with the eigenvalue having the positive imaginary
56 part first.
57
58 VL (output) REAL array, dimension (LDVL,N)
59 If JOBVL = 'V', the left eigenvectors u(j) are stored one after
60 another in the columns of VL, in the same order as their eigen‐
61 values. If JOBVL = 'N', VL is not referenced. If the j-th ei‐
62 genvalue is real, then u(j) = VL(:,j), the j-th column of VL.
63 If the j-th and (j+1)-st eigenvalues form a complex conjugate
64 pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
65 u(j+1) = VL(:,j) - i*VL(:,j+1).
66
67 LDVL (input) INTEGER
68 The leading dimension of the array VL. LDVL >= 1; if JOBVL =
69 'V', LDVL >= N.
70
71 VR (output) REAL array, dimension (LDVR,N)
72 If JOBVR = 'V', the right eigenvectors v(j) are stored one
73 after another in the columns of VR, in the same order as their
74 eigenvalues. If JOBVR = 'N', VR is not referenced. If the j-
75 th eigenvalue is real, then v(j) = VR(:,j), the j-th column of
76 VR. If the j-th and (j+1)-st eigenvalues form a complex conju‐
77 gate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
78 v(j+1) = VR(:,j) - i*VR(:,j+1).
79
80 LDVR (input) INTEGER
81 The leading dimension of the array VR. LDVR >= 1; if JOBVR =
82 'V', LDVR >= N.
83
84 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
85 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
86
87 LWORK (input) INTEGER
88 The dimension of the array WORK. LWORK >= max(1,3*N), and if
89 JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good perfor‐
90 mance, LWORK must generally be larger. If LWORK = -1, then a
91 workspace query is assumed; the routine only calculates the
92 optimal size of the WORK array, returns this value as the first
93 entry of the WORK array, and no error message related to LWORK
94 is issued by XERBLA.
95
96 INFO (output) INTEGER
97 = 0: successful exit
98 < 0: if INFO = -i, the i-th argument had an illegal value.
99 > 0: if INFO = i, the QR algorithm failed to compute all the
100 eigenvalues, and no eigenvectors have been computed; elements
101 i+1:N of WR and WI contain eigenvalues which have converged.
102
103
104
105 LAPACK driver routine (version 3.N2o)vember 2008 SGEEV(1)