# 38.25 Mapping Functions for Algebra Homomorphisms

This section describes how the mapping functions defined in chapter Mappings are implemented for algebra homomorphisms. Those functions not mentioned here are implemented by the default functions described in the respective sections.

`Image( hom )`
`Image( hom, H )`
`Images( hom, H )`

The image of a subalgebra under a algebra homomorphism is computed by computing the images of a set of generators of the subalgebra, and the result is the subalgebra generated by those images.

`PreImagesRepresentative( hom, elm )`

```    gap> a:= UnitalAlgebra( Rationals, [ [ [ 1, 0 ], [ 0, 0 ] ] ] );;
gap> a.name:= "a";;
gap> m:= Module( a, [ [ 1, 0 ] ] );;
gap> op:= Operation( a, m );
UnitalAlgebra( Rationals, [ [ [ 1 ] ] ] )
gap> ophom:= OperationHomomorphism( a, op );
OperationHomomorphism( a, UnitalAlgebra( Rationals, [ [ [ 1 ] ] ] ) )
gap> Image( ophom, a.1 );
[ [ 1 ] ]
gap> Image( ophom, Zero( a ) );
[ [ 0 ] ]
gap> PreImagesRepresentative( ophom, [ [ 2 ] ] );
[ [ 2, 0 ], [ 0, 2 ] ] ```

GAP 3.4.4
April 1997