Mathematics of Labeling
The Power of Abstraction in Mathematics
This set of notes explores how abstraction — removing irrelevant details to reveal underlying structure — is a fundamental tool in mathematics. From everyday concepts like “person” to advanced fields like category theory, abstraction allows mathematicians to give the same name to different things and prove results that apply across many domains.
What Is Abstraction?
Abstraction is the process of stripping away specific, unimportant details from an object or concept to expose its essential internal structure. Once the structure is identified, a label (a common name) can be given to any object that shares that same structure.
Example: Two very different people, Alice and Bob, can both be called person because, after removing irrelevant details (age, appearance, location), they share the same fundamental structure.
The French mathematician Henri Poincaré famously said: “Mathematics is the art of giving the same name to different things.”
A common name is applied to distinct objects that share the same abstract structure.
This seemingly trivial notion underpins much of mathematical reasoning.
Abstraction in the Number System
The Number Line and Rational Numbers
The number line stretches from −∞ to ∞. While many numbers are ugly decimals, a huge subset can be expressed as a ratio of two integers. These numbers are called rational numbers.
A rational number has the form ba where a and b are integers and b=0.
When we add two rational numbers, the result always appears to be rational. But why? Is it coincidence, or is there a deeper reason?
Revealing the Structure of a Rational Number
Abstraction helps: take an arbitrary ratio like 53161. The specific numerator and denominator are irrelevant; we only care that both are integers. Replace them with variables:
Let a (numerator) and b (denominator) be arbitrary integers.
The structure of any rational number is ba, where a,b∈Z.
This is the essence of a ratio of integers — exactly the same process as abstracting “person” from Alice and Bob.
Proving the Sum of Two Rationals Is Rational Using Abstraction
Let two arbitrary rational numbers be ba and dc, with a,b,c,d∈Z.
Find a common denominator: ba+dc=bdad+bc.
Now the numerator is ad+bc and the denominator is bd.
The details of how these are composed are irrelevant. Notice:
ad is an integer (product of integers), bc is an integer → their sum ad+bc is an integer.
bd is an integer.
Replace the numerator with an arbitrary integer p and the denominator with an arbitrary integer q: $$ \frac{a}{b} + \frac{c}{d} = \frac{p}{q}, \quad p,q \in \mathbb{Z}. $$
The result is again a rational number. Therefore, the sum of any two rational numbers is rational — proven through abstraction.
Algebra is simply the study of abstraction applied to numbers. By replacing specific numbers with variables, we reason about all numbers at once.
Other Areas of Mathematics Rooted in Abstraction
Abstraction extends far beyond numbers. Many advanced mathematical structures arise by abstracting concrete phenomena:
Group theory is the abstraction of symmetries.
Ring theory is the abstraction of basic arithmetic.
Graph theory is the abstraction of relationships.
Each of these fields removes specific details to reveal a common underlying structure that can be studied generally.
Category Theory: The Abstraction of Composition
In the mid-20th century, two mathematicians (Saunders Mac Lane and Samuel Eilenberg) created a new field by abstracting an even more fundamental concept: composition. Category theory studies the abstract structure of composition itself.
Composition in Set Theory — A Concrete Example
Set theory studies sets (collections of things) and functions (mappings between sets).
A function f:A→B assigns each element of set A to an element of set B.
For example:
age: people → integers (assigns each person their age).
≥18: integers → {true, false} (checks if age ≥ 18).
If we have two functions where the codomain of one equals the domain of the next, we can compose them to form a new function:
composition: (g∘f)(x)=g(f(x)). We read g∘f as “g follows f”.
Example: eligible = (≥18) ∘ age maps a person directly to true/false.
Identity Functions
For any set A, there is an identity function idA:A→A that maps every element to itself. Composing any function f with the identity gives back the same function:
f∘idA=f and idB∘f=f (where f:A→B).
The identity acts like multiplying by 1 — it does nothing.
Abstracting Composition to a Category
Now we apply abstraction to the entire setting of sets and functions. Remove irrelevant details:
Replace specific sets (e.g., “people”, “integers”, “truth values”) with abstract symbols: objects A,B,C.
Replace specific functions (e.g., “age”) with abstract symbols: arrows f,g.
Replace the specific definition of composition with a requirement: for any two arrows where the codomain of one equals the domain of the other, there must exist a composite arrow that “cuts the corner”.
Composition must be associative: (h∘g)∘f=h∘(g∘f) whenever the compositions make sense.
For each object, there must be an identity arrow idA that acts as a unit for composition: f∘idA=f and idB∘f=f for any f:A→B.
A category is defined by:
A collection of objects
A collection of arrows (also called morphisms) between objects
A composition operation for arrows that is associative
An identity arrow for each object
This abstract structure is the essence of composition — just like ba is the essence of rational numbers.
Examples of Categories
Many different mathematical and computational structures form categories. Any proof about categories applies to all of them simultaneously.
Linear algebra: Objects are vector spaces, arrows are matrices, composition is matrix multiplication, identity arrows are identity matrices.
Functional programming: Objects are data types (e.g.,
int,float,bool), arrows are functions between types, composition is function composition, identity arrows are identity functions.Example: If
sqrt: float → floatandint: float → int, thenint ∘ sqrtmaps a float to an integer. What name would you give this function? (It returns the integer part of the square root.)
Order theory: Objects are integers, an arrow n→m exists if n≤m. Composition corresponds to transitivity: if n≤m and m≤p, then n≤p. Identity arrows exist because n≤n. This forms a category based on ordering.
A Simple but Powerful Proof: The Identity Arrow Is Unique
Proof: Suppose an object A has two identity arrows, idA and idA.
Since idA is an identity, composing it with any arrow starting at A gives back that arrow. In particular, idA∘idA=idA.
Since idA is also an identity, composing any arrow ending at A with it gives back that arrow. So idA∘idA=idA.
Thus idA=idA. The two identity arrows are the same.
This seemingly trivial result has far-reaching consequences:
There is exactly one identity matrix for each dimension.
There is exactly one identity function for each data type in programming.
There is exactly one identity mapping from a set to itself.
All these facts are proved simultaneously with one categorical argument.
Conclusion: Abstraction as the Mathematician's Weapon
Abstraction is the tool that drives progress from basic algebra to the most abstract modern mathematics. By removing irrelevant details, we reveal the common structures that underlie diverse phenomena. Using abstraction ourselves, we can arrive at the heart of subjects in a natural and intuitive way.
Algebra: abstraction of numbers.
Group theory: abstraction of symmetries.
Ring theory: abstraction of arithmetic.
Graph theory: abstraction of relationships.
Category theory: abstraction of composition itself.
Every categorical proof instantly applies to all areas that form a category — linear algebra, programming, order theory, and many more. Abstraction truly deserves the title of the mathematician's most powerful weapon.

Ask anything
We've read this whole study set, so questions about it get the best answers.