You are currently browsing Todd Trimble's articles.

Okay, folks, time for another Problem of the Week! I hope it generates more response than last week’s problem:

Let C be a simple closed curve in the plane, and let P be any point strictly in the region interior to C. Show there are two points on C whose midpoint is P.

Please submit solutions to topological[dot]musings[At]gmail[dot]com by Wednesday, July 9, 11:59 pm (UTC); do not submit solutions in Comments. Everyone with a correct solution will be inducted into our Hall of Fame! We look forward to your response.

Dang! No solutions were received for last week’s problem; a couple of people made a decent start but didn’t send in a complete solution before time was up. So, alas, we’ll just have to post our own solution this time!

Of course we welcome comments as always. I actually found this problem in an old American Mathematical Monthly (February 1998, problem 10641, proposed by Jerrold R. Griggs), where the problem editors certainly give much more than a week’s worth of time to submit solutions! But this one I managed to solve it after mulling it over for a couple of days, so I thought it would be quite manageable (although not quite trivial; more on this below). Plus, I thought it was a cute little problem. Oh well.

Solution by Todd and Vishal: An m \times n rectangle is tileable by triominoes (”L-shaped” unions of 3 of the 4 unit squares in a 2 \times 2 rectangle) if and only if three conditions hold:

  1. Both m, n > 1;
  2. 3|mn;
  3. Whenever mn is odd, we also have m, n > 3.

Proof: (Necessity) The condition m, n > 1 is clear since each tile has two rows and two columns, and the condition 3|mn is clear since the rectangle has mn squares and each tile consists of 3 squares.

Lemma 1: For n > 2, if the 3 \times n rectangle is tileable, then the 3 \times (n-2) rectangle is tileable.

Proof: Given a tiling of the 3 \times n rectangle, consider the tiles placed along an edge of length 3. By inspection, the tile containing the middle square along that edge must contain one of the corners along that edge, and must not contain the non-corner square adjacent to the middle square. So there is only one way to cover that middle and corner with a tile. This in turn fixes the placement of the tile containing the other corner along that edge, and the two tiles together form a 3 \times 2 rectangle. Removing that 3 \times 2 rectangle, we see the rest of the triominoes tile the 3 \times (n-2) rectangle that remains. \Box.

This lemma shows that no tiling exists for a 3 \times n rectangle if n is odd; otherwise we could tile the 3 \times 1 rectangle. So the third condition is also necessary.

Now we prove sufficiency. First consider the case where mn is even. One of m, n is even (say m), and also either 3|n or 3|m. Say 3|n, so that m = 2i and n = 3j; then it is clear that we can tile the m \times n rectangle with ij (2 \times 3) rectangles, each tiled by two triominoes. If on the other hand (2|m and) 3|m, say m = 6i, then either n is even (and a tiling exists by the case we just considered, switching the roles of m and n); or, n is odd. In that case, n = 3 + 2j; we have already proven that the 6i \times 3 rectangle can be tiled, and also that the 6i \times 2j rectangle can be tiled, and then we just put these two tilings together to tile the m \times n rectangle.

Now consider the case where mn is odd. Here we assume that both m, n > 3 and 3|mn. So both m, n are at least 5, and if (say) 3|m, then m is at least 9.

Lemma 2: The 9 \times 5 rectangle can be tiled by triominoes.

Proof:

Corollary: Any (3 \cdot (3 + 2i)) \times (5 + 2j) rectangle can be tiled, if i, j are nonnegative integers. (This completes the proof of sufficiency.)

Proof: It suffices to tile a (3 \cdot (3 + 2i)) \times 5 rectangle and a (3 \cdot (3 + 2i)) \times 2j rectangle. The second case we’ve already treated. For the first case, simply put together tilings of the 9 \times 5 rectangle and the 6i \times 5 rectangle (which we have already treated). We are done. \Box

Remarks: The case where mn is even is relatively “easy”; I expect most people thinking about this problem got that far in the analysis. The case where mn is odd is harder; one has to observe the crucial lemma 2 or something like it. In my own case, I at first thought maybe there weren’t any solutions in the odd case (and I think the people who submitted a partial solution may have thought the same), first because it’s not at all obvious, and second because lemma 1 already rules out the 3 \times \mbox{odd} case (so that one may be tempted to extrapolate from there).

Here, something very typical happened: after failing to find an obvious proof of impossibility for the odd case, I tried to get at this alleged impossibility by pushing in the opposite direction: seeking a way to construct such a tiling and feeling for obstructions. [It's that funny kind of dialectic one sometimes experiences in mathematical problem-solving, very reminiscent of Lakatos's Proofs and Refutations.] It wasn’t long before I bumped up against a 9 \times 7 tiling after all, and at that point thought a 9 \times 5 should also be possible, which I then got after a few minutes. Then it was just a matter of mopping up.

