TOPICS
Search

Companion Matrix


A companion matrix in its standard form for a monic polynomial

 a(x)=a_0+a_1x+...+a_(n-1)x^(n-1)+x^n
(1)

of polynomial degree n>=1 is the n×n square matrix

 A=[0 0 ... 0 -a_0; 1 0 ... 0 -a_1; 0 1 ... 0 -a_2; | | ... ... |; 0 0 ... 1 -a_(n-1)]
(2)

with 1s on the subdiagonal and the last column given by the negatives of the coefficients of a(x). Note that in the literature, the companion matrix is sometimes defined with the rows and columns switched, i.e., the transpose of the above matrix.

In this convention, A is the multiplication matrix of x on the quotient ring K[x]/<a(x)> in the ordered vector basis 1, x, ..., x^(n-1), where K is a field containing the coefficients of a(x).

When e_1, ..., e_n form the standard basis, a companion matrix satisfies

 Ae_i=e_(i+1)
(3)

for 1<=i<n, as well as

 Ae_n=-sum_(i=0)^(n-1)a_ie_(i+1),
(4)

including

 A^ne_1=-sum_(i=0)^(n-1)a_iA^ie_1.
(5)

The matrix minimal polynomial of the companion matrix is therefore a(x). In the monic convention, its characteristic polynomial is det(xI-A)=a(x), where I is the identity matrix. The alternative convention det(A-xI) used by CharacteristicPolynomial[m, x] gives (-1)^na(x).

Companion matrices are used to write a matrix in rational canonical form. In fact, any n×n matrix whose matrix minimal polynomial p(x) has polynomial degree n is similar to the companion matrix for p(x). The rational canonical form is more interesting when the degree of p(x) is less than n.

The companion matrix for a polynomial p in the variable x is implemented in the Wolfram Language as CompanionMatrix[p, x]. For example,

CompanionMatrix[x^3 + 2 x + 3, x]

returns

 [0 0 -3; 1 0 -2; 0 1 0].
(6)

The term companion matrix is also used more broadly for a matrix with a prescribed characteristic polynomial. For a real-rooted polynomial p of polynomial degree n, Schmeisser (1993, pp. 13-14) constructs a real symmetric matrix in tridiagonal matrix form without first finding the roots. For distinct roots, start with f_0=p and f_1=p^'/n, with p a monic polynomial, and perform successive polynomial divisions in the form

 f_(i-1)(x)=(x-d_i)f_i(x)-c_if_(i+1)(x),
(7)

where f_(i+1) is a monic polynomial and c_i>0 for i=1, ..., n-1. Write f_(n-1)(x)=x-d_n and f_n=1. Then

 T=[d_1 sqrt(c_1) 0 ...; sqrt(c_1) d_2 sqrt(c_2) ...; 0 sqrt(c_2) d_3 ...; | | | ...],
(8)

with

 det(xI-T)=p(x).
(9)

The construction extends to repeated roots, with zero off-diagonal entries separating smaller blocks.

For example, p(x)=x^3-x gives

 T=[0 sqrt(2/3) 0; sqrt(2/3) 0 1/sqrt(3); 0 1/sqrt(3) 0],
(10)

whose eigenvalues are -1, 0, and 1. With distinct roots, T is similar to the standard companion matrix. This need not hold for repeated roots. For p(x)=x^3, the zero 3×3 matrix has the required characteristic polynomial, but its matrix minimal polynomial is x rather than x^3. It is therefore not similar to the standard companion matrix.


See also

Characteristic Polynomial, Eigenvalue, Jacobi Matrix, Matrix, Matrix Minimal Polynomial, Multiplication Matrix, Rational Canonical Form, Real-Rooted Polynomial, Real Symmetric Matrix, Tridiagonal Matrix

Portions of this entry contributed by Todd Rowland

Explore with Wolfram|Alpha

References

Fiedler, M. "Expressing a Polynomial as the Characteristic Polynomial of a Symmetric Matrix." Lin. Alg. Appl. 141, 265-270, 1990. https://doi.org/10.1016/0024-3795(90)90323-5.Malek, F. and Vaillancourt, R. "A Composite Polynomial Zerofinding Matrix Algorithm." Comput. Math. Appl. 30, 37-47, 1995. https://doi.org/10.1016/0898-1221(95)00076-B.Schmeisser, G. "A Real Symmetric Tridiagonal Matrix with a Given Characteristic Polynomial." Lin. Alg. Appl. 193, 11-18, 1993. https://doi.org/10.1016/0024-3795(93)90268-S.Trott, M. "Relationships Among the Orthogonal Polynomials." §2.9 in The Mathematica GuideBook for Symbolics. New York: Springer-Verlag, 2006. https://doi.org/10.1007/0-387-28815-5. https://www.mathematicaguidebooks.org/.Weigert, S. "A Quantum Search for Zeros of Polynomials." J. Opt. B 5, S586-S588, 2003. https://doi.org/10.1088/1464-4266/5/6/007. https://arxiv.org/abs/quant-ph/0305177.

Referenced on Wolfram|Alpha

Companion Matrix

Cite this as:

Weisstein, Eric W., with contributions by Todd Rowland. "Companion Matrix." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CompanionMatrix.html

Subject classifications