Sophie

Sophie

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

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>format and display of matrices in Macaulay2</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_importing_spand_spexporting_spmatrices.html">next</a> | <a href="_exterior_sppower_spof_spa_spmatrix.html">previous</a> | <a href="_importing_spand_spexporting_spmatrices.html">forward</a> | <a href="_exterior_sppower_spof_spa_spmatrix.html">backward</a> | <a href="_matrices.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="_matrices.html" title="">matrices</a> > <a href="_format_spand_spdisplay_spof_spmatrices_spin_sp__Macaulay2.html" title="">format and display of matrices in Macaulay2</a></div>
<hr/>
<div><h1>format and display of matrices in Macaulay2</h1>
<div>By default, Macaulay2 displays matrices in a compact form.<table class="examples"><tr><td><pre>i1 : QQ[x,y];</pre>
</td></tr>
<tr><td><pre>i2 : f = matrix{{x^2, x*y},{x*y, y^2}}

o2 = | x2 xy |
     | xy y2 |

                      2                2
o2 : Matrix (QQ[x, y])  &lt;--- (QQ[x, y])</pre>
</td></tr>
<tr><td><pre>i3 : dual f

o3 = {-2} | x2 xy |
     {-2} | xy y2 |

                      2                2
o3 : Matrix (QQ[x, y])  &lt;--- (QQ[x, y])</pre>
</td></tr>
<tr><td><pre>i4 : source f

               2
o4 = (QQ[x, y])

o4 : QQ[x, y]-module, free, degrees {2, 2}</pre>
</td></tr>
<tr><td><pre>i5 : target dual f

               2
o5 = (QQ[x, y])

o5 : QQ[x, y]-module, free, degrees {-2, -2}</pre>
</td></tr>
</table>
Integers inside braces to the left of the matrix give the degrees of the basis elements of the target of the matrix; they are omitted if the degrees are all zero.<p/>
Note how the exponents have been placed to the right of the variables rather than formatted in superscript.  While this format is generally considered to be desirable, this can be turned off by setting the variable <a href="_compact__Matrix__Form.html" title="global flag for compact printing">compactMatrixForm</a> to <tt>false</tt>.<table class="examples"><tr><td><pre>i6 : compactMatrixForm = false

o6 = false</pre>
</td></tr>
<tr><td><pre>i7 : matrix{{x^2 + 3, x^4 + 1},{x^13 - 5, x^7 - 1}}

     |   2       4     |
o7 = |  x  + 3  x  + 1 |
     |                 |
     |  13       7     |
     | x   - 5  x  - 1 |

                      2                2
o7 : Matrix (QQ[x, y])  &lt;--- (QQ[x, y])</pre>
</td></tr>
</table>
To have Macaulay2 display matrices in compact form again, type:<table class="examples"><tr><td><pre>i8 : compactMatrixForm = true

o8 = true</pre>
</td></tr>
<tr><td><pre>i9 : matrix{{x^2 + 3, x^4 + 1},{x^13 - 5, x^7 - 1}}

o9 = | x2+3  x4+1 |
     | x13-5 x7-1 |

                      2                2
o9 : Matrix (QQ[x, y])  &lt;--- (QQ[x, y])</pre>
</td></tr>
</table>
</div>
</div>
</body>
</html>