For tiling problems in general, there’s another approach which one could try to establish the impossibility of tiling a region, if one is good at combinatorial group theory. The idea is that a tile like a triomino defines a word (up to conjugacy) in the free group on two generators x, y: you just read off the word by following along the perimeter. For example, for a triomino in the “L” position (remove the northeast corner in a 2 \times 2 square), if you start at the southwest corner and move counterclockwise around the triomino, you read off the directions x x y x^{-1} y x^{-1} y^{-1} y^{-1} where x = “one unit right” and y = “one unit up”. (Starting at other positions, one gets a conjugate of that word.) Similarly one gets words for the triominoes in the other three positions, and the relator subgroup for our tiling problem is the smallest normal subgroup containing these words.

The observation is this: if a planar region interior to a simple closed rectangular curve is tileable, then the curve describes a word belonging to the relator subgroup. For example, the word for a 2 \times 3 rectangle might be w = y^3 x^{-2} y^{-3} x^2, and from one of the tilings of the rectangle we can read off

y^{-1} w y = (y^2 x^{-2} y^{-1} x y^{-1} x)(x^{-1} y x^{-1} y^{-2} x^2 y)

where the words in parentheses are (conjugate to) words for triominoes. By the same token, if the word corresponding to a curve is not in the relator subgroup (is not the identity in the quotient group defined by the presentation), then the region is not tileable. For example, one can imagine a proof that certain tilings are impossible, by exhibiting a suitable representation of the group being presented.

I’ll continue then with this brief subseries on category theory. Today I want to talk more about universal properties, and about the notion of natural transformation. Maybe not today, but soon at any rate, I want to tie all this in with the central concept of representability, which leads directly and naturally to the powerful and fundamental idea of adjoint functors. This goes straight to the very heart of category theory.

The term “natural”, often bandied about by mathematicians, is perhaps an overloaded term (see the comments here for a recent disagreement about certain senses of the word). I don’t know the exact history of the word as used by mathematicians, but by the 1930s and 40s the description of something as “natural” was part of the working parlance of many mathematicians (in particular, algebraic topologists), and it is to the great credit of Eilenberg and Mac Lane that they sought to give the word a precise mathematical sense. A motivating problem in their case was to prove a universal coefficient theorem for Cech cohomology, for which they needed certain comparison maps (transformations) which cohered by making certain diagrams commute (which was the naturality condition). In trying to precisely define this concept of naturality, they were led to the concept of a “functor” and then, to define the concept of functor, they were led back to the notion of category! And the rest, as they say, is history.

More on naturality in a moment. Let me first give a few more examples of universal constructions. Last time we discussed the general concept of a cartesian product — obviously in honor of Descartes, for his tremendous idea of the method of coordinates and analytic geometry.

But of course products are only part of the story: he was also interested in the representation of equations by geometric figures: for instance, representing an equation y = f(x) as a subset of the plane. In the language of category theory, the variable y denotes the second coordinate or second projection map \pi_2: \mathbb{R} \times \mathbb{R} \to \mathbb{R}, and f(x) denotes the composite of the first projection map followed by some given map f:

\displaystyle \mathbb{R} \times \mathbb{R} \stackrel{\pi_1}{\to} \mathbb{R} \stackrel{f}{\to} \mathbb{R}.

The locus of the equation y = f(x) is the subset of \mathbb{R} \times \mathbb{R} where the two morphisms \pi_2 and f \circ \pi_1 are equal, and we want to describe the locus L in a categorical way (i.e., in a way which will port over to other categories).

Definition: Given a pair of morphisms

\displaystyle f, g: X \stackrel{\to}{\to} Y

their equalizer consists of an object L and a map e: L \to X, such that f \circ e = g \circ e, and satisfying the following universal property: for any map h: A \to X such that f \circ h = g \circ h, there exists a unique map j: A \to L such that h = e \circ j (any map h: A \to X that equalizes f and g factors in a unique way through the equalizer e: L \to X). \Box

Another way of saying it is that there is a bijection between (f, g)-equalizing maps h: A \to X and maps j: A \to L,

\displaystyle \frac{h: A \to X \mbox{  such that  } fh = gh}{j: A \to L \qquad },

effected by composing such maps j with the universal (f, g)-equalizing map e: L \to X.

Exercise: Apply a universality argument to show that any two equalizers of a given pair of maps (f, g) are isomorphic.

It is not immediately apparent from the definition that an equalizer e: L \to X describes a “subthing” (e.g., a subset) of X, but then we haven’t even discussed subobjects. The categorical idea of subobject probably takes some getting used to anyway, so I’ll be brief. First, there is the idea of a monomorphism (or a “mono” for short), which generalizes the idea of an injective or one-to-one function. A morphism f: S \to T is monic if for all g, h: A \to S, f \circ g = f \circ h implies g = h. Monos with codomain T are preordered by a relation \leq, where

