TITLE: Examples of categories where morphisms are not functions
QUESTION [28 upvotes]: Can someone give examples of categories where objects are some sort of structure based on sets and morphisms are not functions?

REPLY [2 votes]: Here is another example, much simpler than the previous one I gave: the category of integer matrices of all (finite) dimensions.  (Any associative ring of coefficients could be used instead of integers.)
The morphisms of this category are matrices with the usual operation of multiplication (playing the role of composition of morphisms), and the objects are natural numbers.  A matrix $m\times n$ is a morphism from $n$ to $m$ (or from $m$ to $n$, passing to the opposite category).
Generally speaking, the true elements of a category are morphisms, and objects are just opaque labels to keep track of when two morphisms can be composed. A category is just a generalisation of a group (where not every element is invertible and not every pair of elements is composable).
However, this may be not a good example, because the question was about objects that "are some sort of structure based on sets," and natural numbers are not exactly "based on sets."
If desired, here is a version for sets as objects: let morphisms between sets $A$ and $B$ be "matrices" $B\times A$ with only finitely many non-zero entries.  That is, the objects are arbitrary sets and morphisms $A\to B$ are functions $B\times A\to\mathbf{Z}$ which take non-zero values on finitely many arguments.  Define the composition of morphisms as the multiplication of these "matrices."