The Category of all sets and functions between them denoted by Formally, Morphisms are pairs where is a Function (this is because codomain of is not uniquely defined in set theory)

See also Category of Relations and Category of Partial Functions and note:

but what are sets actually?

In Zermelo-Fraenkel Set Theory, we take the perspective that there are some sets and there is a notion of between them. In particular, everything is a set, so nonsensical questions like “is ?” actually make sense (and the answer depends on the convention we took). In Category Theory, we would much rather look at sets as some objects and then have functions between them be other “things”. We need to list a slightly different set of axioms, but we can still capture the intuitive notion of a set. The difference now is that there is no notion of by default. The elements of a set are functions (where , the set of one element). This notion is formalized as a Generalized Element This way, the elements of a set like are just some functions , while a function is . It no longer makes sense to ask if because the functions are no longer sets themselves. This better captures the usual mathematical intuition we have about sets.

Lemma

Category is Balanced.

Proof

Note that all injective functions are left cancellable so they are Monomorphisms. Let be left cancellable:

whenever . Pick and suppose Set and . Then Thus Monomorphisms are exactly the injective functions.

Similarly, all surjective functions are right cancellable, thus Epimorphisms. Let be an Epimorphism:

for any . Let , let and let Note

for any , thus . Then for any we have and thus so is surjective.

Thus Monomorphism + Epimorphism bijective i.e. Isomorphism.