Introduction
____ _ _____ _____ ____ ___ ______ __
/ ___| / \|_ _| ____/ ___|/ _ \| _ \ \ / /
| | / _ \ | | | _|| | _| | | | |_) \ V /
| |___ / ___ \| | | |__| |_| | |_| | _ < | |
\____/_/ _\_\_|_|_____\____|\___/|_| \_\|_|
|_ _| | | | ____/ _ \| _ \ \ / /
| | | |_| | _|| | | | |_) \ V /
| | | _ | |__| |_| | _ < | |
_|_|_|_|_|_|_____\___/|_|_\_\|_| _____ ___ ___ _ _ ____
| ___/ _ \| | | | \ | | _ \ / \|_ _|_ _/ _ \| \ | / ___|
| |_ | | | | | | | \| | | | |/ _ \ | | | | | | | \| \___ \
| _|| |_| | |_| | |\ | |_| / ___ \| | | | |_| | |\ |___) |
|_| \___/ \___/|_| \_|____/_/ \_\_| |___\___/|_| \_|____/
What is a thing? How it relates to everything else.
A number is defined by what you can do with it: add it to other numbers, multiply it, compare it. A function is how it transforms inputs to outputs, how it composes with other functions, how it fits into larger systems.
This is the insight at the heart of category theory: you are what you relate to.
An object exists through its interactions—its morphisms, its connections, its relationships with the world around it. Two objects that interact with their environment in identical ways are identical, no matter what they look like inside. Structure emerges not from intrinsic properties but from patterns of interaction.
When you write code, you reason about interfaces, contracts, behavior. A List<T> is interesting because it's a functor—because it transforms, maps, folds, filters. Its meaning comes from how it interacts with the rest of your program.
Category theory formalizes this intuition. It gives you a language for describing things solely through their relationships. Objects exist only as the source and target of arrows. An object's nature is revealed by the arrows flowing in and out of it—all the ways it can be transformed, combined, or decomposed.
Know how something relates to everything else, and you know everything there is to know about it. The internal details become irrelevant.
Think about that. In programming, in mathematics, in any formal system—what matters is how things connect.
This changes how we think about composition. You stop asking "what is this?" and start asking "what can I do with this?" You stop building monolithic structures and start building interfaces. You stop thinking about objects in isolation and start thinking about the space of relationships between them.
Category theory is the mathematics of this perspective. It strips away accidents and reveals essence—and the essence is structure. Composition over components. Arrows over objects. The map over the territory.
Once you learn to see this way, you it everywhere. In your type systems. In your databases. In your APIs. In the fundamental structure of computation itself.
"Every thing is what it is because it occupies a place in an indivisible whole." — After Leibniz