Level 1A: Categories – The Language of Mathematics
The Defect. Set-theoretic mathematics defines every object by its elements. A group is a set with operations; a topological space is a set with open subsets. This works for elementary mathematics but breaks down for objects whose essential structure is relational rather than elemental – a topological space is not its underlying set (many different topologies on the same set), and a group is not its underlying set (many different group structures). Category theory shifts the primitive from elements to arrows: what matters about an object is not what it contains but how it relates to other objects.
The One-Line Reveal. Read the definition of a category below. Close the page. Try to verify the axioms in Set (objects = sets, morphisms = functions). The axioms hold because function composition is associative and identity functions exist – and that verification is the proof that Set is a category.
1. Categories and Morphisms
Section titled “1. Categories and Morphisms”Definition. A category consists of:
- A collection of objects
- For each pair of objects , a collection of morphisms (arrows) from to , written
- For each triple , a composition function , written
satisfying:
- Associativity: whenever the compositions are defined.
- Identity: for every object , there exists such that and for all composable .
Theorem 1.1. Identity morphisms are unique.
Proof. Let and both be identity morphisms on . Then (since is an identity) (since is an identity).
The One-Line Reveal. The proof above is two applications of the identity axiom – once for each identity morphism. The pattern (use one axiom, then the other) recurs in every uniqueness proof in category theory.
Examples
Section titled “Examples”| Category | Objects | Morphisms | Composition |
|---|---|---|---|
| sets | functions | function composition | |
| groups | group homomorphisms | function composition | |
| topological spaces | continuous maps | function composition | |
| vector spaces over | linear maps | function composition | |
| natural numbers | matrices | matrix multiplication |
The last example () shows that objects need not be sets: the object is a natural number (a “dimension”), and the morphisms from to are matrices. Composition is matrix multiplication, which is associative, and the identity matrix is the identity morphism. Choosing a basis identifies (finite-dimensional vector spaces) with this matrix category: every finite-dimensional space is isomorphic to some , and once bases are fixed, linear maps are exactly matrices. The matrix category also shows that the axioms never mention elements: the object is not a set at all. The table names categories that later levels build, on purpose: category theory is the language the course will speak. Work with today; and become fully built examples in their own levels, and the table is a map of where the course is going, not a list of prerequisites.
Quick check.
- What two axioms must a category’s composition satisfy?
- In , what is the identity morphism of a set ?
- Name a category whose objects are not sets.
- How many identity morphisms can an object have?
- What does the type encode about composability?
Answers: 1. Associativity; an identity morphism for every object. 2. The identity function . 3. : objects are natural numbers, morphisms are matrices. 4. Exactly one (Theorem 1.1). 5. The codomain of the first arrow must be the domain of the second.
2. Monomorphisms, Epimorphisms, and Isomorphisms
Section titled “2. Monomorphisms, Epimorphisms, and Isomorphisms”Definition. A morphism is a monomorphism (mono) if for all , implies .
Definition. A morphism is an epimorphism (epi) if for all , implies .
Definition. A morphism is an isomorphism if there exists with and . We write .
Theorem 2.1. Every isomorphism is both a monomorphism and an epimorphism.
Proof. Let be an isomorphism with inverse . To show is mono: suppose for . Compose both sides with on the left:
To show is epi: suppose for . Compose both sides with on the right: , and , so .
The One-Line Reveal. The proof’s pivot is composing with the inverse – canceling using its inverse. The same cancellation works for any isomorphism in any category.
Caution. The converse fails: a morphism that is both mono and epi need not be an isomorphism. (In it does hold, because mono and epi are exactly injective and surjective, and injective plus surjective is bijective; the category axioms alone are too weak to force it.) Work in , the category of monoids (a set with an associative binary operation and an identity element) and functions preserving both. The inclusion of the natural numbers into the integers, both under addition, is mono: it is injective, and if for then for every , so by injectivity. It is epi: let be monoid homomorphisms agreeing on , so in particular . A homomorphism out of is determined by the image of : for additivity gives , and for we have , so is a two-sided additive inverse of , and two-sided inverses are unique (if and , then ). So and agree everywhere. But the inclusion is not an isomorphism: a retraction would have to send to a natural number with , and there is no such natural number.
Quick check.
- State monomorphism in one line.
- What is the pivot of Theorem 2.1’s proof?
- Why is epi in ?
- Why does mono plus epi give an isomorphism in ?
- What is a split epimorphism?
Answers: 1. forces , for all pairs into the domain. 2. Composing with the inverse cancels . 3. A homomorphism out of is pinned by , since is the unique two-sided inverse of . 4. Mono is injective and epi is surjective there. 5. There is with .
3. Universal Properties
Section titled “3. Universal Properties”Definition. An object in is terminal if for every object , there exists a unique morphism . An object is initial if for every object , there exists a unique morphism .
Theorem 3.1. Terminal objects are unique up to unique isomorphism.
Proof. Let and be terminal. Since is terminal, there exists . Since is terminal, there exists . Now is a morphism from to itself. Since is terminal, there is exactly one morphism – namely . So . Symmetrically, . So , and is the unique such isomorphism (any other with would satisfy by the same uniqueness argument).
The One-Line Reveal. The proof uses the definition of terminal twice: once to get , once to get , then the uniqueness of morphisms from a terminal object forces the compositions to be identities.
Examples of universal properties as terminal/initial objects:
- The product comes with projections and , and is characterised by: for every object with maps and , there exists a unique with and . In , sends to the pair , and nothing else could work. The content of the definition is the existence and uniqueness of , not what the elements of are.
- The kernel of a group homomorphism comes with an inclusion , and it is universal among that data: any homomorphism with the trivial map factors uniquely through .
- The disjoint union comes with injections and , and is characterised dually: it is initial among objects equipped with maps from and from , meaning every such pair of maps extends uniquely to a map .
Every universal property says: this object is the unique (up to unique isomorphism) solution to a certain mapping problem. The problem is always of one shape: be the target of exactly one arrow from every object in a certain configuration.
Quick check.
- Define terminal and initial objects.
- What does unique up to unique isomorphism give for two terminal objects?
- State the product’s universal property.
- State the kernel’s universal property.
- How does the disjoint union dualise the product?
Answers: 1. Terminal: every object has exactly one arrow to it; initial: exactly one from it. 2. An isomorphism , and it is the only one compatible with the universal arrows. 3. Projections ; every pair , factors uniquely through . 4. Every with trivial factors uniquely through . 5. Every pair of maps from and from extends uniquely to a map .
4. Functors
Section titled “4. Functors”Definition. A functor between categories consists of:
- A map on objects:
- A map on morphisms:
satisfying:
- (composition preserved)
Theorem 4.1. Functors preserve isomorphisms: if then .
Proof. Let be the inverse of . Then , and symmetrically . So is an isomorphism with inverse .
The One-Line Reveal. The proof is “apply the functor to both sides of ” – the functorial axioms do the rest.
Examples:
- The forgetful functor sends each group to its underlying set and each homomorphism to its underlying function. It “forgets” the group structure.
- The free functor sends each set to the free group on . This is left adjoint to (see below).
- The fundamental group sends each pointed space to its fundamental group. This is a functor: continuous maps induce group homomorphisms, and composition of maps induces composition of homomorphisms.
Quick check.
- What two laws define a functor?
- What do functors do to isomorphisms?
- What does the forgetful functor forget?
- In what sense is the fundamental group a functor?
- Give one functor from this page and one thing it preserves or forgets.
Answers: 1. and . 2. Carry them to isomorphisms (Theorem 4.1). 3. The group structure; it keeps the underlying set and functions. 4. Continuous pointed maps induce group homomorphisms, compatibly with composition. 5. For instance: forgets; preserves loop composition.
5. Natural Transformations and Adjunctions
Section titled “5. Natural Transformations and Adjunctions”Definition. Given functors , a natural transformation assigns to each object a morphism such that for every morphism , the square
commutes: .
Definition. An adjunction between functors and is, for every pair of objects of and of , a bijection
natural in both variables: for every in and every in ,
We write ( is left adjoint, is right adjoint).
Example: Free ⊣ Forgetful. The free group functor is left adjoint to the forgetful functor :
This says: a group homomorphism from the free group on to is exactly a function from to – the images of the generators freely determine the homomorphism. This bijection is natural in both and .
Why adjunctions matter. An adjunction captures the concept of “the most efficient solution to a universal problem.” The free group is the most efficient way to turn a set into a group – no extra relations, no wasted structure. Adjunctions formalise this efficiency, and they appear throughout mathematics: the tensor-hom adjunction in algebra, the product-hom adjunction in topology, the base-change adjunction in geometry.
Quick check.
- State the naturality square of .
- What does an adjunction assign to each pair ?
- Which two naturality equations did the adjunction definition demand?
- What do the free and forgetful functors form?
- In words: what does say?
Answers: 1. . 2. A bijection . 3. and . 4. An adjunction . 5. A homomorphism from the free group on is exactly a function from into .
6. Problems
Section titled “6. Problems”- Verify that satisfies the category axioms. (§1 – composition is matrix multiplication, so associativity of composition is associativity of matrix multiplication, proved entrywise: .)
- Prove that the empty set is an initial object in . (§3 – for every set , there exists a unique function because there are no elements to map.)
- Prove that if is both mono and split epi (there exists with ), then is an isomorphism. (§2 – ; cancelling the mono on the left gives .)
- Show that the forgetful functor is faithful but not full. (§4 – faithful: distinct homomorphisms are distinct functions; not full: not every function between underlying sets is a homomorphism.)
- Let both be left adjoint to the same . Show that the adjunction bijections can be composed to give a natural bijection for all . (§5 – the composition of two bijections is a bijection; naturality follows from the naturality of each adjunction.)
Problems. The quick checks above tested recall. These chain several results and require full written arguments; hints are included where the jump is large.
- Prove that initial objects are unique up to unique isomorphism. (Dualise Theorem 3.1: reverse every arrow in the proof.)
- Prove that the composition of isomorphisms is an isomorphism and that . (Compose the claimed inverse with and regroup by associativity; both composites collapse to the relevant identity.)
- Prove that in the isomorphisms are exactly the invertible square matrices. (An isomorphism in the category needs two-sided matrix inverses: and for the same .)
The One-Line Reveal (for this page)
Section titled “The One-Line Reveal (for this page)”The entire page follows from one shift: stop asking what objects contain and start asking how they relate. Every definition (mono, epi, terminal, functor, adjunction) is stated in terms of arrows and commutative diagrams – never in terms of elements. This is why category theory applies to objects that have no elements (the category ), and why it unifies seemingly unrelated areas (the same universal property describes products in , kernels in , and disjoint unions in ).
Where to go next
Section titled “Where to go next”- Linear Algebra Done Wrong – the next page: coordinate-free linear algebra with determinants as alternating forms.
- Conceptual Mathematics – Lawvere & Schanuel’s book, which develops this material at a gentler pace.
- Algebra: Chapter 0 – Aluffi’s book, which treats all of algebra through the categorical lens you have just learned.