<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>computing syzygies</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_cone.html">next</a> | <a href="_computing_spresolutions.html">previous</a> | <a href="_cone.html">forward</a> | <a href="_computing_spresolutions.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>computing syzygies</h1> <div>A syzygy among the columns of a matrix is, by definition, an element of the kernel of the corresponding map between free modules, and the easiest way to compute the syzygies applying the function <a href="_kernel.html" title="kernel of a ringmap, matrix, or chain complex">kernel</a>.<table class="examples"><tr><td><pre>i1 : R = QQ[x..z];</pre> </td></tr> <tr><td><pre>i2 : f = vars R o2 = | x y z | 1 3 o2 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i3 : K = kernel f o3 = image {1} | -y 0 -z | {1} | x -z 0 | {1} | 0 y x | 3 o3 : R-module, submodule of R</pre> </td></tr> </table> The answer is provided as a submodule of the source of <tt>f</tt>. The function <a href="_super.html" title="get the ambient module">super</a> can be used to produce the module that <tt>K</tt> is a submodule of; indeed, this works for any module.<table class="examples"><tr><td><pre>i4 : L = super K 3 o4 = R o4 : R-module, free, degrees {1, 1, 1}</pre> </td></tr> <tr><td><pre>i5 : L == source f o5 = true</pre> </td></tr> </table> The matrix whose columns are the generators of <tt>K</tt>, lifted to the ambient free module of <tt>L</tt> if necessary, can be obtained with the function <a href="_generators.html" title="provide matrix or list of generators">generators</a>, an abbreviation for which is <tt>gens</tt>.<table class="examples"><tr><td><pre>i6 : g = generators K o6 = {1} | -y 0 -z | {1} | x -z 0 | {1} | 0 y x | 3 3 o6 : Matrix R <--- R</pre> </td></tr> </table> We can check at least that the columns of <tt>g</tt> are syzygies of the columns of <tt>f</tt> by checking that <tt>f*g</tt> is zero.<table class="examples"><tr><td><pre>i7 : f*g o7 = 0 1 3 o7 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i8 : f*g == 0 o8 = true</pre> </td></tr> </table> Use the function <a href="_syz.html" title="the syzygy matrix">syz</a> if you need detailed control over the extent of the computation.</div> </div> </body> </html>