Introduction to Category Theory
Introduction to Category Theory
What is a Category?
Category theory is a way of looking at mathematics that focuses on relationships. Instead of zooming in on the details of what things are, it zooms out to see how they connect to each other.
Imagine a map. You have cities, which are like the 'things' in your system. You also have roads connecting these cities. In category theory, the cities are called objects, and the roads are called morphisms (or arrows). The key idea is that you can learn a lot about the system just by studying the roads and how they connect, without needing to know the street layout of every single city.
Category theory is less about the objects themselves and more about the network of relationships between them.
An object can be almost anything: a number, a set of items, a geometric shape, or even another category. A morphism is a structure-preserving map from one object to another. For now, just think of it as a directed connection or a transformation.
The Rules of the Road
For a collection of objects and morphisms to be officially called a category, it must follow two simple rules. These rules ensure the system is consistent and well-behaved.
1. Composition
If there's a road from city A to city B, and another from city B to city C, there must be a direct route from A to C. In category theory, if you have a morphism from object to object (written ) and a morphism from to (), you must be able to compose them. This creates a new morphism that goes directly from to .
This composition is written as (read "g after f"). Notice the order: you apply first, then .
Composition must also be associative. If you're composing three morphisms, , it doesn't matter if you combine and first, or and first. The final result is the same.
2. Identity
Every object must have a special morphism that starts and ends at itself without changing anything. This is the identity morphism. For an object , its identity morphism is written as . It represents the action of doing nothing.
The identity morphism works like the number 1 in multiplication. Composing any morphism with an identity morphism doesn't change . If goes from to , then composing it with the identity at or the identity at just gives you back.
Some Common Categories
This all seems very abstract, but categories are everywhere in mathematics. The framework just gives us a new language to describe familiar structures.
| Category | Objects | Morphisms |
|---|---|---|
| Set | Sets | Functions between sets |
| Grp | Groups | Group homomorphisms |
| Top | Topological spaces | Continuous functions |
| Vect | Vector spaces | Linear maps |
Let's look at Set, the category of sets. The objects are any possible set, like {1, 2}, {a, b, c}, or the set of all integers. The morphisms are functions that map elements from one set to another.
- Composition: Function composition. If and are functions, their composition is a function from to .
- Identity: The identity function. For any set , the function maps every element to itself.
Since these properties hold, sets and functions form a valid category.
What are the two fundamental components that define a category?
In a category, if you have a morphism and a morphism , which of the following represents their composition?
That's the basic machinery of a category: objects, morphisms, composition, and identity. By focusing on these simple building blocks, category theory provides a powerful, high-level view of how different areas of mathematics are connected.