Hi.
What is the difference between morphism and function?
a morphism is a categorical concept: lots of different "kinds" of things could be morphisms, depending on the context.
in the context of groups, rings or modules, a morphism is a group, ring or module homomorphism.
in the context of partially-ordered sets, a morphism is an order-preserving map.
in the context of topology with respect to homotopy classes, a morphism is an (induced) map between sets of homotopy classes on two spaces.
in the special case where we consider the category of all (locally-small) sets, a morphism is a function.
in many categories, the objects are "sets with additional structure" and the morphisms are "structure-preserving functions". this is not always the case, however:
one such "strange" category, is where the objects are (non-zero) natural numbers, and a morphism m→n is an mxn matrix with entries from a commutative ring.
another example is any monoid, which can be regarded as a category with one object M, and a morphism is simply an element x of M.
still another example is the category whose objects are elements of the set of all divisors of a positive integer, where there is a unique arrow a→b iff a divides b.
a related example to the above is the category n, where n is a non-negative natural number, whose objects are the natural numbers ≤ n, and we have an morphism a→b,
iff a ≤ b. these categories are in a 1-1 correspondence with the finite ordinal numbers.
again, the answer depends on context. IF a category has a "zero object", that is: an object with is both initial AND terminal (in that there is just ONE possible morphism 0→A for any object A, and ONE possible morphism A→0) then the only possible map 0→0 is called the "zero morphism". in the category of groups, for example, the 1-element group (or trivial group) (often just called "{e}") is a zero object (up to isomorphism, as is the case with all "categorical constructions"). in the category of vector spaces over a given field, the "zero object" is a 0-dimensional vector space.
in general categories, we may not HAVE a 0-object. for example, the null set is an initial object in the category of (locally-small) sets, but the terminal object is a (any) singleton set (isomorphisms in this category are just bijective functions, and clearly the sets {x} and {y} are set-isomorphic (just define f(x) = y)) so we cannot say for a function f:Ø→A that f(Ø) = Ø, although we CAN say that for a function g:A→{x} that g(a) = x, for all a in A.
for many algebraic structures (many of which form categories, with a corresponding notion of (homo-)morphism), 0-objects DO exist, and it IS true that f(0) = 0. this is true for:
monoids (but NOT semi-groups)
groups
abelian groups
rings
fields
modules
vector spaces
algebras
which although being just a very few types of structure, cover a lot of ground.
notably absent from the list above, is the category of topological spaces, with continuous maps as morphisms. in fact, it is easy to see that even if X = Y possesses an element 0 (for example, they might both be R, the real numbers), it is not necessarily true that a continuous function maps 0 to 0, in fact: x→x+1 is a counter-example.