Companion matrix
In linear algebra, a companion matrix is a square matrix constructed from the coefficients of a monic polynomial such that the polynomial serves as both its characteristic polynomial and minimal polynomial.[1] This matrix, often associated with the work of Georg Frobenius from 1878, provides a canonical representation linking polynomials to linear transformations, and the term "companion matrix" was introduced by C.C. MacDuffee in 1933 as a translation of the German "Begleitmatrix."[2][3] For a monic polynomial p(x) = x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0 of degree n, the standard Frobenius companion matrix C is the n \times n matrix defined by 1's on the subdiagonal (positions (i+1, i) for i = 1 to n-1), zeros elsewhere except in the last row, which contains the negated coefficients [-a_0, -a_1, \dots, -a_{n-1}].[1] For example, when n=2 and p(x) = x^2 + a_1 x + a_0, the matrix is \begin{pmatrix} 0 & -a_0 \\ 1 & -a_1 \end{pmatrix}. [1] An alternative convention, often used in the rational canonical form, is the transpose of this structure, with 1's on the superdiagonal and the negated coefficients in the last column.[2][1] In either form, the eigenvalues of the companion matrix are precisely the roots of p(x); for the standard form, the corresponding right eigenvectors take the form of Vandermonde vectors [1, \lambda, \lambda^2, \dots, \lambda^{n-1}]^T for each root \lambda, while for the alternative form they are the reversed vectors [\lambda^{n-1}, \dots, \lambda, 1]^T.[4] Key properties of the companion matrix include its nonderogatory nature—meaning the geometric multiplicity of each eigenvalue is 1—and the fact that it is similar to any matrix sharing the same minimal polynomial of degree n.[1][2] It exhibits low-rank structure, expressible as a permutation matrix plus a rank-1 update, which aids numerical computations.[2] Companion matrices play a fundamental role in the rational canonical form, where any square matrix over a field is similar to a block-diagonal matrix with companion matrices of invariant factors on the diagonal blocks.[1] They are widely applied in computing polynomial roots by solving the associated eigenvalue problem, as implemented in algorithms like MATLAB'sroots function.[4][2] In the context of linear recurrence relations, such as the Fibonacci sequence, powers of the companion matrix generate the sequence terms from initial conditions, enabling closed-form solutions via diagonalization.[5] Additionally, they facilitate the reduction of higher-order linear differential equations or difference equations to systems of first-order equations, with applications in control theory and numerical analysis.[2]