(e: R \to T) \leq (f: S \to T)

if there exists g: R \to S such that e = f \circ g. (Such a g is unique since f is monic, so it doesn’t need to be specified particularly; also this g is easily seen to be monic [exercise].) Then we say that two monics e, f mapping into T name the same subobject of T if e \leq f and f \leq e; in that case the mediator g is an isomorphism. Writing e \sim f to denote this condition, it is standard that \sim is an equivalence relation.

Thus, a subobject of X is an equivalence class of monos into X. So when we say an equalizer e: L \to X of maps f, g: X \to Y defines a subobject of X, all we really mean is that e is monic. Proof: Suppose eh = ej for maps h, j: A \to X. Since fe = ge, we have f(ej) = g(ej) for instance. By definition of equalizer, this means there exists a unique map k: A \to X for which eh = ej = ek. Uniqueness then implies h, j are equal to this self-same k, so h = j and we are done.

Let me turn to another example of a universal construction, which has been used in one form or another for centuries: that of “function space”. For example, in the calculus of variations, one may be interested in the “space” of all (continuous) paths \alpha: I = \left[0, 1\right] \to X in a physical space X, and in paths which minimize “action” (principle of least action).

If X is a topological space, then one is faced with a variety of choices for topologizing the path space (denoted X^I). How to choose? As in our discussion last time of topologizing products, our view here is that the “right” topology will be the unique one which ensures that an appropriate universal property is satisfied.

To get started on this: the points of the path space X^I are of course paths \alpha: I \to X, and paths in the path space, I \to X^I, sending each s \in I to a path \alpha_s: I \to X, should correspond to homotopies between paths, that is continuous maps h: I \times I \to X; the idea is that h(s, t) := \alpha_s(t). Now, just knowing what paths in a space Y = X^I look like (homotopies between paths) may not be enough to pin down the topology on Y, but: suppose we now generalize. Suppose we decree that for any space Z, the continuous maps Z \to X^I should correspond exactly to continuous maps h: Z \times I \to X, also called homotopies. Then that is enough to pin down the topology on X^I. (We could put it this way: we use general spaces Z to probe the topology of X^I.)

This principle applies not just to topology, but is extremely general: it applies to any category! I’ll state it very informally for now, and more precisely later:

Yoneda principle: to determine any object Y up to isomorphism, it suffices to understand what general maps Z \to Y mapping into it look like.

For instance, a product X_1 \times X_2 is determined up to isomorphism by knowing what maps Z \to X_1 \times X_2 into it look like [they look like pairs of maps (Z \to X_1, Z \to X_2)]. In the first lecture in the Stone duality, we stated the Yoneda principle just for posets; now we are generalizing it to arbitrary categories.

In the case at hand, we would like to express the bijection between continuous maps

\displaystyle \frac{f: Z \to X^I}{h: Z \times I \to X}

as a working universal property for the function space X^I. There is a standard “Yoneda trick” for doing this: probe the thing we seek a universal characterization of with the identity map, here 1_{X^I}: X^I \to X^I. Passing to the other side of the bijection, the identity map corresponds to a map

ev: X^I \times I \to X

and this is the “universal map” we need. (I called it ev because in this case it is the evaluation map, which maps a pair (path \alpha: I \to X, point t \in I) to \alpha(t), i.e., evaluates \alpha at t.)

Here then is the universal characterization of the path space: a space X^I equipped with a continuous map ev: X^I \times I \to X, satisfying the following universal property: given any continuous map h: Z \times I \to X, there exists a unique continuous map f: Z \to X^I such that h is retrieved as the composite

\displaystyle Z \times I \stackrel{f \times 1_I}{\to} X^I \times I \stackrel{ev}{\to} X

(for the first arrow in the composite, cf. the exercise stated at the end of the last lecture).

Exercise: Formulate a universality argument that this universal property determines X^I up to isomorphism.

Remark: Incidentally, for any space X, such a path space exists; its topology turns out to be the topology of “uniform convergence”. We can pose a similar universal definition of any function space X^Y (replacing I by Y, mutatis mutandis); a somewhat non-trivial result is that such a function space exists for all X if and only if Y is locally compact; the topology on X^Y is then the so-called “compact-open” topology.

But why stop there? A general notion of “exponential” object is available for any category C with cartesian products: for objects c, d of C, an exponential d^c is an object equipped with a map ev: d^c \times c \to d, such that for any h: b \times c \to d, there exists a unique f: b \to d^c such that h is retrieved as the composite

