Sophie

Sophie

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

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>matrix(List) -- create a matrix from a doubly-nested list of ring elements or matrices</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_matrix_lp__Matrix_rp.html">next</a> | <a href="___Matrix_sp_vb_vb_sp__Matrix.html">previous</a> | <a href="_matrix_lp__Matrix_rp.html">forward</a> | <a href="___Matrix_sp_vb_vb_sp__Matrix.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>matrix(List) -- create a matrix from a doubly-nested list of ring elements or matrices</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>matrix v</tt></div>
</dd></dl>
</div>
</li>
<li><span>Function: <a href="_matrix.html" title="make a matrix">matrix</a></span></li>
<li><div class="single">Inputs:<ul><li><span><tt>v</tt>, <span>a <a href="___List.html">list</a></span>, a list of lists of either ring elements or matrices</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Matrix.html">matrix</a></span>, A matrix where the first list of <tt>v</tt> gives the first row (or set of rows, if the elements are matrices), the second list is the second row, etc.</span></li>
</ul>
</div>
</li>
<li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><tt>Degree => </tt><span><span>default value null</span>, an integer or a list of integers, to serve as the degree of the matrix</span></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>An attempt is made to coerce the ring elements and matrices to a common ring.  If the entries are ring elements, they are used as the entries of the matrix, and if the entries are matrices, then they are used to provide blocks of entries in the resulting matrix.<p/>
An attempt is made to set up the degrees of the generators of the free module serving as source so that the map will be homogeneous and of degree zero.<p/>
<table class="examples"><tr><td><pre>i1 : R = ZZ/101[x,y,z]

o1 = R

o1 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i2 : p = matrix {{x,y,z}}

o2 = | x y z |

             1       3
o2 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i3 : degrees source p

o3 = {{1}, {1}, {1}}

o3 : List</pre>
</td></tr>
<tr><td><pre>i4 : isHomogeneous p

o4 = true</pre>
</td></tr>
</table>
Notice that the degrees were set up so that p is homogeneous, because the source module is not explicitly specified by the user.  The next example involves block matrices.<table class="examples"><tr><td><pre>i5 : q = vars R

o5 = | x y z |

             1       3
o5 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i6 : matrix {{q,q,q}}

o6 = | x y z x y z x y z |

             1       9
o6 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i7 : matrix {{q},{q},{q}}

o7 = | x y z |
     | x y z |
     | x y z |

             3       3
o7 : Matrix R  &lt;--- R</pre>
</td></tr>
</table>
Here we construct a matrix from column vectors.<table class="examples"><tr><td><pre>i8 : F = R^3

      3
o8 = R

o8 : R-module, free</pre>
</td></tr>
<tr><td><pre>i9 : matrix {F_2, F_1, x*F_0 + y*F_1 + z*F_2}

o9 = | 0 0 x |
     | 0 1 y |
     | 1 0 z |

             3       3
o9 : Matrix R  &lt;--- R</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_map.html" title="make a map">map</a> -- make a map</span></li>
</ul>
</div>
</div>
</body>
</html>