next | previous | forward | backward | up | index | toc

# sylvesterMatrix(RingElement,RingElement,RingElement)

## Synopsis

• Function: sylvesterMatrix
• Usage:
sylvesterMatrix(f,g,x)
• Inputs:
• f, , a polynomial in a ring R
• g, , a polynomial in the same ring
• x, , a variable in R
• Outputs:
• , the Sylvester matrix of f and g with respect to x

## Description

Its determinant is the resultant of f and g.
 i1 : R = ZZ/101[x,a,b,c,d,Degrees=>{1,1,2,1,2}]; i2 : R = ZZ[x,a,b,c,d] o2 = R o2 : PolynomialRing i3 : f = x^7+3*x^4+a*x+b 7 4 o3 = x + 3x + x*a + b o3 : R i4 : g = x^8+x^5+c*x+d 8 5 o4 = x + x + x*c + d o4 : R i5 : time eliminate(ideal(f,g),x) -- used 3.21341s (cpu); 2.9061s (thread); 0s (gc) 7 8 3 5 8 6 3 4 7 3 3 2 o5 = ideal(a b*c - a d + a b - b - 6a b*c - 18a b c + 7b c + 48a b c - ------------------------------------------------------------------------ 6 2 3 2 3 5 3 3 4 4 4 3 5 2 6 7 21b c - 46a b c + 35b c + 15a b*c - 35b c + 21b c - 7b c + b*c + ------------------------------------------------------------------------ 7 4 3 6 4 2 5 4 2 4 2 6a d + 21a b d - 8a*b d - 85a b c*d + 41a*b c*d + 79a b*c d - 85a*b c d ------------------------------------------------------------------------ 4 3 3 3 2 4 5 6 5 2 - 15a c d + 90a*b c d - 50a*b c d + 13a*b*c d - a*c d + 37a b*d - ------------------------------------------------------------------------ 2 4 2 5 2 2 3 2 2 2 2 2 2 3 2 2 4 2 20a b d - 33a c*d + 66a b c*d - 78a b c d + 38a b*c d - 6a c d - ------------------------------------------------------------------------ 3 2 3 3 3 3 2 3 4 4 2 5 5 2 4 16a b d + 25a b*c*d - 9a c d - 2a d - 6a b + 12a b*c + 84a b c - ------------------------------------------------------------------------ 2 3 2 2 2 3 2 4 6 3 3 6 328a b c + 428a b c - 178a b*c - 12a d - 102a b d - 10b d + ------------------------------------------------------------------------ 3 2 5 3 2 4 2 3 3 3 3 578a b c*d + 22b c*d - 710a b*c d + 12b c d + 178a c d - 68b c d + ------------------------------------------------------------------------ 2 4 5 4 2 4 2 4 2 3 2 62b c d - 18b*c d - 250a b*d - 2a*b d + 282a c*d - 40a*b c*d + ------------------------------------------------------------------------ 2 2 2 3 2 4 2 2 2 3 2 3 2 2 3 104a*b c d - 80a*b*c d + 18a*c d + 4a b d - 78a b*c*d + 18a c d + ------------------------------------------------------------------------ 3 4 3 4 2 4 2 4 3 4 5 5 7 87a d - 17b d + 37b c*d - 23b*c d + 3c d - 35a*b*d + 21a*c*d - d ------------------------------------------------------------------------ 5 4 4 3 2 2 3 4 5 + 12a*b - 8a b*c - 152a*b c + 656a*b c - 1128a*b c + 612a*b*c + 8a d ------------------------------------------------------------------------ 2 3 2 2 2 2 2 3 3 2 4 2 + 188a b d - 1188a b c*d + 1884a b*c d - 612a c d + 532a b*d - 88b d - ------------------------------------------------------------------------ 3 2 3 2 2 2 2 2 3 3 2 4 756a c*d + 64b c*d + 24b c d + 196a*b d + 156a*b*c*d - 714a d + ------------------------------------------------------------------------ 5 5 5 4 3 2 2 3 4 3 114b*d - 54c*d - 8b + 96b c - 432b c + 864b c - 648b*c - 120a*b d ------------------------------------------------------------------------ 2 2 3 2 2 2 2 2 3 + 792a*b c*d - 1512a*b*c d + 648a*c d - 360a b*d + 648a c*d - 504b d ------------------------------------------------------------------------ 3 4 4 - 216b*c*d + 2052a*d - 1944d ) o5 : Ideal of R i6 : time ideal resultant(f,g,x) -- used 0.0277982s (cpu); 0.0301416s (thread); 0s (gc) 7 8 3 5 8 6 3 4 7 3 3 2 o6 = ideal(- a b*c + a d - a b + b + 6a b*c + 18a b c - 7b c - 48a b c + ------------------------------------------------------------------------ 6 2 3 2 3 5 3 3 4 4 4 3 5 2 6 7 21b c + 46a b c - 35b c - 15a b*c + 35b c - 21b c + 7b c - b*c - ------------------------------------------------------------------------ 7 4 3 6 4 2 5 4 2 4 2 6a d - 21a b d + 8a*b d + 85a b c*d - 41a*b c*d - 79a b*c d + 85a*b c d ------------------------------------------------------------------------ 4 3 3 3 2 4 5 6 5 2 + 15a c d - 90a*b c d + 50a*b c d - 13a*b*c d + a*c d - 37a b*d + ------------------------------------------------------------------------ 2 4 2 5 2 2 3 2 2 2 2 2 2 3 2 2 4 2 20a b d + 33a c*d - 66a b c*d + 78a b c d - 38a b*c d + 6a c d + ------------------------------------------------------------------------ 3 2 3 3 3 3 2 3 4 4 2 5 5 2 4 16a b d - 25a b*c*d + 9a c d + 2a d + 6a b - 12a b*c - 84a b c + ------------------------------------------------------------------------ 2 3 2 2 2 3 2 4 6 3 3 6 328a b c - 428a b c + 178a b*c + 12a d + 102a b d + 10b d - ------------------------------------------------------------------------ 3 2 5 3 2 4 2 3 3 3 3 578a b c*d - 22b c*d + 710a b*c d - 12b c d - 178a c d + 68b c d - ------------------------------------------------------------------------ 2 4 5 4 2 4 2 4 2 3 2 62b c d + 18b*c d + 250a b*d + 2a*b d - 282a c*d + 40a*b c*d - ------------------------------------------------------------------------ 2 2 2 3 2 4 2 2 2 3 2 3 2 2 3 104a*b c d + 80a*b*c d - 18a*c d - 4a b d + 78a b*c*d - 18a c d - ------------------------------------------------------------------------ 3 4 3 4 2 4 2 4 3 4 5 5 7 87a d + 17b d - 37b c*d + 23b*c d - 3c d + 35a*b*d - 21a*c*d + d ------------------------------------------------------------------------ 5 4 4 3 2 2 3 4 5 - 12a*b + 8a b*c + 152a*b c - 656a*b c + 1128a*b c - 612a*b*c - 8a d ------------------------------------------------------------------------ 2 3 2 2 2 2 2 3 3 2 4 2 - 188a b d + 1188a b c*d - 1884a b*c d + 612a c d - 532a b*d + 88b d + ------------------------------------------------------------------------ 3 2 3 2 2 2 2 2 3 3 2 4 756a c*d - 64b c*d - 24b c d - 196a*b d - 156a*b*c*d + 714a d - ------------------------------------------------------------------------ 5 5 5 4 3 2 2 3 4 3 114b*d + 54c*d + 8b - 96b c + 432b c - 864b c + 648b*c + 120a*b d ------------------------------------------------------------------------ 2 2 3 2 2 2 2 2 3 - 792a*b c*d + 1512a*b*c d - 648a*c d + 360a b*d - 648a c*d + 504b d ------------------------------------------------------------------------ 3 4 4 + 216b*c*d - 2052a*d + 1944d ) o6 : Ideal of R i7 : sylvesterMatrix(f,g,x) o7 = {-14} | 1 0 0 3 0 0 a b 0 0 0 0 0 0 0 | {-13} | 0 1 0 0 3 0 0 a b 0 0 0 0 0 0 | {-12} | 0 0 1 0 0 3 0 0 a b 0 0 0 0 0 | {-11} | 0 0 0 1 0 0 3 0 0 a b 0 0 0 0 | {-10} | 0 0 0 0 1 0 0 3 0 0 a b 0 0 0 | {-9} | 0 0 0 0 0 1 0 0 3 0 0 a b 0 0 | {-8} | 0 0 0 0 0 0 1 0 0 3 0 0 a b 0 | {-7} | 0 0 0 0 0 0 0 1 0 0 3 0 0 a b | {-14} | 1 0 0 1 0 0 0 c d 0 0 0 0 0 0 | {-13} | 0 1 0 0 1 0 0 0 c d 0 0 0 0 0 | {-12} | 0 0 1 0 0 1 0 0 0 c d 0 0 0 0 | {-11} | 0 0 0 1 0 0 1 0 0 0 c d 0 0 0 | {-10} | 0 0 0 0 1 0 0 1 0 0 0 c d 0 0 | {-9} | 0 0 0 0 0 1 0 0 1 0 0 0 c d 0 | {-8} | 0 0 0 0 0 0 1 0 0 1 0 0 0 c d | 15 15 o7 : Matrix R <-- R i8 : discriminant(f,x) 7 6 3 3 6 5 2 3 o8 = 46656a - 314928a - 1555848a b + 823543b + 708588a + 9501786a b - ------------------------------------------------------------------------ 4 3 3 531441a - 20575296a*b + 15116544b o8 : R