\displaystyle b \times c \stackrel{f \times 1_c}{\to} d^c \times c \stackrel{ev}{\to} d.

Example: If the category is a meet-semilattice, then (assuming x^y exists) there is a bijection or equivalence which takes the form

\displaystyle \frac{a \leq x^y}{a \wedge y \leq x} iff

But wait, we’ve seen this before: x^y is what we earlier called the implication y \Rightarrow x. So implication is really a function space object! \Box

Okay, let me turn now to the notion of natural transformation. I described the original discovery (or invention) of categories as a kind of reverse engineering (functors were invented to talk about natural transformations, and categories were invented to talk about functors). Moving now in the forward direction, the rough idea can be stated as a progression:

  • The notion of functor is appropriately defined as a morphism between categories,
  • The notion of natural transformation is appropriately defined as a morphism between functors.

That seems pretty bare-bones: how do we decide what the appropriate notion of morphism between functors should be? One answer is by pursuing an analogy:

  • As a space Y^X of continuous functions X \to Y is to the category of topological spaces, so a category D^C of functors C \to D should be to the category of categories.

That is, we already “know” (or in a moment we’ll explain) that the objects of this alleged exponential category D^C are functors F: C \to D. Since D^C is defined by a universal property, it is uniquely determined up to isomorphism. This in turn will uniquely determine what the “right” notion of morphism between functors F, G: C \to D should be: morphisms F \to G in the exponential D^C! Then, to discover the nature of these morphisms, we employ an appropriate “probe”.

To carry this out, I’ll need two special categories. First, the category \mathbf{1} denotes a (chosen) category with exactly one object and exactly one morphism (necessarily the identity morphism). It satisfies the universal property that for any category C, there exists a unique functor C \to \mathbf{1}. It is called a terminal category (for that reason). It can also be considered as an empty product of categories.

Proposition: For any category C, there is an isomorphism \mathbf{1} \times C \cong C.

Proof: Left to the reader. It can be proven either directly, or by applying universal properties. \Box

The category \mathbf{1} can also be considered an “object probe”, in the sense that a functor \mathbf{1} \to C is essentially the same thing as an object of C (just look where the object of \mathbf{1} goes to in C).

For example, to probe the objects of the exponential category D^C, we investigate functors \mathbf{1} \to D^C. By the universal property of exponentials D^C, these are in bijection with functors \mathbf{1} \times C \to D. By the proposition above, these are in bijection with functors C \to D. So objects of D^C are necessarily tantamount to functors C \to D (and so we might as well define them as such).

Now we want to probe the morphisms of D^C. For this, we use the special category given by the poset \mathbf{2} = \{0 \leq 1\}. For if X is any category and f: x \to y is a morphism of X, we can define a corresponding functor F: \mathbf{2} \to X such that F(0) = x, F(1) = y, and F sends the morphism 0 \leq 1 to f. Thus, such functors F are in bijection with morphisms of X. Speaking loosely, we could call the category \mathbf{2} the “generic morphism”.

Thus, to probe the morphisms in the category D^C, we look at functors \mathbf{2} \to D^C. In particular, if F, G are functors C \to D, let us consider functors \phi: \mathbf{2} \to D^C such that \phi(0) = F and \phi(1) = G. By the universal property of D^C, these are in bijection with functors \eta: \mathbf{2} \times C \to D such that the composite

\displaystyle C \cong \mathbf{1} \times C  \stackrel{0 \times 1_C}{\to} \mathbf{2} \times C \stackrel{\eta}{\to} D

equals F, and the composite

\displaystyle C \cong \mathbf{1} \times C \stackrel{1 \times 1_C}{\to} \mathbf{2} \times C \stackrel{\eta}{\to} D

equals G. Put more simply, this says \eta(0, c) = F(c) and \eta(1, c) = G(c) for objects c of C, and \eta(1_0, f) = F(f) and \eta(1_1, f) = G(f) for morphisms f of C.

The remaining morphisms of \mathbf{2} \times C have the form (0 \leq 1, f: c \to d). Introduce the following abbreviations:

  1. \phi_c := \eta(0 \leq 1, 1_c) for objects c of C;
  2. \phi_f := \eta(0 \leq 1, f) for morphisms f of C.

Since \eta is a functor, it preserves morphism composition. We find in particular that since

(1_1, f) \circ (0 \leq 1, 1_c) = (1_1 \circ (0 \leq 1), f \circ 1_c) = (0 \leq 1, f)

(0 \leq 1, 1_d) \circ (1_0, f) = ((0 \leq 1) \circ 1_0, 1_d \circ f) = (0 \leq 1, f)

we have

\eta(1_1, f) \circ \eta(0 \leq 1, 1_c) = \eta(0 \leq 1, f)

\eta(0 \leq 1, 1_d) \circ \eta(1_0, f) = \eta(0 \leq 1, f)

