# 7.107 KernelGroupHomomorphism

`KernelGroupHomomorphism( hom )`

`KernelGroupHomomorphism` returns the kernel of the group homomorphism hom as a subgroup of the group `hom.source`.

The kernel of a group homomorphism hom is the subset of elements x of the source G that are mapped to the identity of the range H, i.e., x^{hom} = H.identity.

```    gap> s4 := Group( (1,2), (1,2,3,4) );;
gap> v4 := Subgroup( s4, [ (1,2)(3,4), (1,3)(2,4) ] );;
gap> phi := NaturalHomomorphism( s4, s4/v4 );;
gap> KernelGroupHomomorphism( phi );
Subgroup( Group( (1,2), (1,2,3,4) ), [ (1,2)(3,4), (1,3)(2,4) ] )
gap> Kernel( phi );
Subgroup( Group( (1,2), (1,2,3,4) ), [ (1,2)(3,4), (1,3)(2,4) ] )
# since the source is a group this is equivalent to the above
gap> rho := GroupHomomorphismByImages( s4, Group( (1,2) ),
>                          [ (1,2), (1,2,3,4) ], [ (1,2), (1,2) ] );;
gap> Kernel( rho );
Subgroup( Group( (1,2), (1,2,3,4) ), [ (2,4,3), (1,4,3) ] ) ```

`KernelGroupHomomorphism` first tests if `hom.kernelGroupHomomorphism` is bound. If it is bound, `KernelGroupHomomorphisms` returns that value. Otherwise it calls
`hom.operations.KernelGroupHomomorphism( hom )`, remembers the returned value in `hom.kernelGroupHomomorphism`, and returns it.

The default function for this is `MappingOps.KernelGroupHomomorphism`, which simply tries random elements of the source of hom, until the subgroup generated by those that map to the identity has the correct size, i.e., `Size( hom.source ) / Size( Image( hom ) )`. Note that this implies that the image of hom and its size are computed. Look under Kernel in the index to see for which group homomorphisms this function is overlaid.

GAP 3.4.4
April 1997