there is nothing in the definition of a homomorphism that requires it to be a surjective map (onto function). surjective homomorphisms are of special importance, however, and the image of a homomorphism φ:G-->G' is usually what one is most interested in.

remember that for a function (any function) f:A-->B, all that is required is that f(A) be a subset of B. one does not, for example, think of f:R-->R given by f(x) = x^2 as being a "non-negative real-valued function" (although it is), but simply as a "real-valued function" even though its range is not the entire co-domain.