or, using the abbreviations,

G(f) \circ \phi_c = \phi_f = \phi_d \circ F(f).

In particular, the data \phi_f is redundant: it may be defined either as either side of the equation

G(f) \circ \phi_c = \phi_d \circ F(f).

Exercise: Just on the basis of this last equation (for arbitrary morphisms f and objects c of C), prove that functoriality of \eta follows.

This leads us at last to the definition of natural transformation:

Definition: Let C, D be categories and let F, G be functors from C to D. A natural transformation \phi: F \to G is an assignment of morphisms \phi_c: F(c) \to G(c) in D to objects c of C, such that for every morphism f: c \to d, the following equation holds: G(f) \circ \phi_c = \phi_d \circ F(f). \Box

Usually this equation is expressed in the form of a commutative diagram:

          F(f)
     F(c) ---> F(d)
      |         |
phi_c |         | phi_d
      V   G(f)  V
     G(c) ---> G(d)

which asserts the equality of the composites formed by following the paths from beginning (here F(c)) to end (here G(d)). (Despite the inconvenience in typesetting them, commutative diagrams as 2-dimensional arrays are usually easier to read and comprehend than line-by-line equations.) The commutative diagram says that the components \phi_c of the transformation are coherent or compatible with all morphisms f: c \to d of the domain category.

Remarks: Now that I’ve written this post, I’m a little worried that any first-timers to category theory reading this will find this approach to natural transformations a little hardcore or intimidating. In that case I should say that my intent was to make this notion seem as inevitable as possible: by taking seriously the analogy

function space: category of spaces :: functor category: category of categories

we are inexorably led to the “right” (the “natural”) notion of natural transformation as morphism between functors. But if this approach is for some a pedagogical flop, then I urge those readers just to forget it, or come back to it later. Just remember the definition of natural transformation we finally arrived at, and you should be fine. Grasping the inner meaning of fundamental concepts like this takes time anyway, and isn’t merely a matter of pure deduction.

I should also say that the approach involved a kind of leap of faith that these functor categories (the exponentials D^C) “exist”. To be sure, the analysis above shows clearly what they must look like if they do exist (objects are functors C \to D; morphisms are natural transformations as we’ve defined them), but actually there’s some more work to do: one must show they satisfy the universal property with respect to not just the two probing categories \mathbf{1} and \mathbf{2} that we used, but any category E.

A somewhat serious concern here is that our talk of exponential categories played pretty fast and loose at the level of mathematical foundations. There’s that worrying phrase “category of categories”, for starters. That particular phraseology can be avoided, but nevertheless, it must be said that in the case where C is a large category (i.e., involving a proper class of morphisms), the collection of all functors from C to D is not a well-formed construction within the confines of Gödel-Bernays-von Neumann set theory (it is not provably a class in general; in some approaches it could be called a “super-class”).

My own attitude toward these “problems” tends to be somewhat blasé, almost dismissive: these are mere technicalities, sez I. The main concepts are right and robust and very fruitful, and there are various solutions to the technical “problem of size” which have been developed over the decades (although how satisfactory they are is still a matter of debate) to address the apparent difficulties. Anyway, I try not to worry about it much. But, for those fine upstanding citizens who do worry about these things, I’ll just state one set-theoretically respectable theorem to convey that at least conceptually, all is right with the world.

Definition: A category with finite products is cartesian closed if for any two objects c, d, there exists an exponential object d^c.

Theorem: The category of small categories is cartesian closed. \Box

This week’s problem is offered more in the spirit of a light and pleasant diversion — I don’t think you’ll need any deep insight to solve it. (A little persistence may come in handy though!)

Define a triomino to be a figure congruent to the union of three of the four unit squares in a 2 \times 2 square. For which pairs of positive integers (m, n) is an m \times n rectangle tileable by triominoes?

Please submit solutions to topological[dot]musings[At]gmail[dot]com by Wednesday, July 3, 11:59 pm (UTC); do not submit solutions in Comments. Everyone with a correct solution will be inducted into our Hall of Fame! We look forward to your response. Enjoy!

After a long hiatus (sorry about that!), I would like to resume the series on Stone duality. You may recall I started this series by saying that my own point of view on mathematics is strongly informed by category theory, followed by a little rant about the emotional reactions that category theory seems to excite in many people, and that I wouldn’t be “blathering” about categories unless a strong organic need was felt for it. Well, it’s come to that point: to continue talking sensibly about Stone duality, I really feel some basic concepts of category theory are now in order. So: before we pick up the main thread again, I’ll be talking about categories up to the point of the central concept of adjoint pairs, generalizing what we’ve discussed before in the context of truth-valued matrix algebra.

