next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc > modules > submodules and quotients

submodules and quotients

submodules

We can create submodules by using standard mathematical notation, keeping in mind that the generators of a module M are denoted by M_0, M_1, etc.
i1 : R = QQ[x,y,z];
i2 : M = R^3

      3
o2 = R

o2 : R-module, free
i3 : I = ideal(x^2,y^2-x*z)

             2   2
o3 = ideal (x , y  - x*z)

o3 : Ideal of R
Here are some examples of submodules of M.
i4 : I*M

o4 = image | x2 0  0  y2-xz 0     0     |
           | 0  x2 0  0     y2-xz 0     |
           | 0  0  x2 0     0     y2-xz |

                             3
o4 : R-module, submodule of R
i5 : R*M_0

o5 = image | 1 |
           | 0 |
           | 0 |

                             3
o5 : R-module, submodule of R
i6 : I*M_1

o6 = image | 0  0     |
           | x2 y2-xz |
           | 0  0     |

                             3
o6 : R-module, submodule of R
i7 : J = I*M_1 + R*y^5*M_1 + R*M_2

o7 = image | 0  0     0  0 |
           | x2 y2-xz y5 0 |
           | 0  0     0  1 |

                             3
o7 : R-module, submodule of R
To determine if one submodule is contained in the other, use isSubset(Module,Module).
i8 : isSubset(I*M,M)

o8 = true
i9 : isSubset((x^3-x)*M,x*M)

o9 = true
Another way to construct submodules is to take the kernel or image of a matrix.
i10 : F = matrix{{x,y,z}}

o10 = | x y z |

              1       3
o10 : Matrix R  <--- R
i11 : image F

o11 = image | x y z |

                              1
o11 : R-module, submodule of R
i12 : kernel F

o12 = image {1} | -y 0  -z |
            {1} | x  -z 0  |
            {1} | 0  y  x  |

                              3
o12 : R-module, submodule of R
The module M does not need to be a free module. We will see examples below.

quotients

If N is a submodule of M, construct the quotient using Module / Module.
i13 : F = R^3

       3
o13 = R

o13 : R-module, free
i14 : F/(x*F+y*F+R*F_2)

o14 = cokernel | x 0 0 y 0 0 0 |
               | 0 x 0 0 y 0 0 |
               | 0 0 x 0 0 y 1 |

                             3
o14 : R-module, quotient of R
When constructing M/N, it is not necessary that M be a free module, or a quotient of a free module. In this case, we obtain a subquotient module, which we describe below.