I've been thinking about maps between sets. Injections, surjections and the rest. Often when thinking about some kind of map, it is interesting to say "what about the maps from a set to itself?" Call these maps endomaps. Permutations of elements of the set are a special case of endomaps: they are bijective endomaps. Permutations have lots of interesting properties: they form groups and so on.
But what about general endomaps that are not necessarily bijective? Do they have any interesting properties that people study? They don't necessarily have inverses, which rules them out as forming groups, but composition of endomaps is associative, so they aren't totally devoid of interesting properties.
It is also the case that for every endomap, there exists some subset of its domain (not necessarily unique) such that it is bijective on that subset. So these maps are permutations if restricted to a particular subset. Is this enough to make endomaps interesting in their own right, or are they only studied as a part of the study of maps between sets in general?
[It might be obvious that this question was motivated by thinking about category theory, but there's nothing particularly categorical about the question as such...]