Sylvester and Bezout matrices




1  Introduction

Let f= f0 +··· + fm  xm and g= g0 +··· + gn  xn be two polynomials of degree m and n respectively. The Sylvester matrix of f and g is the matrix of
f, x  f, ..., x
d1-1
 
  f, g, x  g, ..., x
d0-1
 
  g
in the monomial basis. It has the following form:
é
ê
ê
ê
ê
ê
ê
ê
ê
ê
ê
ë
f0   0 g0   0
· ·  
 · 
  ·
  · ·  
 · 
  ·
 
·   f0 ·   g0
fm   · gn   ·
  ·  
 · 
  ·
·   ·  
 · 
  ·
·
0   fm 0   gn
ù
ú
ú
ú
ú
ú
ú
ú
ú
ú
ú
û
The Bezoutian of f and g is the bivariate polynomial
Qf,g(x,y)=
f(xg(y) - f(yg(x)

x-y
=
 
S
0 £ i,j£ d-1
qi,jf,g xi yj
and its matrix is
Bf,g = é
ê
ê
ê
ê
ê
ë
q0,0f,g ··· q0,d-1f,g
·
·
·
  ·
·
·
qd-1,0f,g ··· qd-1,d-1f,g
ù
ú
ú
ú
ú
ú
û
where d=max(m,n).



2  Implementation

upoly/UniReslt.H

template < class REP, class R>  VAL< REP*>  Bezout(const UPolyDense< R>  & P, const UPolyDense< R>  & Q)
The Bezout matrix of P and Q.

template < class R>  VAL< MatStruct< hankel< typename R::value_type>  > *>  Bezout(const R & P)
The Bezout matrix of P and 1. The result is a Hankel matrix.

template < class REP, class R>  VAL< REP*>  Sylvester(const UPolyDense< R>  & P, const UPolyDense< R>  & Q)
The Sylvester matrix of P and Q.

template < class R, class REP>  VAL< REP*>  Sylvester(const UPolyDense< R>  & P, const UPolyDense< R>  & Q, char c)
The Sylvester matrix, with the maximum degree coefficient at the beginning.

template < class REP, class R>  VAL< REP*>  Companion(const UPolyDense< R>  & P)
The companion matrix of a polynomial P.