Macaulay2 » Documentation
Packages » Macaulay2Doc :: numgens(Ideal)
next | previous | forward | backward | up | index | toc

numgens(Ideal) -- number of generators of an ideal

Synopsis

Description

In Macaulay2, each ideal comes equipped with a matrix of generators. It is the number of columns of this matrix that is returned. If the ideal is homogeneous, this may or may not be the number of minimal generators.
i1 : R = QQ[a..d];
i2 : I = ideal(a^2-b*d, a^2-b*d, c^2, d^2);

o2 : Ideal of R
i3 : numgens I

o3 = 4

In order to find a more efficient set of generators, use mingens or trim.
i4 : mingens I

o4 = | d2 c2 a2-bd |

             1      3
o4 : Matrix R  <-- R
i5 : numgens trim I

o5 = 3

See also

Ways to use this method: