Macaulay2 is an interpreted, dynamically typed programming language intended to support research in algebraic geometry and commutative algebra through open sourced software.


A First Example

Here is an example of how to compute the minimal free resolution of the twisted cubic:

Code:

R = QQ[x, y, z, w]; -- defines a ring
I = monomialCurveIdeal(R, {1, 2, 3})
C = res I -- computes the resolution


Getting help:

-- quick usage information
? monomialCurveIdeal
-- details and examples
help monomialCurveIdeal
-- documentation on the web
viewHelp monomialCurveIdeal

Result:

i1 : R = QQ[x, y, z, w];
i2 : I = monomialCurveIdeal(R, {1, 2, 3})

             2                    2
o2 = ideal (z  - y*w, y*z - x*w, y  - x*z)

o2 : Ideal of R
i3 : C = res I

      1      3      2
o3 = R  <-- R  <-- R  <-- 0
                           
     0      1      2      3

o3 : ChainComplex

Package Development


The recommended IDE for using Macaulay2 in research is Emacs (here is a cheat sheet). Community plugins are also available for Vim, Atom, VSCode, and Sublime.


Development of Macaulay2 by Daniel R. Grayson and Michael E. Stillman has been funded by the National Science Foundation since 1992. We also acknowledge our many contributors, software libraries used by Macaulay2, as well as Macaulay, the predecessor of Macaulay2 written by Dave Bayer and Michael Stillman.

The namesake of Macaulay2 is Francis Macaulay FRS.