Previous Page Next Page Contents

linalg::sylvester -- Sylvester matrix of two polynomials

Introduction

linalg::sylvester(p, q) returns the Sylvester matrix of the two polynomials p and q.

Call(s)

linalg::sylvester(p, q)
linalg::sylvester(f, g, x)

Parameters

p, q - polynomials
f, g - polynomials or polynomial expressions of positive degree
x - a variable

Returns

a matrix of the domain Dom::Matrix(R), where R is the coefficient domain of the polynomials (see below).

Related Functions

polylib::discrim, polylib::resultant

Details

Example 1

The Sylvester matrix of the two polynomials p = x^2+2*x-1 and q = x^4+1 over Z is the following 6 x 6 matrix:

>> delete x: Z := Dom::Integer:
   S := linalg::sylvester(poly(x^2 + 2*x - 1, Z), poly(x^4 + 1, Z))
                        +-                      -+
                        |  1, 2, -1,  0,  0,  0  |
                        |                        |
                        |  0, 1,  2, -1,  0,  0  |
                        |                        |
                        |  0, 0,  1,  2, -1,  0  |
                        |                        |
                        |  0, 0,  0,  1,  2, -1  |
                        |                        |
                        |  1, 0,  0,  0,  1,  0  |
                        |                        |
                        |  0, 1,  0,  0,  0,  1  |
                        +-                      -+

Example 2

If the polynomials have the built-in coefficient ring IntMod(m), then the Sylvester matrix is defined over the domain Dom::IntegerMod(m):

>> delete x: 
   S:= linalg::sylvester( 
     poly(x + 1, IntMod(7)), poly(x^2 - 2*x + 2, IntMod(7)) 
   )
                      +-                           -+
                      |  1 mod 7, 1 mod 7, 0 mod 7  |
                      |                             |
                      |  0 mod 7, 1 mod 7, 1 mod 7  |
                      |                             |
                      |  1 mod 7, 5 mod 7, 2 mod 7  |
                      +-                           -+
>> domtype(S)
                      Dom::Matrix(Dom::IntegerMod(7))

Example 3

The Sylvester matrix of the following two polynomial expressions with respect to the variable x is:

>> delete x, y: 
   S := linalg::sylvester(x + y^2, 2*x^3 - 1, x)
                            +-               -+
                            |      2          |
                            |  1, y ,  0,  0  |
                            |                 |
                            |          2      |
                            |  0,  1, y ,  0  |
                            |                 |
                            |              2  |
                            |  0,  0,  1, y   |
                            |                 |
                            |  2,  0,  0, -1  |
                            +-               -+
>> domtype(S)
                               Dom::Matrix()

The Sylvester matrix of these two polynomials with respect to y is the following 2 x 2 matrix:

>> linalg::sylvester(x + y^2, 2*x^3 - 1, y)
                         +-                    -+
                         |     3                |
                         |  2 x  - 1,     0     |
                         |                      |
                         |               3      |
                         |      0,    2 x  - 1  |
                         +-                    -+

Example 4

Here is an example for computing the Sylvester matrix of multivariate polynomials:

>> delete x, y: Q := Dom::Rational:
   T := linalg::sylvester(poly(x^2 - x + y, Q), poly(x + 2, Q), x)
                              +-          -+
                              |  1, -1, y  |
                              |            |
                              |  1,  2, 0  |
                              |            |
                              |  0,  1, 2  |
                              +-          -+
>> domtype( T )
      Dom::Matrix(Dom::DistributedPolynomial([y], Dom::Rational,
      
         LexOrder))

The Sylvester matrix of these two multivariate polynomials with respect to y is:

>> linalg::sylvester(poly(x^2 - x + y, Q), poly(x + 2, Q), y)
                                 +-     -+
                                 | x + 2 |
                                 +-     -+




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000