gees(3)
β¨ NAME β¨
Okay bestie, welcome to gees(3) β literally the Schur form page, and it's giving iconic numerical linear algebra energy. The function is gees, and the one-liner is: gees β gees: Schur form. No cap, that's the whole name vibe. π
π SYNOPSIS π
π Functions π
β cgees β
subroutine cgees (jobvs, sort, select, n, a, lda, sdim, w, vs, ldvs,
work, lwork, rwork, bwork, info)
CGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
β dgees β
subroutine dgees (jobvs, sort, select, n, a, lda, sdim, wr, wi, vs,
ldvs, work, lwork, bwork, info)
DGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
β sgees β
subroutine sgees (jobvs, sort, select, n, a, lda, sdim, wr, wi, vs,
ldvs, work, lwork, bwork, info)
SGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
β zgees β
subroutine zgees (jobvs, sort, select, n, a, lda, sdim, w, vs, ldvs,
work, lwork, rwork, bwork, info)
ZGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
π¦ Detailed Description π¦
This section is lowkey just a runway to the function docs, bestie. The real detail is in the Function Documentation section right below. Let's go. β¨
πΈ Function Documentation πΈ
π cgees π
subroutine cgees (character jobvs, character sort, external select, integer
n, complex, dimension( lda, * ) a, integer lda, integer sdim, complex,
dimension( * ) w, complex, dimension( ldvs, * ) vs, integer ldvs,
complex, dimension( * ) work, integer lwork, real, dimension( * ) rwork,
logical, dimension( * ) bwork, integer info)
CGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
π― Purpose π―
Okay so CGEES is the complex one, and here's the tea: for an N-by-N complex nonsymmetric matrix A, it computes the eigenvalues, the Schur form T, and β optionally β the matrix of Schur vectors Z. That gives you the Schur factorization A = Z*T*(Z**H). Iconic. β¨
If you want, it also orders the eigenvalues on the diagonal of the Schur form so the selected eigenvalues are at the top left. The leading columns of Z then form an orthonormal basis for the invariant subspace corresponding to those selected eigenvalues. Slay. π
And real quick: a complex matrix is in Schur form if it is upper triangular. Periodt.
π§ Parameters π§
JOBVSisCHARACTER*1:= 'N': Schur vectors are not computed;= 'V': Schur vectors are computed.
SORTisCHARACTER*1and specifies whether or not to order the eigenvalues on the diagonal of the Schur form:= 'N': Eigenvalues are not ordered:= 'S': Eigenvalues are ordered (seeSELECT).
SELECTis aLOGICAL FUNCTIONof oneCOMPLEXargument.SELECTmust be declaredEXTERNALin the calling subroutine.- If
SORT = 'S',SELECTis used to select eigenvalues to order to the top left of the Schur form. - If
SORT = 'N',SELECTis not referenced. - The eigenvalue
W(j)is selected ifSELECT(W(j))is true.
NisINTEGERβ the order of the matrixA.N >= 0.AisCOMPLEX array, dimension (LDA,N).- On entry, the N-by-N matrix
A. - On exit,
Ahas been overwritten by its Schur formT.
- On entry, the N-by-N matrix
LDAisINTEGERβ the leading dimension of the arrayA.LDA >= max(1,N).SDIMisINTEGER.- If
SORT = 'N',SDIM = 0. - If
SORT = 'S',SDIM= number of eigenvalues for whichSELECTis true.
- If
WisCOMPLEX array, dimension (N).Wcontains the computed eigenvalues, in the same order that they appear on the diagonal of the output Schur formT.
VSisCOMPLEX array, dimension (LDVS,N).- If
JOBVS = 'V',VScontains the unitary matrixZof Schur vectors. - If
JOBVS = 'N',VSis not referenced.
- If
LDVSisINTEGERβ the leading dimension of the arrayVS.LDVS >= 1; ifJOBVS = 'V',LDVS >= N.WORKisCOMPLEX array, dimension (MAX(1,LWORK)).- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKisINTEGERβ the dimension of the arrayWORK.LWORK >= max(1,2*N).- For good performance,
LWORKmust generally be larger. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
- For good performance,
RWORKisREAL array, dimension (N).BWORKisLOGICAL array, dimension (N).- Not referenced if
SORT = 'N'.
- Not referenced if
INFOisINTEGER:= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, andiis<= N: the QR algorithm failed to compute all the eigenvalues; elements1:ILO-1andi+1:NofWcontain those eigenvalues which have converged; ifJOBVS = 'V',VScontains the matrix which reducesAto its partially converged Schur form.= N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned);= N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfySELECT = .TRUE..This could also be caused by underflow due to scaling.
π Author π
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 195 of file cgees.f.
π dgees π
subroutine dgees (character jobvs, character sort, external select, integer
n, double precision, dimension( lda, * ) a, integer lda, integer sdim,
double precision, dimension( * ) wr, double precision, dimension( * )
wi, double precision, dimension( ldvs, * ) vs, integer ldvs, double
precision, dimension( * ) work, integer lwork, logical, dimension( * )
bwork, integer info)
DGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
π― Purpose π―
DGEES is the real nonsymmetric version, bestie. For an N-by-N real nonsymmetric matrix A, it computes the eigenvalues, the real Schur form T, and β optionally β the matrix of Schur vectors Z. That's the Schur factorization A = Z*T*(Z**T). No cap. π
It can also order the eigenvalues on the diagonal of the real Schur form so selected eigenvalues are at the top left. The leading columns of Z then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues. Obsessed. π«Ά
A matrix is in real Schur form if it is upper quasi-triangular with 1-by-1 and 2-by-2 blocks. The 2-by-2 blocks get standardized in the form
[ a b ]
[ c a ]
where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc). Cute. π
π§ Parameters π§
JOBVSisCHARACTER*1:= 'N': Schur vectors are not computed;= 'V': Schur vectors are computed.
SORTisCHARACTER*1and specifies whether or not to order the eigenvalues on the diagonal of the Schur form:= 'N': Eigenvalues are not ordered;= 'S': Eigenvalues are ordered (seeSELECT).
SELECTis aLOGICAL FUNCTIONof twoDOUBLE PRECISIONarguments.SELECTmust be declaredEXTERNALin the calling subroutine.- If
SORT = 'S',SELECTis used to select eigenvalues to sort to the top left of the Schur form. - If
SORT = 'N',SELECTis not referenced. - An eigenvalue
WR(j)+sqrt(-1)*WI(j)is selected ifSELECT(WR(j),WI(j))is true; i.e., if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. - Note that a selected complex eigenvalue may no longer satisfy
SELECT(WR(j),WI(j)) = .TRUE.after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned); in this caseINFOis set toN+2(seeINFObelow).
NisINTEGERβ the order of the matrixA.N >= 0.AisDOUBLE PRECISION array, dimension (LDA,N).- On entry, the N-by-N matrix
A. - On exit,
Ahas been overwritten by its real Schur formT.
- On entry, the N-by-N matrix
LDAisINTEGERβ the leading dimension of the arrayA.LDA >= max(1,N).SDIMisINTEGER.- If
SORT = 'N',SDIM = 0. - If
SORT = 'S',SDIM= number of eigenvalues (after sorting) for whichSELECTis true. (Complex conjugate pairs for whichSELECTis true for either eigenvalue count as 2.)
- If
WRisDOUBLE PRECISION array, dimension (N).WIisDOUBLE PRECISION array, dimension (N).WRandWIcontain the real and imaginary parts, respectively, of the computed eigenvalues in the same order that they appear on the diagonal of the output Schur formT.- Complex conjugate pairs of eigenvalues will appear consecutively with the eigenvalue having the positive imaginary part first.
VSβDOUBLE PRECISIONarray, dimension(LDVS,N). Bestie, this is your Schur vector drop-off point β¨ IfJOBVS = 'V',VScontains the orthogonal matrixZof Schur vectors. IfJOBVS = 'N',VSis literally not referenced β she's off the invite list, no hard feelings π«ΆLDVSβINTEGER. The leading dimension of the arrayVS.LDVS >= 1; and ifJOBVS = 'V', thenLDVS >= N. Respect the dimension rules or she WILL be mad πWORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)contains the optimalLWORK. It's giving "receipts on the way out" π§ΎLWORKβINTEGER. The dimension of the arrayWORK.LWORK >= max(1,3*N). For good performance,LWORKmust generally be larger β ngl she'll run, but she'll be sluggish, and nobody wants that πΈ
Also, if LWORK = -1, then a workspace query is assumed: the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. Peak "just asking for a friend" energy, lowkey iconic π
BWORKβLOGICALarray, dimension(N). Not referenced ifSORT = 'N'β she's literally just vibing in the corner πINFOβINTEGER. The whole mood report, fr fr:= 0: successful exit. Slay. We ate π< 0: ifINFO = -i, the i-th argument had an illegal value. Someone did NOT read the rules π> 0: ifINFO = i, andiis:<= N: the QR algorithm failed to compute all the eigenvalues; elements1:ILO-1andi+1:NofWRandWIcontain those eigenvalues which have converged; ifJOBVS = 'V',VScontains the matrix which reducesAto its partially converged Schur form. Half-finished era π= N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned). They're too close, bestie, it's complicated π₯= N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfySELECT=.TRUE.. This could also be caused by underflow due to scaling. Roundoff said "not today" π
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 214 of file dgees.f.
subroutine sgees
subroutine sgees (character jobvs, character sort, external select, integer
n, real, dimension( lda, * ) a, integer lda, integer sdim, real,
dimension( * ) wr, real, dimension( * ) wi, real, dimension( ldvs, * )
vs, integer ldvs, real, dimension( * ) work, integer lwork, logical,
dimension( * ) bwork, integer info)
SGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices ππ«
Purpose:
Okay so picture this π
SGEES computes, for an N-by-N real nonsymmetric matrix A, the eigenvalues, the real Schur form T, and, optionally, the matrix of Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T). Iconic factorization behavior, no notes π
Optionally, it also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left. The leading columns of Z then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues. Main character eigenvalues get the best seats in the house π
A matrix is in real Schur form if it is upper quasi-triangular with 1-by-1 and 2-by-2 blocks. The 2-by-2 blocks will be standardized in the form
[ a b ]
[ c a ]
where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc). Tiny block, big feelings π
Parameters
JOBVSβCHARACTER*1. Are we doing Schur vectors or not, bestie?= 'N': Schur vectors are not computed.= 'V': Schur vectors are computed. Let's goooo π
SORTβCHARACTER*1. Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.= 'N': Eigenvalues are not ordered.= 'S': Eigenvalues are ordered (seeSELECT). Aesthetic diagonal, we love to see it β¨
SELECTβSELECTis aLOGICAL FUNCTIONof twoREALarguments.SELECTmust be declaredEXTERNALin the calling subroutine β don't forget, this is a whole thing, it will not work otherwise π€- If
SORT = 'S',SELECTis used to select eigenvalues to sort to the top left of the Schur form. - If
SORT = 'N',SELECTis not referenced. - An eigenvalue
WR(j)+sqrt(-1)*WI(j)is selected ifSELECT(WR(j),WI(j))is true; i.e., if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. Package deal, no splitting the pair π«Ά - Note that a selected complex eigenvalue may no longer satisfy
SELECT(WR(j),WI(j)) = .TRUE.after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned); in this caseINFOis set toN+2(seeINFObelow). The vibes shifted mid-reorder, it happens π
- If
NβINTEGER. The order of the matrixA.N >= 0. Zero is allowed, she's just small πAβREALarray, dimension(LDA,N). On entry, theN-by-NmatrixA. On exit,Ahas been overwritten by its real Schur formT. She was transformed, glow-up complete πΈLDAβINTEGER. The leading dimension of the arrayA.LDA >= max(1,N). Rules are rules, bestie πSDIMβINTEGER. The selected-count check-in:- If
SORT = 'N',SDIM = 0. - If
SORT = 'S',SDIM= number of eigenvalues (after sorting) for whichSELECTis true. (Complex conjugate pairs for whichSELECTis true for either eigenvalue count as 2.) Both halves count, that's the rule, periodt π
- If
WRβREALarray, dimension(N).WIβREALarray, dimension(N).WRandWIcontain the real and imaginary parts, respectively, of the computed eigenvalues in the same order that they appear on the diagonal of the output Schur formT. Complex conjugate pairs of eigenvalues will appear consecutively with the eigenvalue having the positive imaginary part first. Positivity first, she's an optimist β¨VSβREALarray, dimension(LDVS,N). IfJOBVS = 'V',VScontains the orthogonal matrixZof Schur vectors. IfJOBVS = 'N',VSis not referenced. Living rent-free, unreferenced π¦LDVSβINTEGER. The leading dimension of the arrayVS.LDVS >= 1; ifJOBVS = 'V',LDVS >= N. Bestie, check it twice πWORKβREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)contains the optimalLWORK. Receipts, as promised π§ΎLWORKβINTEGER. The dimension of the arrayWORK.LWORK >= max(1,3*N). For good performance,LWORKmust generally be larger. Give her room to breathe π
Also, if LWORK = -1, then a workspace query is assumed: the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. Speedrun mode, zero scolding π«
BWORKβLOGICALarray, dimension(N). Not referenced ifSORT = 'N'β she's unbothered, moisturized πINFOβINTEGER. The full story:= 0: successful exit. We did it, bestie π< 0: ifINFO = -i, the i-th argument had an illegal value. Somebody skipped the syllabus π> 0: ifINFO = i, andiis:<= N: the QR algorithm failed to compute all the eigenvalues; elements1:ILO-1andi+1:NofWRandWIcontain those eigenvalues which have converged; ifJOBVS = 'V',VScontains the matrix which reducesAto its partially converged Schur form. Partial convergence era, we've all been there π= N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned). Too close, too messy, red flag π₯= N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfySELECT=.TRUE.. This could also be caused by underflow due to scaling. Roundoff hijacked the playlist π
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 214 of file sgees.f.
subroutine zgees
subroutine zgees (character jobvs, character sort, external select, integer
n, complex*16, dimension( lda, * ) a, integer lda, integer sdim,
complex*16, dimension( * ) w, complex*16, dimension( ldvs, * ) vs,
integer ldvs, complex*16, dimension( * ) work, integer lwork, double
precision, dimension( * ) rwork, logical, dimension( * ) bwork, integer
info)
ZGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices ππ«
Purpose:
ZGEES computes, for an N-by-N complex nonsymmetric matrix A, the eigenvalues, the Schur form T, and, optionally, the matrix of Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**H). Note the **H β complex edition hits different π
Optionally, it also orders the eigenvalues on the diagonal of the Schur form so that selected eigenvalues are at the top left. The leading columns of Z then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues. Front-row seats for the chosen ones π
A complex matrix is in Schur form if it is upper triangular. Simple as that β no 2-by-2 block drama over here, we're complex, we're clean, we're slaying β¨
Parameters
JOBVSβCHARACTER*1. Schur vectors: in or out?= 'N': Schur vectors are not computed.= 'V': Schur vectors are computed. Say less, we're computing π
SORTβCHARACTER*1. Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.= 'N': Eigenvalues are not ordered:= 'S': Eigenvalues are ordered (seeSELECT). Organized queen behavior πΈ
SELECTβ
SELECT π
okay so SELECT is a LOGICAL FUNCTION of one COMPLEX*16 argument, and bestie, you have to declare it EXTERNAL in the calling subroutine or it will simply not work, no cap.
- if
SORT = 'S',SELECTis literally the thing used to pick which eigenvalues get ordered to the top left of the Schur form π - if
SORT = 'N',SELECTis not referenced β she's off duty, don't worry abt her π - the eigenvalue
W(j)gets selected ifSELECT(W(j))is true. that's it, that's the whole vibe check β¨
N π¦
N is INTEGER β the order of the matrix A. and N >= 0. be normal abt it π
A πΈ
A is a COMPLEX*16 array, dimension (LDA,N).
- on entry, it's the
N-by-NmatrixA. iconic, she's herself π - on exit,
Ahas been overwritten by its Schur formT. girl got a whole glow-up, she does not come back the same π
LDA β¨
LDA is INTEGER β the leading dimension of the array A, and LDA >= max(1,N). respect the constraint fr fr
SDIM π
SDIM is INTEGER.
- if
SORT = 'N', thenSDIM = 0(she's empty, she's at peace) - if
SORT = 'S', thenSDIM =number of eigenvalues for whichSELECTis true β i.e. the count of the chosen ones π
W β
W is a COMPLEX*16 array, dimension (N).
W contains the computed eigenvalues, in the same order that they appear on the diagonal of the output Schur form T. order matters, bestie, do not shuffle π«Ά
VS π¦
VS is a COMPLEX*16 array, dimension (LDVS,N).
- if
JOBVS = 'V',VScontains the unitary matrixZof Schur vectors π - if
JOBVS = 'N',VSis not referenced β she's not invited to this one
LDVS π
LDVS is INTEGER β the leading dimension of the array VS. LDVS >= 1; and if JOBVS = 'V', then LDVS >= N. conditional queen π
WORK π₯
WORK is a COMPLEX*16 array, dimension (MAX(1,LWORK)).
on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. she's snitching on the perfect size, love that for her β¨
LWORK π
LWORK is INTEGER β the dimension of the array WORK. LWORK >= max(1,2*N).
for good performance, LWORK must generally be larger. lowkey the bigger the better, she's high-maintenance like that π
ifLWORK = -1, then a workspace query is assumed. the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. so like, she's just window shopping, no purchase, no complaints π
RWORK π
RWORK is a DOUBLE PRECISION array, dimension (N). real ones only, no imaginary energy here ngl
BWORK π§
BWORK is a LOGICAL array, dimension (N).
not referenced if SORT = 'N'. she's staying home π«Ά
INFO π
INFO is INTEGER.
= 0: successful exit. slay, we ate π< 0: ifINFO = -i, thei-th argument had an illegal value. somebody misbehaved π> 0: ifINFO = i, andiis:<= N: the QR algorithm failed to compute all the eigenvalues; elements1:ILO-1andi+1:NofWcontain those eigenvalues which have converged; ifJOBVS = 'V',VScontains the matrix which reducesAto its partially converged Schur form. (partially converged is still a vibe, ok, she did her best π)= N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate β the problem is very ill-conditioned. this is the "they're too similar to tell apart" situation and it's giving messy π= N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfySELECT = .TRUE.. this could also be caused by underflow due to scaling. so like, either roundoff or underflow ruined the plan. very "it's not you it's the floating point" energy π«
Author π
the whole squad that made this happen:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 195 of file zgees.f.
Author β¨
Generated automatically by Doxygen for LAPACK from the source code. iykyk, the docs wrote themselves (kind of) π«Ά
and that's a wrap on this LAPACK page bestie!! πβ¨ LAPACK Version 3.12.0, the gees(3) page β go forth and compute, you absolute icon, no cap πππ¦
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms