Sophie

Sophie

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

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>- -- a unary or binary operator, usually used for negation or subtraction</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="__st.html">next</a> | <a href="__pl.html">previous</a> | <a href="__st.html">forward</a> | <a href="__pl.html">backward</a> | <a href="_operators.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="___The_sp__Macaulay2_splanguage.html" title="">The Macaulay2 language</a> > <a href="_operators.html" title="">operators</a> > <a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a></div>
<hr/>
<div><h1>- -- a unary or binary operator, usually used for negation or subtraction</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>-y </tt><br/><tt> x-y</tt></div>
</dd></dl>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>In most cases, this operator refers to standard negation or subtraction.<p/>
In many cases, the integer 1 can be used as the identity, and scalars function as multiples of the identity.  For example, the 1 below refers to the identity matrix and the 2 to twice the identity matrix.<table class="examples"><tr><td><pre>i1 : M = matrix{{1,2,3},{2,3,4},{3,4,6}}

o1 = | 1 2 3 |
     | 2 3 4 |
     | 3 4 6 |

              3        3
o1 : Matrix ZZ  &lt;--- ZZ</pre>
</td></tr>
<tr><td><pre>i2 : M-1, M-2

o2 = (| 0 2 3 |, | -1 2 3 |)
      | 2 2 4 |  | 2  1 4 |
      | 3 4 5 |  | 3  4 4 |

o2 : Sequence</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_difference.html" title="difference">difference</a> -- difference</span></li>
<li><span><a href="_minus.html" title="additive inverse">minus</a> -- additive inverse</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>-</tt> :</h2>
<ul><li>- CC</li>
<li>- ChainComplexMap</li>
<li>- Constant</li>
<li>- GradedModuleMap</li>
<li>- Holder</li>
<li>- InfiniteNumber</li>
<li>- Matrix</li>
<li>- Minus</li>
<li>- MutableMatrix</li>
<li>- ProjectiveHilbertPolynomial</li>
<li>- QQ</li>
<li>- RingElement</li>
<li>- RR</li>
<li>- ZeroExpression</li>
<li>- ZZ</li>
<li>CC - CC</li>
<li>CC - QQ</li>
<li>CC - RR</li>
<li>CC - ZZ</li>
<li>ChainComplexMap - ChainComplexMap</li>
<li>ChainComplexMap - RingElement</li>
<li>Constant - Constant</li>
<li>Constant - InexactNumber</li>
<li>Constant - Number</li>
<li>GradedModuleMap - GradedModuleMap</li>
<li>GradedModuleMap - RingElement</li>
<li>InexactNumber - Constant</li>
<li>InfiniteNumber - InfiniteNumber</li>
<li>InfiniteNumber - ZZ</li>
<li>Matrix - Matrix</li>
<li>Matrix - Number</li>
<li>Matrix - RingElement</li>
<li>MutableMatrix - MutableMatrix</li>
<li>Number - Constant</li>
<li>Number - Matrix</li>
<li>ProjectiveHilbertPolynomial - ProjectiveHilbertPolynomial</li>
<li>QQ - CC</li>
<li>QQ - QQ</li>
<li>QQ - RR</li>
<li>QQ - ZZ</li>
<li>RingElement - ChainComplexMap</li>
<li>RingElement - GradedModuleMap</li>
<li>RingElement - Matrix</li>
<li>RingElement - RingElement</li>
<li>RR - CC</li>
<li>RR - QQ</li>
<li>RR - RR</li>
<li>RR - ZZ</li>
<li>Vector - Vector</li>
<li>ZZ - CC</li>
<li>ZZ - InfiniteNumber</li>
<li>ZZ - QQ</li>
<li>ZZ - RR</li>
<li>ZZ - ZZ</li>
<li><span><a href="_-_sp__List.html" title="negation of a vector">- List</a> -- negation of a vector</span></li>
<li><span><tt>- VirtualTally</tt> (missing documentation<!-- tag: (-,VirtualTally) -->)</span></li>
<li><span>Constant - RingElement, see <span><a href="___Constant.html" title="">Constant</a></span></span></li>
<li><span>RingElement - Constant, see <span><a href="___Constant.html" title="">Constant</a></span></span></li>
<li><span>- Expression, see <span><a href="___Expression.html" title="the class of all expressions">Expression</a> -- the class of all expressions</span></span></li>
<li><span>Expression - Expression, see <span><a href="___Expression.html" title="the class of all expressions">Expression</a> -- the class of all expressions</span></span></li>
<li><span><tt>InexactNumber - RingElement</tt> (missing documentation<!-- tag: (-,InexactNumber,RingElement) -->)</span></li>
<li><span><a href="___List_sp-_sp__List.html" title="difference of two vectors">List - List</a> -- difference of two vectors</span></li>
<li><span><a href="___Monomial__Ideal_sp-_sp__Monomial__Ideal.html" title="monomial ideal difference">MonomialIdeal - MonomialIdeal</a> -- monomial ideal difference</span></li>
<li><span><tt>RingElement - InexactNumber</tt> (missing documentation<!-- tag: (-,RingElement,InexactNumber) -->)</span></li>
<li><span>List - Set, see <span><a href="___Set_sp-_sp__Set.html" title="set difference">Set - Set</a> -- set difference</span></span></li>
<li><span>Set - List, see <span><a href="___Set_sp-_sp__Set.html" title="set difference">Set - Set</a> -- set difference</span></span></li>
<li><span><a href="___Set_sp-_sp__Set.html" title="set difference">Set - Set</a> -- set difference</span></li>
<li><span><a href="___Tally_sp-_sp__Tally.html" title="difference of tallies">Tally - Tally</a> -- difference of tallies</span></li>
<li><span>VirtualTally - VirtualTally, see <span><a href="___Virtual__Tally.html" title="">VirtualTally</a></span></span></li>
</ul>
</div>
<div class="waystouse"><h2>For the programmer</h2>
<p>The object <a href="_-.html" title="a unary or binary operator, usually used for negation or subtraction">-</a> is <span>a <a href="___Keyword.html">keyword</a></span>.</p>
<div><div><p>This operator may be used as a binary operator in an expression like <tt>x-y</tt>.  The user may install <a href="_binary_spmethods.html" title="">binary methods</a> for handling such expressions with code such as</p>
<pre>         X - Y := (x,y) -> ...</pre>
<p>where <tt>X</tt> is the class of <tt>x</tt> and <tt>Y</tt> is the class of <tt>y</tt>.</p>
</div>
<div><p>This operator may be used as a prefix unary operator in an expression like <tt>-y</tt>.  The user may <a href="_installing_spmethods.html">install a method</a> for handling such expressions with code such as</p>
<pre>           - Y := (y) -> ...</pre>
<p>where <tt>Y</tt> is the class of <tt>y</tt>.</p>
</div>
</div>
</div>
</div>
</body>
</html>