# In the category Set, why does there need to exist a morphism from a set to a singleton set?

In the Set category, why is every singleton a terminal object? Especially helpful for me was the answer posted by @Lærne : https://math.stackexchange.com/a/2820583

But I have a gap in my understanding. I know that the 𝚂𝚎𝚝 category is the category whose objects are sets, and whose morphisms from some set A to some set B are the functions from A to B. I know that in general, in a category, there is no requirement for there to be a morphism from an object to another distinct object. I understand why, if there does indeed exist a function from an object (set) A to a singleton set, then that function is unique. But I don't understand why, in the first place, a function needs to exist from an object (set) A to a singleton set.

• $B=\{b\}$: $f(a)=b$. Jun 30 '20 at 16:33
• Note that in the category $\sf Set$, the arrows between any two objects are all the functions between them. So, your question is then just amounting to showing that there does exist a function from any set to any singleton set. Jun 30 '20 at 16:40
• You have to know what the definition of a function is. A function $A \rightarrow B$ is a subset of $A \times B$ so that some requirements are fulfilled. Then if $B$ is a singleton it turns out that the set $A \times B$ as a subset of itself satisfies these conditions for a function. This is also the only subset of $A \times B$ so that the conditions are satisfied. Jul 1 '20 at 3:36

If $$\{x\}$$ is a Singleton set, then the constant function which ignores its input and outputs $$x$$ is a function from $$A \to \{x\}$$ for any set $$A$$. Moreover, this function is unique since $$x$$ is the only choice of output.