next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > ideals > creating an ideal

creating an ideal

ideal

An ideal I is represented by its generators. We use the function ideal to construct an ideal.
i1 : R = QQ[a..d];
i2 : I = ideal (a^2*b-c^2, a*b^2-d^3, c^5-d)

             2     2     2    3   5
o2 = ideal (a b - c , a*b  - d , c  - d)

o2 : Ideal of R

monomial ideals

For a monomial ideal you can use the function monomialIdeal.
i3 : J = monomialIdeal (a^2*b, b*c*d, c^5)

                     2    5
o3 = monomialIdeal (a b, c , b*c*d)

o3 : MonomialIdeal of R
The distinction is small since a monomial ideal can be constructed using ideal . However, there are a few functions, like primaryDecomposition that run faster if you define a monomial ideal using monomialIdeal.

monomialCurveIdeal

An interesting class of ideals can be obtained as the defining ideals in projective space of monomial curves. For example the twisted cubic is the closure of the set of points (1,t^1,t^2,t^3) in projective space. We use a list of the exponents and monomialCurveIdeal to get the ideal.
i4 : monomialCurveIdeal(R,{1,2,3})

             2                    2
o4 = ideal (c  - b*d, b*c - a*d, b  - a*c)

o4 : Ideal of R

See also