<?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>ideals to and from matrices</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_ideals_spto_spand_spfrom_spmodules.html">next</a> | <a href="_creating_span_spideal.html">previous</a> | <a href="_ideals_spto_spand_spfrom_spmodules.html">forward</a> | <a href="_creating_span_spideal.html">backward</a> | <a href="_ideals.html">up</a> | <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> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_ideals.html" title="">ideals</a> > <a href="_ideals_spto_spand_spfrom_spmatrices.html" title="">ideals to and from matrices</a></div> <hr/> <div><h1>ideals to and from matrices</h1> <div><h2>forming an ideal from a matrix</h2> After defining a matrix (see <a href="_inputting_spa_spmatrix.html" title="">inputting a matrix</a>) , <tt>M</tt>, the ideal generated by the entries of the matrix is obtained using the command <a href="_ideal.html" title="make an ideal">ideal</a>.<table class="examples"><tr><td><pre>i1 : R = ZZ/101[a..e];</pre> </td></tr> <tr><td><pre>i2 : M = matrix{{a^2*b-c^2, a*b^2-d^3, c^5-d},{a^2*b, b*c*d, c^5}} o2 = | a2b-c2 ab2-d3 c5-d | | a2b bcd c5 | 2 3 o2 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i3 : ideal M 2 2 2 2 3 5 5 o3 = ideal (a b - c , a b, a*b - d , b*c*d, c - d, c ) o3 : Ideal of R</pre> </td></tr> </table> <h2>forming a matrix from an ideal</h2> In much the same way we can construct a 1 by n (where n is the number of generators of <tt>I</tt>), matrix from the n generators of an ideal <tt>I</tt> using the command, <a href="_generators.html" title="provide matrix or list of generators">generators</a>.<table class="examples"><tr><td><pre>i4 : I = ideal(a^2*b-c^2+c*d, a*b^2-b*d^3, c^5,d+e); o4 : Ideal of R</pre> </td></tr> <tr><td><pre>i5 : generators I o5 = | a2b-c2+cd -bd3+ab2 c5 d+e | 1 4 o5 : Matrix R <--- R</pre> </td></tr> </table> The abbreviation <tt>gens</tt> can be used for <tt>generators</tt>.</div> </div> </body> </html>