I’ll start by firmly denouncing a common belief: that category theory is some arcane, super-abstract subject. I just don’t believe that’s a healthy way of looking at it. To me, categories are no more and no less abstract than groups, rings, fields, etc. — they are just algebraic structures of a certain type (and a not too complicated type at that). That said, they are particularly ubiquitous and useful structures, which can be studied either as small structures (for example, posets provide examples of categories, and so do groups), or to organize the study of general types of structure in the large (for example, the class of posets and poset morphisms forms a category). Just think of them that way: they are certain sorts of algebraic structures which crop up just about everywhere, and it is very useful to learn something about them.

Usually, the first examples one is shown are large categories, typically of the following sort. One considers the class of mathematical structures of a given type: it could be the class of groups, or of posets, or of Boolean algebras, etc. The elements of a general such class are given the neutral name “objects”. Then, we are also interested in how the objects A, B, C, \ldots are related to each other, typically through transformations f: A \to B which “preserve” the given type of structure. In the case of sets, transformations are just functions; in the case of groups, the transformations are group homomorphisms (which preserve group multiplication, inversion, and identities); in the case of vector spaces, they are linear transformations (preserving vector addition and scalar multiplication); in the case of topological spaces, they are continuous maps (preserving a suitable notion of convergence). In general, the transformations are given the neutral name “homomorphisms”, or more often just “morphisms” or “maps”.

In all of these cases, two morphisms f: A \to B, g: B \to C compose to give a new morphism g \circ f: A \to C (for example the composite of two group homomorphisms is a group homomorphism), and do so in an associative way (h \circ (g \circ f) = (h \circ g) \circ f), and also there is an identity morphism 1_A: A \to A for each object A which behaves as identities should (f \circ 1_A = f = 1_B \circ f for any morphism f: A \to B). A collection of objects, morphisms between them, together with an associative law of composition and identities, is called a category.

A key insight of category theory is that in general, important structural properties of objects A, B, C, \ldots can be described purely in terms of general patterns or diagrams of morphisms and their composites. By means of such general patterns, the same concept (like the concept of a product of two objects, or of a quotient object, or of a dual) takes on the same form in many different kinds of category, for many different kinds of structure (whether algebraic, or topological, or analytic, or some mixture thereof) — and this in large part gives category theory the power to unify and simplify the study of general mathematical structure. It came as quite a revelation to me personally that (to take one example) the general idea of a “quotient object” (quotient group, quotient space, etc.) is not based merely on vague family resemblances between different kinds of structure, but can be made absolutely precise and across the board, in a simple way. That sort of explanatory power and conceptual unification is what got me hooked!

In a nutshell, then, category theory is the study of commonly arising structures via general patterns or diagrams of morphisms, and the general application of such study to help simplify and organize large portions of mathematics. Let’s get down to brass tacks.

Definition: A category C consists of the following data:

  • A class O of objects;
  • A class M of morphisms;
  • A function \mbox{dom}: M \to O which assigns to each morphism its domain, and a function \mbox{cod}: M \to O which assigns to each morphism its codomain. If f \in M, we write f: A \to B to indicate that \mbox{dom}(f) = A and \mbox{cod}(f) = B.
  • A function \mbox{Id}: O \to M, taking an object A to a morphism 1_A: A \to A, called the identity on A.

Finally, let C_2 denote the class of composable pairs of morphisms, i.e., pairs (f, g) \in M \times M such that \mbox{cod}(f) = \mbox{dom}(g). The final datum:

  • A function \mbox{comp}: C_2 \to M, taking a composable pair (f: A \to B, g: B \to C) to a morphism g \circ f: A \to C, called the composite of f and g.

These data satisfy a number of axioms, some of which have already been given implicitly (e.g., \mbox{dom}(g \circ f) = \mbox{dom}(f) and \mbox{cod}(g \circ f) = \mbox{cod}(g)). The ones which haven’t are

  1. Associativity: h \circ (g \circ f) = (h \circ g) \circ f for each composable triple (f: A \to B, g: B \to C, h: C \to D).
  2. Identity axiom: Given f: A \to B, f \circ 1_A = f = 1_B \circ f.

Sometimes we write C_0 for the class of objects, C_1 for the class of morphisms, and for n > 1, C_n for the class of composable n-tuples of morphisms. \Box

Nothing in this definition says that objects of a category are “sets with extra structure” (or that morphisms preserve such structure); we are just thinking of objects as general “things” and depict them as nodes, and morphisms as arrows or directed edges between nodes, with a given law for composing them. The idea then is all about formal patterns of arrows and their compositions (cf. “commutative diagrams”). Vishal’s post on the notion of category had some picture displays of the categorical axioms, like associativity, which underline this point of view.

