Function Repository Resource:

SylvesterMatrix

Source Notebook

Generate the Sylvester matrix of two univariate polynomials

Contributed by: Jan Mangaldan

ResourceFunction["SylvesterMatrix"][poly1,poly2,var]

returns the Sylvester matrix of the polynomials poly1 and poly2 with respect to the variable var.

Details

The Sylvester matrix has dimensions (m+n)×(m+n), where m and n are respectively the degrees of poly1 and poly2.
The determinant of the Sylvester matrix of two polynomials is equal to their resultant.

Examples

Basic Examples (1) 

The Sylvester matrix of two polynomials:

In[1]:=
ResourceFunction[
  "SylvesterMatrix"][(x - a) (x - b), (x - c) (x - d) (x - e), x] // MatrixForm
Out[1]=

Scope (2) 

The Sylvester matrix of polynomials with numeric coefficients:

In[2]:=
ResourceFunction["SylvesterMatrix"][x^2 - 2 x + 7, x^3 - x + 5, x] // MatrixForm
Out[2]=

The Sylvester matrix of polynomials with parametric coefficients:

In[3]:=
ResourceFunction["SylvesterMatrix"][
  a x^2 + b x + c, (a - b) x^3 + (a - c) x^2 + (b - c) x + 9, x] // MatrixForm
Out[3]=

Properties and Relations (2) 

The determinant of the Sylvester matrix of two polynomials is equal to their resultant:

In[4]:=
Det[ResourceFunction[
  "SylvesterMatrix"][(x - 1) (x - 2) (x - 3), (x - 4) (x - 5) (x - 6),
   x]]
Out[4]=
In[5]:=
Resultant[(x - 1) (x - 2) (x - 3), (x - 4) (x - 5) (x - 6), x]
Out[5]=

If one polynomial is constant, the Sylvester matrix is a diagonal matrix:

In[6]:=
ResourceFunction["SylvesterMatrix"][c, (x - 4) (x - 5) (x - 6), x] // MatrixForm
Out[6]=

Version History

  • 1.0.0 – 19 February 2021

Related Resources

License Information