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:
The Sylvester matrix associated to p and q is then the matrix obtained as follows:
Thus, if m = 4 and n = 3, the matrix is:
If one of the degrees is zero (that is the corresponding polynomial is a nonzero constant), 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.