In the same vein, categories are used to talk about not just large classes of structures; in a number of important cases, the structures themselves can be viewed as categories. For example:

  1. A preorder can be defined as a category for which there is at most one morphism f: A \to B for any two objects A, B. Given there is at most one morphism from one object to another, there is no particular need to give it a name like f; normally we just write a \leq b to say there is a morphism from a to b. Morphism composition then boils down to the transitivity law, and the data of identity morphisms expresses the reflexivity law. In particular, posets (preorders which satisfy the antisymmetry law) are examples of categories.
  2. A monoid is usually defined as a set M equipped with an associative binary operation (a, b) \mapsto a \cdot b and with a (two-sided) identity element e for that operation. Alternatively, a monoid can be construed as a category with exactly one object. Here’s how it works: given a monoid (M, \cdot, e), define a category where the class O consists of a single object (which I’ll give a neutral name like \bullet; it doesn’t have to be any “thing” in particular; it’s just a “something”, it doesn’t matter what), and where the class of morphisms is defined to be the set M. Since there is only one object, we are forced to define \mbox{dom}(a) = \bullet and \mbox{cod}(a) = \bullet for all a \in M. In that case all pairs of morphisms are composable, and composition is defined to be the operation in M: a \circ b := a \cdot b. The identity morphism on \bullet is defined to be e. We can turn the process around: given a category with exactly one object, the class of morphisms M can be construed as a monoid in the usual sense.
  3. A groupoid is a category in which every morphism is an isomorphism (by definition, an isomorphism is an invertible morphism, that is, a morphism f: A \to B for which there exists a morphism g: B \to A such that g \circ f = 1_A and f \circ g = 1_B). For example, the category of finite sets and bijections between them is a groupoid. The category of topological spaces and homeomorphisms between them is a groupoid. A group is a monoid in which every element is invertible; hence a group is essentially the same thing as a groupoid with exactly one object.

Remark: The notion of isomorphism is important in category theory: we think of an isomorphism f: A \to B as a way in which objects A, B are the “same”. For example, if two spaces are homeomorphic, then they are indistinguishable as far as topology is concerned (any topological property satisfied by one is shared by the other). In general there may be many ways or isomorphisms to exhibit such “sameness”, but typically in category theory, if two objects satisfy the same structural property (called a universal property; see below), then there is just one isomorphism between them which respects that property. Those are sometimes called “canonical” or “god-given” isomorphisms; they are 100% natural, no artificial ingredients! \Box

Earlier I said that category theory studies mathematical structure in terms of general patterns or diagrams of morphisms. Let me give a simple example: the general notion of “cartesian product”. Suppose X_1, X_2 are two objects in a category. A cartesian product of X_1 and X_2 is an object X together with two morphisms \pi_1:  X \to X_1, \pi_2: X \to X_2 (called the projection maps), satisfying the following universal property: given any object Y equipped with a map f_i: Y \to X_i for i = 1, 2, there exists a unique map f: Y \to X such that f_i = \pi_i \circ f for i = 1, 2. (Readers not familiar with this categorical notion should verify the universal property for the cartesian product of two sets, in the category of sets and functions.)

I said “a” cartesian product, but any two cartesian products are the same in the sense of being isomorphic. For suppose both (X, \pi_1, \pi_2) and (X', \pi_1', \pi_2') are cartesian products of X_1, X_2. By the universal property of the first product, there exists a unique morphism f: X' \to X such that \pi_i' = \pi_i \circ f for i = 1, 2. By the universal property of the second product, there exists a unique morphism g: X \to X' such that \pi_i = \pi_i' \circ g. These maps f and g are inverse to one another. Why? By the universal property, there is a unique map \phi: X \to X (namely, \phi = 1_X) such that \pi_i = \pi_i \circ \phi for i = 1, 2. But \phi = f \circ g also satisfies these equations: \pi_i = \pi_i \circ (f \circ g) (using associativity). So 1_X = f \circ g by the uniqueness clause of the universal property; similarly, 1_{X'} = g \circ f. Hence f: X \to X' is an isomorphism.

This sort of argument using a universal property is called a universality argument. It is closely related to what we dubbed the “Yoneda principle” when we studied posets.

So: between any two products X, X' of X_1 and X_2, there is a unique isomorphism f: X' \to X respecting the product structure; we say that any two products are canonically isomorphic. Very often one also has chosen products (a specific choice of product for each ordered pair (X_1, X_2)), as in set theory when we construe the product of two sets as a set of ordered pairs \{(x_1, x_2): x_1 \in X_1, x_2 \in X_2\}. We use X_1 \times X_2 to denote (the object part of) a chosen cartesian product of (X_1, X_2).

Exercise: Use universality to exhibit a canonical isomorphism \sigma: X_1 \times X_2 \to X_2 \times X_1. This is called a symmetry isomorphism for the cartesian product.

