In mathematics, a **matrix polynomial** is a polynomial with matrices as variables. Given an ordinary, scalar-valued polynomial

P
(
x
)
=
∑
i
=
0
n
a
i
x
i
=
a
0
+
a
1
x
+
a
2
x
2
+
⋯
+
a
n
x
n
,
this polynomial evaluated at a matrix *A* is

P
(
A
)
=
∑
i
=
0
n
a
i
A
i
=
a
0
I
+
a
1
A
+
a
2
A
2
+
⋯
+
a
n
A
n
,
where *I* is the identity matrix.

A **matrix polynomial equation** is an equality between two matrix polynomials, which holds for the specific matrices in question. A **matrix polynomial identity** is a matrix polynomial equation which holds for all matrices *A* in a specified matrix ring *M*_{n}(*R*).

The characteristic polynomial of a matrix *A* is a scalar-valued polynomial, defined by
p
A
(
t
)
=
det
(
t
I
−
A
)
. The Cayley–Hamilton theorem states that if this polynomial is viewed as a matrix polynomial and evaluated at the matrix *A* itself, the result is the zero matrix:
p
A
(
A
)
=
0
. The characteristic polynomial is thus a polynomial which annihilates *A*.

There is a unique monic polynomial of minimal degree which annihilates *A*; this polynomial is the minimal polynomial. Any polynomial which annihilates *A* (such as the characteristic polynomial) is a multiple of the minimal polynomial.

It follows that given two polynomials *P* and *Q*, we have
P
(
A
)
=
Q
(
A
)
if and only if

P
(
j
)
(
λ
i
)
=
Q
(
j
)
(
λ
i
)
for
j
=
0
,
…
,
n
i
and
i
=
1
,
…
,
s
,
where
P
(
j
)
denotes the *j*th derivative of *P* and
λ
1
,
…
,
λ
s
are the eigenvalues of *A* with corresponding indices
n
1
,
…
,
n
s
(the index of an eigenvalue is the size of its largest Jordan block).

Matrix polynomials can be used to sum a matrix geometrical series as one would an ordinary geometric series,

S
=
I
+
A
+
A
2
+
⋯
+
A
n
A
S
=
A
+
A
2
+
A
3
+
⋯
+
A
n
+
1
(
I
−
A
)
S
=
S
−
A
S
=
I
−
A
n
+
1
S
=
(
I
−
A
)
−
1
(
I
−
A
n
+
1
)
If *I* − *A* is nonsingular one can evaluate the expression for the sum *S*.