# subquotient -- make a subquotient module

## Synopsis

• Usage:
subquotient(g,r)
subquotient(M,g,r)
• Inputs:
• g, the matrix of generators
• r, the matrix of relations, with the same target as g
• M, , if given, must be the common target of g and r
• Outputs:
• the image of g in the cokernel of r

## Description

If g is omitted, then the identity map on the target of r is used as g, and the cokernel of r is returned. If r is omitted (but not the comma), then a zero map to the target of g is used as r, and the image of g is returned. If both are omitted, then M is returned.

See subquotient modules for an overview of subquotient modules in Macaulay2.

The general form in which modules are represented in Macaulay2 is as subquotients, and subquotient modules are often returned as values of computations, as in the example below.

 i1 : R = ZZ/101[a..d] o1 = R o1 : PolynomialRing i2 : M = kernel vars R ++ cokernel vars R o2 = subquotient ({1} | -b 0 -c 0 0 -d 0 |, {1} | 0 0 0 0 |) {1} | a -c 0 0 -d 0 0 | {1} | 0 0 0 0 | {1} | 0 b a -d 0 0 0 | {1} | 0 0 0 0 | {1} | 0 0 0 c b a 0 | {1} | 0 0 0 0 | {0} | 0 0 0 0 0 0 1 | {0} | a b c d | 5 o2 : R-module, subquotient of R i3 : generators M o3 = {1} | -b 0 -c 0 0 -d 0 | {1} | a -c 0 0 -d 0 0 | {1} | 0 b a -d 0 0 0 | {1} | 0 0 0 c b a 0 | {0} | 0 0 0 0 0 0 1 | 5 7 o3 : Matrix R <--- R i4 : relations M o4 = {1} | 0 0 0 0 | {1} | 0 0 0 0 | {1} | 0 0 0 0 | {1} | 0 0 0 0 | {0} | a b c d | 5 4 o4 : Matrix R <--- R i5 : M === subquotient(generators M, relations M) o5 = true i6 : prune M, o6 = (cokernel {2} | 0 0 0 0 c 0 0 d |, ) {2} | 0 0 0 0 a d 0 0 | {2} | 0 0 0 0 -b 0 d 0 | {2} | 0 0 0 0 0 b a 0 | {2} | 0 0 0 0 0 -c 0 a | {2} | 0 0 0 0 0 0 -c -b | {0} | d c b a 0 0 0 0 | o6 : Sequence

## See also

• subquotient modules -- the way Macaulay2 represents modules
• isSubquotient -- check whether a module is a subquotient of another
• ambient -- ambient free module of a subquotient, or ambient ring
• generators -- provide matrix or list of generators
• relations -- the defining relations
• prune -- prune, e.g., compute a minimal presentation

## Ways to use subquotient :

• "subquotient(Matrix,Matrix)"
• "subquotient(Matrix,Nothing)"
• "subquotient(Module,Matrix,Matrix)"
• "subquotient(Module,Matrix,Nothing)"
• "subquotient(Module,Nothing,Matrix)"
• "subquotient(Module,Nothing,Nothing)"
• "subquotient(Nothing,Matrix)"

## For the programmer

The object subquotient is .