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

Singular Book 2.1.13 -- kernel, image and cokernel of a module homomorphism

In Macaulay2, a Matrix is the same thing as a module homomorphism. The computation of the kernel of a module homomorphism is based on a Groebner basis computation.
i1 : A = QQ[x,y,z];
i2 : M = matrix{{x,x*y,z},{x^2,x*y*z,y*z}}

o2 = | x  xy  z  |
     | x2 xyz yz |

             2       3
o2 : Matrix A  <--- A
i3 : K = kernel M

o3 = image {2} | -y2z+yz2 |
           {3} | -xz+yz   |
           {2} | x2y-xyz  |

                             3
o3 : A-module, submodule of A
The image and cokernel of a matrix require no computation.
i4 : I = image M

o4 = image | x  xy  z  |
           | x2 xyz yz |

                             2
o4 : A-module, submodule of A
i5 : N = cokernel M

o5 = cokernel | x  xy  z  |
              | x2 xyz yz |

                            2
o5 : A-module, quotient of A
i6 : P = coimage M

o6 = cokernel {2} | -y2z+yz2 |
              {3} | -xz+yz   |
              {2} | x2y-xyz  |

                            3
o6 : A-module, quotient of A