## You are here

Homecategory of sets

## Primary tabs

# category of sets

The category of sets has, as its objects, all sets and, as its morphisms, functions between sets. (This works if a category’s objects are only required to be part of a class, as the class of all sets exists.) The category of sets is often denoted by Set.

Alternately one can specify a universe, containing all sets of interest in the situation, and take the category to contain only sets in that universe and functions between those sets.

One of the most famous endofunctors associated with the category of sets
is the *powerset functor* $P$, which takes every set $A$ to its
power set $P(A)$, and any function $f:A\to B$ to the function
$P(f):P(A)\to P(B)$, given by

$P(f)(S):=f(S)=\{b\in B\mid b=f(a)\mbox{ for some }a\in S\}.$ |

If $f\colon A\to B$ and $g\colon B\to C$ are functions, then $(P(g)\circ P(f))(S)=P(g)(P(f)(S))=P(g)(f(S))=g(f(S))=(g\circ f)(S)=P(g\circ f)% (S)$, so that $P$ is a covariant functor. This functor may also be defined in an “arrow theoretic” fashion as a ${\rm Hom}$ functor. Let $T$ be a set with two elements, for instance $T=\{\{\},\{\{\}\}\}$. (Since, by the definition of cardinality, all sets with the same number of elements are isomorphic in the category of sets, it does not matter which set with two elements we pick as $T$.) Then define $P(A)={\rm Hom}(A,T)$; likewise, given a function $f\colon A\to B$, define $P(f)\colon P(B)\to P(A)$ by $P(f)(g)=g\circ f$.

## Mathematics Subject Classification

18B05*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections

## Comments

## Is this definition specific enough?

In my category theory text 'Category Theory for Computer Science' there is talk of arrows belonging to all categories of sets: the empty set is an 'initial' object in 'Set'. All one-element sets are 'terminal' objects in 'Set'. That is, there are arrows from the empty set to every other set, and arrows from every set to every one-element set.

What I can't figure out is 1) if 'Set', the category of sets, refers to the same category in every context and 2) whether the reason for the definition of these above mentioned arrows should be obvious to me :) Wikipedia has a little more about this category, yet is still vague about the properties mentioned above.

I think this is rather important, since a large number of the examples and exercises near the beginning of the above text depend on an understanding of Set. I understand it's a fundamental category of category theory as well. I'll post back here whatever I discover. Thanks!

## Category of Sets, according to MacLane

In his book, p12, he gives the following simple definition:

Set: Objects, all small sets; Arrows, all functions between them.

The article might be clearer to say 'all' morphisms, or even 'all possible' morphisms. Then the one-element sets are terminals because of constant functions. I'm still not clear why the empty set has arrows to all other sets.

Additionally, MacLane qualifies the objects as being 'small' sets.

## Re: Category of Sets, according to MacLane

> The article might be clearer to say 'all' morphisms, or even

> 'all possible' morphisms. Then the one-element sets are

> terminals because of constant functions. I'm still not clear

> why the empty set has arrows to all other sets.

>

Remember, a function is a special subset of the product of the domain and codomain. So if a function has domain the empty set, the function itself must be empty. Therefore, the (unique) arrow from the empty set to a set is the empty set (empty function).

## Re: Category of Sets, according to MacLane

Thank you. That makes it clearer, and I think something of this nature should be added to the article, since its not obvious (that is, to me, and I don't think I'm a lot dumber than most who are new to category theory).

In addition, the texts I looked at don't make it especially clear why, if the arrows represent morphisms between objects (sets), then why every set doesn't point to every other set (making every object both initial and terminal). I presume there is a hidden restriction that an arrow's codomain can't be a subset of the target, i.e. an arrow can't point from a set to a larger set, but it can point to a smaller set where the codomain is smaller.

I can only make assumptions like this (possibly false) at this point, because, like in MacLane, most texts are vague in this definition.

I would like to see an article that makes the structure of Set clear to a person who is only just learning about the category of sets.

## "morphisms functions between sets"

FYI, the grammar is confusing here

## Re: Category of Sets, according to MacLane

The idea of an initial (resp. terminal) object A in a category is that for each object B in the category there is a unique morphism from (resp. to) A to (resp. from) B. The empty set is an initial object in the category of sets; the trivial group is terminal in the category of groups, and so on.

## Re: Category of Sets, according to MacLane

jkauzlar writes:

> the texts I looked at don't make it especially clear why,

> if the arrows represent morphisms between objects (sets),

> then why every set doesn't point to every other set

There is no function from a non-empty set to the empty set.