Category theory studies mathematical structures through the maps between them. A category has objects and arrows, called morphisms, that compose associatively and have identities. Sets with functions, groups with homomorphisms and vector spaces with linear maps are all categories. Functors map one category to another, and natural transformations compare functors. Defining objects by universal properties, rather than by their contents, unifies products, quotients and free constructions across all of math. Founded by Eilenberg and Mac Lane in the 1940s, it is now central to algebraic topology and to functional programming. Learnr builds a category theory course to match your background, using short lessons anchored to familiar examples.
How to learn Category Theory, step by step
- Bring examples from other subjects. Category theory abstracts what you already know, so it helps to have seen groups, vector spaces and ideally topological spaces. Without those, every definition feels empty because there is nothing to compare it to.
- Build a library of small categories. Treat a partially ordered set as a category with one arrow when a <= b, and a monoid as a category with a single object. Small examples let you test every new definition by hand.
- Draw commutative diagrams for everything. Write each claim as a diagram and check that every path between two objects gives the same composite. Diagram chasing is the main proof technique, and drawing well makes proofs readable.
- Learn functors and natural transformations together. Check that the power-set construction and the free group construction are functors. Then study the double-dual of a finite-dimensional vector space, the classic example of a natural isomorphism.
- Read universal properties as specifications. A product of A and B is any object with maps to both that every other such object factors through uniquely. Compare what products look like in sets, groups and posets to see the definition in action.
- Tackle adjunctions and Yoneda slowly. Work through free and forgetful functor pairs before the general definition, then the Yoneda lemma with representable functors. A few concrete problems per day in a Learnr course help these ideas settle.
What you'll learn
- Recognize categories in algebra, topology, order theory and programming
- Define and check functors and natural transformations
- Use universal properties to describe products, coproducts and limits
- Identify adjoint functors such as free and forgetful pairs
- State and apply the Yoneda lemma
How long does it take to learn Category Theory?
A first pass through categories, functors, universal properties and adjunctions takes about 3 to 6 months at 5 to 8 hours a week for someone with an undergraduate algebra background. Programmers learning it for Haskell-style abstractions can reach working intuition faster.
What you need before you start
Some abstract algebra (groups and homomorphisms) and comfort with proofs. Linear algebra and topology provide many motivating examples but are not strictly required at the start.
Common mistakes to avoid
- Learning category theory before any other abstract math, so the definitions have nothing concrete to describe and feel like empty formalism.
- Assuming morphisms must be functions between sets. In a poset or a one-object category, arrows are just relations or elements.
- Rushing to monads without understanding functors, natural transformations and adjunctions, which monads are built from.
How Learnr builds your course
Type your topic
Tell Learnr you want to learn Category Theory, or get as specific as you like.
Get a personalized course
Learnr instantly builds a full Category Theory course tailored to your goal and skill level.
Learn and level up
Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.
Category Theory questions, answered
Is category theory useful for programmers?
It shaped functional programming languages like Haskell, where Functor and Monad are type classes inspired by categorical ideas. You can program well without it, but it gives a precise vocabulary for composition and abstraction.
What is a good book for learning category theory?
Leinster's Basic Category Theory and Riehl's Category Theory in Context are both free online and aimed at mathematicians. Milewski's Category Theory for Programmers is popular with software developers.
Explore more courses
More math courses
- Learn Fourier Analysis
- Learn Stochastic Processes
- Learn Math for Machine Learning
- Learn Financial Math
- Learn Abacus
- Learn Vedic Math
- Learn Standard Deviation
- Learn Rational Expressions
Ready to learn Category Theory?
Start your free, personalized Category Theory course in seconds. It will be typed in and ready when you get there.
Start learning Category TheoryFree to start. No credit card.