In mathematics, a Sylvester matrix is a matrix associated to two univariate polynomials with coefficients in a field or a commutative ring. The entries of the Sylvester matrix of two polynomials are coefficients of the polynomials. The determinant of the Sylvester matrix of two polynomials is their resultant, which is zero when the two polynomials have a common root (in case of coefficients in a field) or a non-constant common divisor (in case of coefficients in an integral domain).
Sylvester matrices are named after James Joseph Sylvester.
Formally, let p and q be two nonzero polynomials, respectively of degree m and n. Thus:
p(z)=p0+p1z+p2
2+ … +p | |
z | |
m |
m, q(z)=q | |
z | |
0+q |
1z+q2
2+ … +q | |
z | |
n |
zn.
(n+m) x (n+m)
\begin{pmatrix}pm&pm-1& … &p1&p0&0& … &0\end{pmatrix}.
\begin{pmatrix}qn&qn-1& … &q1&q0&0& … &0\end{pmatrix}.
Thus, if m = 4 and n = 3, the matrix is:
Sp,q=\begin{pmatrix}p4&p3&p2&p1&p0&0&0\\ 0&p4&p3&p2&p1&p0&0\\ 0&0&p4&p3&p2&p1&p0\\ q3&q2&q1&q0&0&0&0\\ 0&q3&q2&q1&q0&0&0\\ 0&0&q3&q2&q1&q0&0\\ 0&0&0&q3&q2&q1&q0 \end{pmatrix}.
If one of the degrees is zero (that is, the corresponding polynomial is a nonzero constant polynomial), then there are zero rows consisting of coefficients of the other polynomial, and the Sylvester matrix is a diagonal matrix of dimension the degree of the non-constant polynomial, with the all diagonal coefficients equal to the constant polynomial. If m = n = 0, then the Sylvester matrix is the empty matrix with zero rows and zero columns.
The above defined Sylvester matrix appears in a Sylvester paper of 1840. In a paper of 1853, Sylvester introduced the following matrix, which is, up to a permutation of the rows, the Sylvester matrix of p and q, which are both considered as having degree max(m, n).[1] This is thus a
2max(n,m) x 2max(n,m)
max(n,m)
m>n,
\begin{pmatrix}pm&pm-1& … &pn& … &p1&p0&0& … &0\\ 0& … &0&qn& … &q1&q0&0& … &0\end{pmatrix}.
max(n,m)-2
Thus, if m = 4 and n = 3, the matrix is:
\begin{pmatrix}p4&p3&p2&p1&p0&0&0&0\\ 0&q3&q2&q1&q0&0&0&0\\ 0&p4&p3&p2&p1&p0&0&0\\ 0&0&q3&q2&q1&q0&0&0\\ 0&0&p4&p3&p2&p1&p0&0\\ 0&0&0&q3&q2&q1&q0&0\\ 0&0&0&p4&p3&p2&p1&p0\\ 0&0&0&0&q3&q2&q1&q0\\ \end{pmatrix}.
The determinant of the 1853 matrix is, up to sign, the product of the determinant of the Sylvester matrix (which is called the resultant of p and q) by
m-n | |
p | |
m |
m\gen
These matrices are used in commutative algebra, e.g. to test if two polynomials have a (non-constant) common factor. In such a case, the determinant of the associated Sylvester matrix (which is called the resultant of the two polynomials) equals zero. The converse is also true.
The solutions of the simultaneous linear equations
{Sp,q
x
n
y
m
x,y
n-1
m-1
x(z) ⋅ p(z)+y(z) ⋅ q(z)=0,
\degx<\degq
\degy<\degp
Consequently the rank of the Sylvester matrix determines the degree of the greatest common divisor of p and q:
\deg(\gcd(p,q))=m+n-\operatorname{rank}Sp,q.