Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 4704

Macaulay2-1.3.1-8.fc15.i686.rpm

<?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>map(Module,Module,Function) -- create a matrix by specifying a function that gives each entry</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_map_lp__Module_cm__Module_cm__List_rp.html">next</a> | <a href="_map.html">previous</a> | <a href="_map_lp__Module_cm__Module_cm__List_rp.html">forward</a> | backward | <a href="_map.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="_map.html" title="make a map">map</a> > <a href="_map_lp__Module_cm__Module_cm__Function_rp.html" title="create a matrix by specifying a function that gives each entry">map(Module,Module,Function)</a></div>
<hr/>
<div><h1>map(Module,Module,Function) -- create a matrix by specifying a function that gives each entry</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>map(M,N,f)</tt></div>
</dd></dl>
</div>
</li>
<li><span>Function: <a href="_map.html" title="make a map">map</a></span></li>
<li><div class="single">Inputs:<ul><li><span><tt>M</tt>, <span>a <a href="___Module.html">module</a></span></span></li>
<li><span><tt>N</tt>, <span>a <a href="___Module.html">module</a></span></span></li>
<li><span><tt>f</tt>, <span>a <a href="___Function.html">function</a></span></span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Matrix.html">matrix</a></span>, a map from the module <tt>N</tt> to the module <tt>M</tt> whose matrix entry <tt>h_(i,j)</tt> is obtained from the function <tt>f</tt> by evaluating <tt>f(i,j)</tt>.</span></li>
</ul>
</div>
</li>
<li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_map_lp..._cm_sp__Degree_sp_eq_gt_sp..._rp.html">Degree => ...</a>,  -- set the degree of a map</span></li>
<li><span><a href="_map_lp__Ring_cm__Ring_cm__Matrix_rp.html">DegreeLift => ...</a>,  -- make a ring map</span></li>
<li><span><a href="_map_lp__Ring_cm__Ring_cm__Matrix_rp.html">DegreeMap => ...</a>,  -- make a ring map</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>Recall that all indices in Macaulay2 start at 0, so the upper left-most entry of a matrix <tt>f</tt> is <tt>f_(0,0)</tt>.<p/>
This function is often used when you already know the source and target modules, including their gradings.  If you wish Macaulay2 to compute the column degrees for you (so the resulting matrix will be homogeneous if possible), use <a href="_map_lp__Module_cm__Z__Z_cm__Function_rp.html" title="create a matrix from a free module by specifying a function that gives each entry">map(Module,ZZ,Function)</a>.<table class="examples"><tr><td><pre>i1 : R = ZZ[a..c];</pre>
</td></tr>
<tr><td><pre>i2 : f = map(R^3,R^{0,-1,-2,-3},(i,j) -> R_i^j)

o2 = | 1 a a2 a3 |
     | 1 b b2 b3 |
     | 1 c c2 c3 |

             3       4
o2 : Matrix R  &lt;--- R</pre>
</td></tr>
</table>
We specified the degrees of the source basis elements explicitly to ensure the matrix would be homogeneous.<table class="examples"><tr><td><pre>i3 : isHomogeneous f

o3 = true</pre>
</td></tr>
</table>
<h2>Alternate approaches</h2>
We could have let Macaulay2 take care of that for us, by replacing the source module by its desired rank.<table class="examples"><tr><td><pre>i4 : g = map(R^3,4,(i,j) -> R_i^j)

o4 = | 1 a a2 a3 |
     | 1 b b2 b3 |
     | 1 c c2 c3 |

             3       4
o4 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i5 : degrees g

o5 = {{{0}, {0}, {0}}, {{0}, {1}, {2}, {3}}}

o5 : List</pre>
</td></tr>
<tr><td><pre>i6 : isHomogeneous g

o6 = true</pre>
</td></tr>
</table>
<p/>
Another way would be to let <a href="_matrix.html" title="make a matrix">matrix</a> take care of that for us.<table class="examples"><tr><td><pre>i7 : h = matrix table(3,4,(i,j) -> R_i^j)

o7 = | 1 a a2 a3 |
     | 1 b b2 b3 |
     | 1 c c2 c3 |

             3       4
o7 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i8 : degrees h

o8 = {{{0}, {0}, {0}}, {{0}, {1}, {2}, {3}}}

o8 : List</pre>
</td></tr>
<tr><td><pre>i9 : isHomogeneous h

o9 = true</pre>
</td></tr>
</table>
</div>
</div>
</div>
</body>
</html>