TITLE: In the Set category, why is every singleton a terminal object?
QUESTION [10 upvotes]: A terminal object in a category is just an object such that given any other object in the category there exists a unique morphism to this terminal object.
In the $\mathtt{Set}$ category, why is every singleton set a terminal object?
Which explicitly are the morphisms?

REPLY [4 votes]: Formally speaking, a map from $A$ to $B$ is a triple $(A,B,f)$ with $f\subseteq A\times B$ that satisfies the following property (called functionnality):
$$ \forall a\in A,\left(\exists b\in B,(a,b)\in f\right) \land \left(\forall b,b'\in B, \left((a,b)\in f\land (a,b')\in f\right) \to b=b'\right)$$
For simplicity, we usually denote $f(a)$ for the unique $b$ such that $(a,b)\in f$.
Now if $B$ is a singleton, there is exactly one $f\subseteq A\times B$ that satisfies this property, and this is $A\times B$ itself.