-
Notifications
You must be signed in to change notification settings - Fork 76
Pedagogy: add 60_linear_algebra_2/225 — QZ algorithm with a genuine engineering example #443
Description
Context
The eigenvalue arc in 60_linear_algebra_2 now runs: 200 Power → 210 Jacobi → 212 Generalized eig (scipy.linalg.eigh) → 220 QR → 222 vibration (state-space + QR, mode shapes). 220 already teases the QZ algorithm (Moler & Stewart, 1973) as the generalized-eigenproblem extension of QR. A 225 notebook would complete the arc by actually doing QZ — on a genuine engineering example.
The catch (why the obvious example doesn't motivate QZ)
QZ (scipy.linalg.eig on a matrix pencil) is only genuinely needed when you cannot reduce to a symmetric-definite standard problem. The tempting example — K φ = ω2 M φ with a massless DOF (singular M) — is not a clean QZ case: since K is SPD you can just swap roles, eigh(M, K) solves M φ = (1/ω2) K φ cleanly, and the massless mode appears as 1/ω2 = 0. Verified.
QZ is genuinely forced only when the pencil is non-symmetric, or when neither matrix can serve as an SPD B (both singular/indefinite).
A verified bridge from 222
222 inverts M to build the state-space matrix and runs QR. If a DOF is massless, M−1 doesn't exist — the QR state-space can't even be formed. Writing the system in descriptor form E ż =  z with E = diag(I, M) singular and  non-symmetric forces QZ. Verified: eigh can't apply, M−1 raises LinAlgError, and eig(Â, E) returns the finite mode (ω ≈ 18.97 rad/s) plus genuine inf eigenvalues for the massless coordinate.
Candidate engineering examples (pick one)
- Massless-DOF descriptor — extends
222directly; non-symmetric pencil + singularE; the ∞ eigenvalue = a massless/quasi-static DOF. Lightest, most continuous with the existing thread. (verified) - Buckling / critical load —
K x = λ K_G x, λ = critical load factor (when does the column/frame buckle); geometric stiffnessK_Gis indefinite/singular; non-buckling modes appear as λ = ∞. Very tangible engineering meaning, but needs a small geometric-stiffness model built from scratch. - Rotordynamics (gyroscopic whirl) —
M ẍ + G ẋ + K x = 0with skew-symmetric gyroscopicG→ genuinely non-symmetric generalized eigenproblem; whirl frequencies split with spin speed (Campbell diagram). Most obviously "needs QZ", but heaviest (quadratic eigenproblem, complex modes).
Done =
A bilingual 60_linear_algebra_2/225 notebook that:
- states the generalized problem
A x = λ B x, - shows why
eigh/reduction fail on the chosen example, - solves with
scipy.linalg.eig/scipy.linalg.ordqz, exposing theα/βrepresentation, - interprets the infinite (and/or complex) eigenvalues physically,
- notes
B = Irecovers the QR algorithm, - uses concept-name cross-references only (renumber-proof),
- is added to the
60link-page and verified headless (CI=true jupyter nbconvert --execute).
Recommendation: option 1 for continuity with 212/222; option 2 if a more tangible engineering hook is preferred. Decision deferred (parked here from the 2026年06月01日 session).