Category Theory for the Sciences


If a function maps from some set XX to some set YY, f:X→Yf: X \rightarrow Y, what does this mean?

It means that the mapping function ff sends x∈Xx \in X to an element of YY. This is denoted as f(x)∈Yf(x) \in Y

What is the domain and codomain of the mapping f:X→Yf: X \rightarrow Y where XX and YY are sets?

Domain: XX Codomain: YY

What does the symbol ↦\mapsto represent?

↦\mapsto specifically denotes what element maps to what in differing sets.

Given f:X→Yf: X \rightarrow Y where XX and YY are sets, what is the image of ff?

im(f):={y∈Yβˆ£βˆƒx∈XΒ suchΒ thatΒ f(x)=y}im(f) := \{y \in Y | \exists x \in X \text{ such that } f(x) = y\}

Basically, it is every element that x∈Xx \in X maps to in the set YY.

If the function f:X→Yf: X \rightarrow Y maps sets XX and YY and the function g:Y→Zg: Y \rightarrow Z maps sets YY and ZZ, are they able to be composed? Why?

Yes, they are able to be composed because ff shares the set YY with the function gg. In this case, YY is ff's codomain and gg's domain. It is joined "tip-to-tip" to borrow from the world of vectors in physics:

X→fYX \xrightarrow[]{f} Y Y→gZY \xrightarrow[]{g} Z

How do you write the composition of the functions f:X→Yf: X \rightarrow Y and g:Y→Zg: Y \rightarrow Z where XX, YY, and ZZ are sets?

g∘f:Xβ†’Zg \circ f: X \rightarrow Z

What does HomSet(X,Y)Hom_{Set}(X, Y) mean given XX and YY are sets?

The HomSet(X,Y)Hom_{Set}(X, Y) represents the set of functions X→YX \rightarrow Y. This set can be represented as: {f(x1),f(x2),f(x3),...}\{f(x_{1}), f(x_{2}), f(x_{3}), ...\}

Given some set XX, what is its identity function?

idX:X→Xid_{X}: X \rightarrow X

Given some set XX, what does idX:X→Xid_{X}: X \rightarrow X mean?

That for all x∈Xx \in X, the function idX(x)=xid_{X}(x) = x. Basically, the idid function returns any element it is given of some set unchanged. An example being: idX(10)=10id_{X}(10) = 10.

Definition (Isomorphism)

Let XX and YY be two sets.

A function f:Xβ†’Yf: X \rightarrow Y is an isomorphism if there exists a function g:Yβ†’Xg: Y \rightarrow X such that g∘f:idXg \circ f: id_{X} and f∘g:idYf \circ g: id_{Y}. An isomorphism is denoted as f:Xβ†’β‰…Yf: X\xrightarrow[]{\cong}Y where β‰…\cong stands for congruency. ff is invertible and gg is the inverse of ff.

If there is an isomorphism X→≅YX\xrightarrow[]{\cong}Y, XX and YY are isomorphic sets and can be denoted as X≅YX \cong Y


Exercise Here is a simplified account of how the brain receives light. The eye contains about 100 million photoreceptor (PRPR) cells. Each connects to a retinal ganglion (RGRG) cell. No PRPR cell connects to two different RGRG cells, but usually many PRPR cells can attach to a single RGRG cell. Let PRPR denote the set of photoreceptor cells and let RGRG denote the set of retinal ganglion cells.

  1. According to the above account, does the connection pattern constitute a function RG→PRRG \rightarrow PR, a function PR→RGPR \rightarrow RG or neither one?

f:PR→RGf: PR \rightarrow RG

Which can also be written as: f(x)∈RGf(x) \in RG where x∈PRx \in PR

  1. Would you guess that the connection pattern that exists between other areas of the brain are "function-like"?

I would guess that other parts of the brain are function-like!

Exercise Let f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} be the function that sends every natural number to its square, e.g. f(6)=36f(6) = 36. First fill in the blanks below, then answer a question.

  1. Answer: 2↦‾2 \mapsto \underline{\hspace{3cm}}

2↦42 \mapsto 4
  1. Answer: 0↦‾0 \mapsto \underline{\hspace{3cm}}

0↦00 \mapsto 0
  1. Answer: βˆ’2↦‾-2 \mapsto \underline{\hspace{3cm}}


  1. Answer: 5↦‾5 \mapsto \underline{\hspace{3cm}}

5↦255 \mapsto 25
  1. Consider the symbol β†’\rightarrow and the symbol ↦\mapsto.

What is the difference between how these two symbols are used in this book?

β†’\rightarrow means a general rule for a mapping elements between sets whereas ↦\mapsto specifically denotes what element maps to what in differing sets.

Exercise If f:X→Yf: X \rightarrow Y is represented by the diagram below, write its image, im(f)im(f) as a set.

im(f)={y1,y2,y4}im(f) = \{y_{1}, y_{2}, y_{4}\}

Exercise Let A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\} and B={x,y}B = \{x, y\}.

  1. How many elements does HomSet(A,B)Hom_{Set}(A, B) have?

Answer: 252^5 or 3232

  1. How many elements does HomSet(B,A)Hom_{Set}(B, A) have?

Answer: 525^2 or 2525


  1. Find a set AA such that for all sets XX there is exactly one element in HomSet(X,A)Hom_{Set}(X, A).

Hint: draw a picture of proposed AA's and XX's.

Answer: A={a}A = \{a\}

  1. Find a set BB such that for all sets XX there is exactly one element in HomSet(B,X)Hom_{Set}(B, X).

Answer: B={βˆ…}B = \{\emptyset\}