Proofs: Companion matrix method
These are the human proofs of Companion matrix method, at full length.
Correctness of the companion matrix method full
This proof shows: correctness, termination, convergence-rate.
Let with and , and let be its companion matrix, with first row , ones on the subdiagonal and zeros elsewhere. Statements are in exact arithmetic unless they say otherwise.
Lemma 1 (the characteristic polynomial)
. Hence the eigenvalues of , counted with algebraic multiplicity, are the roots of counted with multiplicity.
Proof. Write and . Expand along the last column. The entry in position is and its minor is the determinant of an upper triangular matrix with on the diagonal, so it contributes . The entry in position is , and its minor is where is the companion matrix of . So , with , and by induction .
The vector satisfies exactly when , which gives the geometric picture: every root has a one-dimensional eigenspace, so is nonderogatory and a multiple root is a single Jordan block.
Lemma 2 (line L1)
If , then with . So recording roots at 0 and continuing with loses no root and adds none. Stripping leading zero coefficients only removes terms that are identically zero.
Lemma 3 (similarities preserve the eigenvalues)
Line L3 replaces by with diagonal and positive; each QR step of L8 replaces the active block by , where is a product of Givens rotations and hence unitary. Similar matrices have the same characteristic polynomial, so neither step changes the eigenvalues. Both preserve the upper Hessenberg form: has the same zero pattern as , and for an upper Hessenberg computed by Givens rotations on adjacent rows, is again upper Hessenberg.
In floating point, multiplying by powers of 2 is exact unless it overflows or underflows, so balancing introduces no rounding error. A QR step computed in floating point is the exact QR step of a matrix with for a modest constant (the backward stability of Givens rotations; Golub and Van Loan, Sections 5.1 and 7.4).
Lemma 4 (deflation)
If in an upper Hessenberg , then is block upper triangular with diagonal blocks (rows and columns ) and (rows and columns ), and the eigenvalues of are those of together with those of . When is its entry is an eigenvalue, which is what L6 outputs.
Proof. for block triangular matrices.
Line L5 sets to zero when . This is a perturbation of of norm at most , the same order as the rounding error of one QR step, so the computed eigenvalues are exact eigenvalues of a matrix within of the balanced companion matrix after all the steps (the errors add over the at most steps, which gives the factor that the standard analysis bounds by a modest polynomial in ).
Theorem 1 (correctness and termination)
Each pass of the loop L4 either outputs an eigenvalue and decreases (L6), or performs one QR step and increases the step count of the current eigenvalue, returning "failed" at L9 once that count reaches . So the loop stops after at most outputs and QR steps. If it returns at L10, the outputs together with the zeros of L1 are, in exact arithmetic, exactly the eigenvalues of the deflated matrices, which by Lemmas 1 to 4 are the roots of with multiplicity whenever every deflated entry was exactly zero; in floating point they are the exact eigenvalues of a matrix with .
Convergence rate
The following local facts hold for the shifted QR iteration on an unreduced Hessenberg matrix (Golub and Van Loan, Section 7.5; Watkins, The Matrix Eigenvalue Problem, Chapter 4); they are cited, not proved here. If the shift approaches a simple eigenvalue that is closer to it than all others, then , so the last subdiagonal entry tends to zero quadratically; with the Wilkinson shift on a symmetric matrix the rate is cubic. At an eigenvalue of multiplicity , which for a companion matrix is a single Jordan block, convergence is only linear and the computed eigenvalues differ from the root by about , since a perturbation of size of an Jordan block moves its eigenvalue by about .
Global convergence of the QR iteration with Wilkinson shifts is not proved for general nonsymmetric matrices, and there are matrices on which unmodified shift strategies cycle. The exceptional shift every 10 steps is a heuristic that breaks such cycles in practice. So the statement made on the page is: termination is guaranteed by the cap, correctness of what is returned is guaranteed up to the backward error above, and the fact that the cap is essentially never reached is observed, in the tests on 500 random polynomials and on the special families, not proved.
What is cited and not proved
The backward error bound of the computed QR steps, and the statement of Edelman and Murakami that the eigenvalue backward error of the balanced companion matrix corresponds to a small relative perturbation of the coefficients in most cases, are cited. The latter is not uniform: there are polynomials for which a backward stable eigenvalue computation on does not correspond to a small coefficientwise perturbation of , and the page's statements about accuracy are made in terms of the matrix.