<?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 // Matrix -- factor a map through another</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Matrix_sp^_sp__Array.html">next</a> | <a href="___Matrix_sp_pl_pl_sp__Matrix.html">previous</a> | <a href="___Matrix_sp^_sp__Array.html">forward</a> | <a href="___Matrix_sp_pl_pl_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 // Matrix -- factor a map through another</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>f//g</tt></div> </dd></dl> </div> </li> <li><span>Operator: <a href="__sl_sl.html" title="a binary operator, usually used for quotient">//</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Matrix.html">matrix</a></span>, between free modules F --> H, or <span>a <a href="___Ring__Element.html">ring element</a></span></span></li> <li><span><tt>g</tt>, <span>a <a href="___Matrix.html">matrix</a></span>, between free module G --> H, <span>a <a href="___Ring__Element.html">ring element</a></span>, <span>a <a href="___Monomial__Ideal.html">monomial ideal</a></span>, or <span>a <a href="___Groebner__Basis.html">Groebner basis</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 matrix h : F --> G</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>If f is a matrix, and g is a matrix or Gröbner basis, then quotient(f,g) is an alternate notation for f//g.<p/> If either f or g is a ring element, then it is taken to be the identity matrix on H. If both are ring elements, then the result is also a ring element. If g is a MonomialIdeal, then it is taken to be the matrix of generators of g. Finally, if g is a GroebnerBasis object, then the Gröbner basis as so far computed is used. In these latter two cases, no Gröbner bases will be computed.<p/> The resulting matrix h is such that <tt>f - g*h</tt> is the reduction of <tt>f</tt> modulo a Gröbner basis for the image of <tt>g</tt>.<p/> If the remainder <tt>f - g*h</tt> is zero, then the quotient <tt>f//g</tt> satisfies the equation <tt>f = g * (f//g)</tt>.<p/> One common use is the following. If an ideal contains 1, then write 1 in terms of the generators of the ideal.<table class="examples"><tr><td><pre>i1 : A = ZZ/101[x,y,z] o1 = A o1 : PolynomialRing</pre> </td></tr> <tr><td><pre>i2 : F = x^4 - y*z*(1-x)^2 - z - y^3 4 2 3 o2 = x - x y*z - y + 2x*y*z - y*z - z o2 : A</pre> </td></tr> <tr><td><pre>i3 : I = ideal(F,diff(x,F),diff(y,F),diff(z,F)) 4 2 3 3 2 o3 = ideal (x - x y*z - y + 2x*y*z - y*z - z, 4x - 2x*y*z + 2y*z, - x z - ------------------------------------------------------------------------ 2 2 3y + 2x*z - z, - x y + 2x*y - y - 1) o3 : Ideal of A</pre> </td></tr> <tr><td><pre>i4 : 1 % I o4 = 0 o4 : A</pre> </td></tr> </table> So we see that 1 is in the ideal. Now let us find the representation of 1 in terms of the four generators of <tt>I</tt>.<table class="examples"><tr><td><pre>i5 : g = gens I o5 = | x4-x2yz-y3+2xyz-yz-z 4x3-2xyz+2yz -x2z-3y2+2xz-z -x2y+2xy-y-1 | 1 4 o5 : Matrix A <--- A</pre> </td></tr> <tr><td><pre>i6 : f = matrix{{1_A}} o6 = | 1 | 1 1 o6 : Matrix A <--- A</pre> </td></tr> <tr><td><pre>i7 : h = f // g o7 = {4} | 44x2y2+43x3z+42x2yz-30x3-26x2y-11xy2+21x2z-7xyz+30x2+15xy-36y2+42x {3} | -11x3y2-36x4z+40x3yz-43x4-44x3y+9x2y2+20x3z+27x2yz+43x3-29x2y+22xy {3} | 19x2y3-48x3yz-14x2y2z+10x3y-25x2y2-30xy3-7x2yz+36xy2z-10x2y-5xy2+1 {3} | -41x2y2z-24x3z2-7x2yz2+25x3y+5x3z+38x2yz+45xy2z+18x2z2+39xyz2+x2y- ------------------------------------------------------------------------ z+37yz-2x+2y+9z+31 | 2+40x2z+40xyz-50x2+50xy-20y2-28xz-6yz-33x-19y-47z | 2y3-14xyz-46y2z-2x2-33xy+33y2-19xz-3yz+35x-44y+24z-34 | 25x2z+35xyz-16y2z+25xz2-3yz2-2xy+8yz-33z2+y+3z-1 | 4 1 o7 : Matrix A <--- A</pre> </td></tr> <tr><td><pre>i8 : g * (f//g) o8 = | 1 | 1 1 o8 : Matrix A <--- A</pre> </td></tr> </table> We may also find h directly.<table class="examples"><tr><td><pre>i9 : 1 // (gens I) o9 = {4} | 44x2y2+43x3z+42x2yz-30x3-26x2y-11xy2+21x2z-7xyz+30x2+15xy-36y2+42x {3} | -11x3y2-36x4z+40x3yz-43x4-44x3y+9x2y2+20x3z+27x2yz+43x3-29x2y+22xy {3} | 19x2y3-48x3yz-14x2y2z+10x3y-25x2y2-30xy3-7x2yz+36xy2z-10x2y-5xy2+1 {3} | -41x2y2z-24x3z2-7x2yz2+25x3y+5x3z+38x2yz+45xy2z+18x2z2+39xyz2+x2y- ------------------------------------------------------------------------ z+37yz-2x+2y+9z+31 | 2+40x2z+40xyz-50x2+50xy-20y2-28xz-6yz-33x-19y-47z | 2y3-14xyz-46y2z-2x2-33xy+33y2-19xz-3yz+35x-44y+24z-34 | 25x2z+35xyz-16y2z+25xz2-3yz2-2xy+8yz-33z2+y+3z-1 | 4 1 o9 : Matrix A <--- A</pre> </td></tr> </table> <p/> One may also use <tt>//</tt> to compute the inverse of an invertible matrix.<table class="examples"><tr><td><pre>i10 : M = matrix{{1,x,y},{x,0,y},{1,2,3}} o10 = | 1 x y | | x 0 y | | 1 2 3 | 3 3 o10 : Matrix A <--- A</pre> </td></tr> <tr><td><pre>i11 : M = substitute(M, frac A) o11 = | 1 x y | | x 0 y | | 1 2 3 | 3 3 o11 : Matrix (frac A) <--- (frac A)</pre> </td></tr> <tr><td><pre>i12 : det M 2 o12 = - 3x + 3x*y - 2y o12 : frac(A)</pre> </td></tr> <tr><td><pre>i13 : Minv = id_(target M) // M o13 = {1} | -33y/(x2-xy-33y) (x+33y)/(x2-xy-33y) -34xy/(x2-xy-33y) {1} | (x-34y)/(x2-xy-33y) (34y-1)/(x2-xy-33y) (-34xy+34y)/(x2-xy-33y) {1} | 33x/(x2-xy-33y) (-34x-33)/(x2-xy-33y) 34x2/(x2-xy-33y) ----------------------------------------------------------------------- | | | 3 3 o13 : Matrix (frac A) <--- (frac A)</pre> </td></tr> <tr><td><pre>i14 : M * Minv o14 = | 1 0 0 | | 0 1 0 | | 0 0 1 | 3 3 o14 : Matrix (frac A) <--- (frac A)</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_methods_spfor_spnormal_spforms_spand_spremainder.html" title="calculate the normal form of ring elements and matrices">Matrix % Matrix</a> -- calculate the normal form of ring elements and matrices</span></li> <li><span><a href="_generators.html" title="provide matrix or list of generators">generators</a> -- provide matrix or list of generators</span></li> <li><span><a href="_diff.html" title="differentiate or take difference">diff</a> -- differentiate or take difference</span></li> <li><span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></li> <li><span><a href="_quotient.html" title="quotient or division">quotient</a> -- quotient or division</span></li> <li><span><a href="_remainder.html" title="matrix remainder">remainder</a> -- matrix remainder</span></li> <li><span><a href="_quotient__Remainder.html" title="matrix quotient and remainder">quotientRemainder</a> -- matrix quotient and remainder</span></li> </ul> </div> </div> </body> </html>