next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > basic commutative algebra > M2SingularBook > Singular Book 2.1.26

Singular Book 2.1.26 -- computation of Hom

i1 : A = QQ[x,y,z];
i2 : M = cokernel matrix(A, {{1,2,3},{4,5,6},{7,8,9}})

o2 = cokernel | 1 2 3 |
              | 4 5 6 |
              | 7 8 9 |

                            3
o2 : A-module, quotient of A
i3 : N = cokernel matrix{{x,y},{z,0}}

o3 = cokernel | x y |
              | z 0 |

                            2
o3 : A-module, quotient of A
i4 : H = Hom(M,N)

o4 = subquotient (| 1  0  |, | y x 0 0 0 0 |)
                  | 0  1  |  | 0 z 0 0 0 0 |
                  | -2 0  |  | 0 0 y x 0 0 |
                  | 0  -2 |  | 0 0 0 z 0 0 |
                  | 1  0  |  | 0 0 0 0 y x |
                  | 0  1  |  | 0 0 0 0 0 z |

                               6
o4 : A-module, subquotient of A
H is a subquotient module. In Macaulay2, the most general form of a module is as a subquotient: a submodule of a cokernel module. For more about subquotient modules, see modules.
i5 : f = homomorphism H_{0}

o5 = | 1 -2 1 |
     | 0 0  0 |

o5 : Matrix
i6 : target f === N

o6 = true
i7 : source f === M

o7 = true
i8 : matrix f

o8 = | 1 -2 1 |
     | 0 0  0 |

             2       3
o8 : Matrix A  <--- A
Macaulay2 has a modulo command (it was initially introduced in the original Macaulay, in the late 1980's), but it is not needed very often. It is used internally in Macaulay2 to implement kernels of module homomorphisms.