Many category theorists (including myself) are fond of the following notation for expressing the universal property of products:

\displaystyle \frac{f_1: Y \to X_1 \qquad f_2: Y \to X_2}{f = \langle f_1, f_2 \rangle: Y \to X_1 \times X_2}

where the dividing line indicates a bijection between pairs of maps (f_1, f_2) and single maps f into the product, effected by composing f with the pair of projection maps. We have actually seen this before: when the category is a poset, the cartesian product is called the meet:

\displaystyle \frac{a \leq x \qquad a \leq y}{a \leq x \wedge y}

In fact, a lot of arguments we developed for dealing with meets in posets extend to more general cartesian products in categories, with little change (except that instead of equalities, there will typically be canonical isomorphisms). For example, we can speak of a cartesian product of any indexed collection of objects \{X_i\}_{i \in I}: an object \prod_{i \in I} X_i equipped with projection maps \pi_i: \prod_{i \in I} X_i \to X_i, satisfying the universal property that for every I-tuple of maps f_i: Y \to X_i, there exists a unique map f: Y \to \prod_{i \in I} X_i such that f_i = \pi_i \circ f. Here we have a bijection between I-tuples of maps and single maps:

\displaystyle \frac{(f_i: Y \to X_i)_{i \in I}}{f = \langle f_i \rangle_{i \in I}: Y \to \prod_{i \in I} X_i}

By universality, such products are unique up to unique isomorphism. In particular, (X_1 \times X_2) \times X_3 is a choice of product of the collection \{X_1, X_2, X_3\}, as seen by contemplating the bijection between triples of maps and single maps

\displaystyle \frac{\frac{f_1: Y \to X_1 \qquad f_2: Y \to X_2}{\langle f_1, f_2 \rangle: Y \to X_1 \times X_2} \qquad \frac{f_3: Y \to X_3}{f_3: Y \to X_3}}{f: Y \to (X_1 \times X_2) \times X_3}

and similarly X_1 \times (X_2 \times X_3) is another choice of product. Therefore, by universality, there is a canonical associativity isomorphism

\alpha: (X_1 \times X_2) \times X_3 \to X_1 \times (X_2 \times X_3).

Remark: It might be thought that in all practical cases, the notion of cartesian product (in terms of good old-fashioned sets of tuples) is clear enough; why complicate matters with categories? One answer is that it isn’t always clear from purely set-theoretic considerations what the right product structure is, and in such cases the categorical description gives a clear guide to what we really need. For example, when I was first learning topology, the box topology on the set-theoretic product \prod_{i \in I} X_i seemed to me to be a perfectly natural choice of topology; I didn’t understand the general preference for what is called the “product topology”. (The open sets in the box topology are unions of products \prod_{i \in I} U_i of open sets in the factors X_i. The open sets in the product topology are unions of such products where U_i = X_i for all but finitely many i \in I.)

In retrospect, the answer is obvious: the product topology on \prod_{i \in I} X_i is the smallest topology making all the projection maps \pi_i continuous. This means that a function f: Y \to \prod_{i \in I} X_i is continuous if and only if each f_i = \pi_i \circ f: Y \to X_i is continuous: precisely the universal property we need. Similarly, in seeking to understand products or other constructions of more abstruse mathematical structures (schemes for instance), the categorical description is de rigeur in making sure we get it right. \Box

For just about any mathematical structure we can consider a category of such structures, and this applies to the notion of category itself. That is, we can consider a category of categories! (Sounds almost religious to me: category of categories, holy of holies, light of lights…)

  • Remark: Like “set of sets”, the idea of category of categories taken to a naive extreme leads to paradoxes or other foundational difficulties, but there are techniques for dealing with these issues, which I don’t particularly want to discuss right now. If anyone is uncomfortable around these issues, a stopgap measure is to consider rather the category of small categories (a category has a class of objects and morphisms; a small category is where these classes are sets), within some suitable framework like the set theory of Gödel-Bernays-von Neumann.

If categories are objects, the morphisms between them may be taken to be structure-preserving maps between categories, called “functors”.

Definition: If C and D are categories, a functor F: C \to D consists of a function F_0: C_0 \to D_0 (between objects) and a function F_1: C_1 \to D_1 (between morphisms), such that

  • F_0(\mbox{dom}_C(f)) = \mbox{dom}_D(F_1(f)) and F_0(\mbox{cod}_C(f)) = \mbox{cod}_D(F_1(f)), for each morphism f \in C_1 (i.e., F preserves domains and codomains of morphisms);
  • F_1(1_A) = 1_{F_0(A)} for each object A \in C_0, and F_1(g \circ f) = F_1(g) \circ F_1(f) for each composable pair (f, g) \in C_2 (i.e.,