# Inital and Terminal Objects in the category of sets

Right now I am trying to understand initial and terminal objects in a category. The premier example of terminal and initial objects are used in the category of sets as being singleton sets and $$\emptyset$$, respectively. Why are these the unique terminal and initial objects?

The set $$\emptyset$$ is an initial object because, for every set $$A$$, there is unique a map $$\emptyset \to A$$. Indeed, if such a map exists, then it is a subset of the set $$\emptyset \times A=\emptyset$$. Therefore, if this map exists, it must be $$\emptyset$$ and $$\emptyset$$ is actually a map of sets $$\emptyset \to A$$. Hence such a map exists and is unique.
If $$X$$ is a singleton, then, for every set $$A$$, there is unique a map $$A \to X$$: this is just the map sending every element of $$A$$ to the unique element of $$X$$. This means that $$X$$ is a terminal object.