# In the Set category, why is every singleton a terminal object?

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?

• How many functions do you have from $A$ into $\{0\}$? Jun 15 '18 at 11:24
• Just one for sure.
– XRow
Jun 15 '18 at 11:50
• And that function is...? Jun 15 '18 at 11:50
• Now I see, the constant function.
– XRow
Jun 15 '18 at 11:51

An arrow in $\mathtt{Set}$ is a map, i.e. a fully defined function. That is if $f: A \to B$ is a arrow in $f$ you can associate a $b\in B$ for any $a \in A$.

Let $X$ be a set and $\{\star\}$ a singleton and let $f : X \to \{\star\}$ be an arrow. Then for $x \in X$, $f(x) \in \{\star\}$. That is, $f(x) = \star$. That completely determines every image of $x$ by $f$ hence it completely determines $f$ to be the constant function to $\star$.

• I think your answer is very good and helped me a lot. Thank you for this. There is however one thing I would like to ask. Why do we say this function is unique? For instance, if $X$ is a set of latin letters $X = \{A, B, \dots Z\}$ then there exists 26 possible constant functions that satisfy your definition. Why doesn't it contradict with uniqueness of $f$? Aug 13 '19 at 17:21
• No, because you must map all symbols $A, B, \dots Z$ to something in $\{\star\}$. Therefore you must map $A$ to $\star$, $B$ to $\star$, …, $Z$ to $\star$. That leaves you with only one function, the function that maps any element of $X$ to $\star$. Aug 16 '19 at 7:41

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.

• Formally speaking, that depends on your formalization. Jun 15 '18 at 11:24
• What do you mean with such "depends"?
– XRow
Jun 15 '18 at 11:52
• @JackLiu If you want to refer to somebody, you have to put @ followed by a name, otherwise the person will not be notified by your comment, only the author of the post under which you comment will. Asaf Karagila says "it depends" in the sense that there are other sensible formalizations of maps between sets inside a set theory such as ZF: the point is that they all lead to equivalent category of sets. So I should have said "Formally speaking, one can define..."
– Pece
Jun 15 '18 at 12:02