A companion matrix in its standard form for a monic polynomial
|
(1)
|
of polynomial degree is the
square matrix
|
(2)
|
with 1s on the subdiagonal and the last column given by the negatives of the coefficients of . 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,
is the multiplication matrix of
on the quotient ring
in the ordered vector
basis
,
, ...,
, where
is a field containing the coefficients
of
.
When , ...,
form the standard basis,
a companion matrix satisfies
|
(3)
|
for , as well as
|
(4)
|
including
|
(5)
|
The matrix minimal polynomial of the companion matrix is therefore . In the monic convention,
its characteristic polynomial is
, where
is the identity matrix.
The alternative convention
used by CharacteristicPolynomial[m,
x] gives
.
Companion matrices are used to write a matrix in rational canonical form. In fact, any matrix whose matrix
minimal polynomial
has polynomial degree
is similar
to the companion matrix for
. The rational
canonical form is more interesting when the degree
of
is less than
.
The companion matrix for a polynomial in the variable
is implemented in the Wolfram
Language as CompanionMatrix[p,
x]. For example,
CompanionMatrix[x^3 + 2 x + 3, x]
returns
|
(6)
|
The term companion matrix is also used more broadly for a matrix with a prescribed characteristic polynomial.
For a real-rooted polynomial of polynomial degree
, Schmeisser (1993) constructs a real
symmetric matrix in tridiagonal matrix
form without first finding the roots. For distinct roots,
start with
and
, with
a monic polynomial, and
perform successive polynomial divisions in
the form
|
(7)
|
where
is a monic polynomial and
for
, ...,
. Write
and
. Then
|
(8)
|
with
|
(9)
|
The construction extends to repeated roots, with zero off-diagonal entries separating smaller blocks.
For example,
gives
|
(10)
|
whose eigenvalues are , 0, and 1. With distinct roots,
is similar
to the standard companion matrix. This need not hold for repeated roots.
For
, the zero
matrix has the required
characteristic polynomial, but its matrix minimal polynomial is
rather than
. It is therefore not similar
to the standard companion matrix.
Fiedler (2003) also factors a standard companion matrix into elementary matrices and uses their order to obtain a similar companion matrix with nonzero entries confined to the main diagonal and the first two diagonals on each side. This sparse construction differs from the real symmetric matrix construction, which requires a real-rooted polynomial.