next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: degree(RingElement)

degree(RingElement)

Synopsis

Description

In Macaulay2, the degree of a polynomial is a list of integers. This is to accomodate polynomial rings having multigradings. The usual situation is when the ring has the usual grading: each variable has length 1.
i1 : R = QQ[a..d];
i2 : degree (a^3-b-1)^2

o2 = {6}

o2 : List
When not dealing with multigraded rings, obtaining the degree as a number is generally more convenient:
i3 : first degree (a^3-b-1)^2

o3 = 6
i4 : S = QQ[a..d,Degrees=>{1,2,3,4}];
i5 : first degree (a+b+c^3)

o5 = 9
i6 : T = QQ[a..d,Degrees=>{{0,1},{1,0},{-1,1},{3,4}}];
i7 : degree c

o7 = {-1, 1}

o7 : List
In a multigraded ring, the degree of a polynomial whose terms have different degrees is perhaps non-intuitive: it is the maximum (in each of the component degree) over each term:
i8 : degree c^5

o8 = {-5, 5}

o8 : List
i9 : degree d

o9 = {3, 4}

o9 : List
i10 : degree (c^5+d)

o10 = {3, 5}

o10 : List

See also