# $\varnothing$ in the category of sets

Wikipedia says that $\varnothing$ is the initial object in the category of sets. However, this seems to be false.

Any function $F$ with domain $\varnothing$ is necessarily empty, i.e. $F=\varnothing$. So in the category of sets, there is only one morphism whose source is $\varnothing$, namely, the empty function. Since the axiom of category requires that $\varnothing$ has an identity morphism, the empty function is its identity morphism. Suppose for the sake of contradiction that there is morphism $g: \varnothing \longrightarrow A$, where $A\not= \varnothing$. Then $g$ is the empty function. Then $g$ is a morphism with two targets, namely, $\varnothing$ and $A$, contradicting category axioms.

Did I make a mistake somewhere?

• why do you claim "$g$ is a morphism with two targets"? Mar 7, 2014 at 4:22
• $g$ doesn't have 2 targets, does it? You specified the target $A$. Are you confusing identity and inclusion? Every morphism needn't be epic, right?
– MPW
Mar 7, 2014 at 4:23
• I claim that "$g$ is a morphism with two targets" because $g$ is the empty function. And it seems the empty function has $\varnothing$ as its target. Mar 7, 2014 at 4:30
• That doesn't make sense. $\emptyset$ is a subset of $A$. $g$ just maps to that subset.
– user98602
Mar 7, 2014 at 4:34
• You seem to be equating the notion of "function" with "the set of points in the graph of the function". While this is a typical model of the notion of function, it's not clear that's what you should think a function 'actually is'. But even if you do, then a morphism of sets must then have more information about it: that information could be part of the morphism, or it could come from context. (e.g. one might never speak about "a morphism" but instead about "a morphism from $A$ to $B$")
– user14972
Mar 7, 2014 at 5:30

Categorical foundations are fundamentally different from set theoretic foundations (if you'll pardon the pun). Specifically, while in set theoretic foundations, every object is a set, in a category theoretic foundations, there are different classes of foundational objects, notably objects and morphisms.

Every morphism has a designated domain and codomain, so the fact that in $\mathbf{Set}$ the empty function is the empty set is largely irrelevant; the morphism from $\emptyset$ to $\{a\}$ is different to the morphism from $\emptyset$ to $\{0,1\}$ (even though they consist of the same sets of ordered pairs) since they have different codomains.

The same thing arises in many other contexts too. For example, the embedding of $\{a\}$ into $\{a,b\}$ is not the same categorical object as the identity map from $\{a\}$ to itself.

The question of when two morphisms are equal is central to category theory. Every diagram chase is essentially an argument that two compositions are in fact different representations of the same morphism. But the approach is genuinely different from the set theoretic setting.

Another way to think about it is that in a set theoretic foundations, it is the domain and range of a function that are most important. The codomain is more or less tacked on for convenience, and there is nothing stopping one function from having many possible codomains. In category theory, by contrast, it is the domain and codomain that are primitive.

• Thanks for the answer. Do you suppose that we think of morphisms in $Set$ as 3-tuples $(F,D,R)$, where $F$ is a single-valued binary relation and $D,R$ are its domain and range respectively? Mar 7, 2014 at 4:39
• That sounds almost right, although it is the codomain that is important rather than the range. Another (equivalent) way is to think of the collection of morphisms in a category as the disjoint sum (and not the union) of all the hom-sets. Just be careful that you don't start assuming smallness (or local smallness) when you shouldn't. Mar 7, 2014 at 4:46
• By the way, this emphasis on codomains isn't just category theorists being difficult. It's a reflection of how algebra actually works in practice. For example, if we say that $f$ is a group homomorphism, it is implicit that we are thinking of $f$ as a not-necessarily-surjective function between two groups. The identification of these groups is essential to $f$'s status as a homomorphism. Ditto for linear maps between vector spaces. If $T:V\to W$ is a linear transformation, it would be inconvenient to confuse $T$ with the (set theoretically identical) transformation $T':V\to T[V]$. Mar 7, 2014 at 5:13

Everything you said is correct. The only mistake is the final sentence, "$g$ is a morphism with two targets". Remember that a function of sets is a specified domain, codomain, and subset of their product. Most important for us here is that the codomain is specified too. For example, consider two maps $h\colon\mathbb{R}\to\mathbb{R}$ given by $x\mapsto x^2$, and $k\colon\mathbb{R}\to\mathbb{R}^{\geq 0}$ also given by $x\mapsto x^2.$ When viewed as subsets of $\mathbb{R}\times\mathbb{R}^{\geq0}$ (actually, $h$ is a subset of $\mathbb{R}\times\mathbb{R}$, but its inclusion factors through $\mathbb{R}\times\mathbb{R}^{\geq0}$), $h$ and $k$ are equal. However when viewed as functions they are distinct, because they have different codomains.

Similarly your function $g\colon\varnothing\to A$ is a subset (the empty subset) of $\varnothing\times A$, along with specified domain $\varnothing$, and specified codomain $A$. It is a morphism $\varnothing \to A$, not $\varnothing\to\varnothing.$ There is another map $\varnothing\to\varnothing$, but it not equal to $g$, since its codomain doesn't match, even though $g\subseteq A\times\varnothing=\varnothing$ and $1_\varnothing\subset\varnothing\times\varnothing=\varnothing$ are both just the empty set, hence equal as sets. The empty map $\varnothing\to\varnothing$ is however equal to the identity on $\varnothing,$ as you pointed out.

The situation is very simple really and you already half-guessed it yourself.

A morphism $$A \to B$$ of the category $$\mathrm{Set}$$ is simply defined as the triple $$\langle A,f,B \rangle$$ where $$f$$ is a subset of $$A \times B$$ with total-functional properties (to each element of $$A$$ corresponds exactly one of $$B$$). If you omit the total-functional properties, then you define the category $$\mathrm{Rel}$$ of sets and relations. These are just definitions. You can easily check that these structures are indeed categories according to the definition of category. You may call the morphisms of $$\mathrm{Set}$$ functions if you like and probably nobody will shoot you, but bear in mind that they are different – yet related – things than the functions you learned before

So $$\varnothing \to A$$ is really $$\langle \varnothing,\varnothing,A \rangle$$ and $$\varnothing \to B$$ is really $$\langle \varnothing,\varnothing,B \rangle$$ and thus can be different.

Category theory can and usually is based on some set theory. Categories are just another type of mathematical structures like groups, rings, ect. They just happen to be more general.

You can find slightly different set theories on the market. Tarski-Grothendieck (TG) set theory is the one which gives you the most bang for your dollar, in my opinion. It is successfully used in the Mizar project to build (ie. express and prove) the whole edifice of mathematics in a formal and computer-checked way. Who can ask for more?

TG set theory has basically the usual axioms of other set theories (ZFC, NBG) with the addition of the TG axiom claiming (roughly) that any collection you can come up with, is contained in a larger collection called a universe.

Other foundations of mathematics are alternative, still experimental and certainly not mainstream. I would not bother with them as a beginner in category theory.