In undergraduate courses, students are often taught that a function is injective if it never maps distinct inputs to the same output, and it is surjective if every member of the codomain is an output.

But in an undergraduate course, or a secondary-school course, one can easily also teach the idea that a function $f:A\to B$ is injective if it has a left inverse and surjective if it has a right inverse. There is no need to mention categories and morphisms here, but this way of viewing the matter is in the spirit of category theory, i.e. it talks about things that in cateogory theory would be called objects or morphisms and not about members of the domain and the codomain.

How far can one take this idea, fruitfully presenting ideas in the way in which one would in category theory without actually defining categories and without getting unreasonably complicated and while staying concrete so that students understand how it applies to concrete undergraduate subject matter?

  • 3
    $\begingroup$ Sounds interesting to explore, but how easy are the concepts of left and right inverses, I wonder? $\endgroup$
    – J W
    Feb 26, 2022 at 7:27
  • 3
    $\begingroup$ Many students struggle with function composition. Not knocking the idea though. In what course(s) are students already being taught left and right inverses? $\endgroup$
    – J W
    Feb 26, 2022 at 9:07
  • 4
    $\begingroup$ In my mathematical training (i.e. the honors mathematical program at Carnegie Mellon in the late 80's), we had ALL of the definitions of surjectivity and injectivity dropped on us in the first four weeks of our intro course. My experiences in that course and beyond is that left and right invertibility gave me neither an intuitive insight into functions nor a leg up when studying later mathematical fields. Can you talk about why it would be good for students to understand "category theory without categories and without theory"? $\endgroup$ Feb 26, 2022 at 14:46
  • 1
    $\begingroup$ @MichaelHardy So something like Tom Leinster's Rethinking set theory? arxiv.org/abs/1212.6543 Only not just for sets, but for all other set-level algebraic structures? $\endgroup$
    – user19584
    Mar 1, 2022 at 6:30
  • 1
    $\begingroup$ I think the natural reformulations would be monomorphisms and epimorphisms. That epimorphisms split (the axiom of choice) does fail in many categories. $\endgroup$ Oct 24, 2022 at 18:43

1 Answer 1


I don't see how a single "answer" could be provided so I'm simply going to write "I love where your head's at and here are some more fun ways to continue in that manner..."

In Linear Algebra, for me one of the key things to teach in an undergraduate course is that not all vector spaces $V$ are isomorphic to $\mathbb{R}^n$ for some natural number $n$. Teaching this concept comes in many flavors but below is the approach I've settled on and leads itself to implicitly teaching students about functors.

Given a set $X$ and a vector space $V$ we prove that the set $\operatorname{Set}(X,V) = \{ f: X \to V \mid f \text{ is a function } \}$ is itself a vector space. Below are some nice implications once you have this:

  • If $X= \{ x_1, \dots, x_n\}$ is finite then $\operatorname{Set}(X,V) \simeq \bigoplus\limits_{i=1}^n V$ if the students learned the direct sum. In my experience I just use that when $V = \mathbb{R}$ then $\operatorname{Set}(X,V) \simeq \mathbb{R}^n$.
  • If $X= \{ x_1, \dots, x_n\}$ is finite then there is a natural basis set given by the injective function $X \hookrightarrow \operatorname{Set}(X,\mathbb{R})$ where $x$ gets sent to the function $f(x')$ is $0$ if $x' \ne x$ and $1$ if $x' = x$.
  • If $X = \mathbb{N}$ then $\operatorname{Set}(X,V)$ is the set of vector valued sequences, and once again with $V = \mathbb{R}$ these are the sequences from Calculus/Analysis.
  • If $X = U$ is a vector space then the set of linear maps $\mathcal{L}(U,V)$ is a subspace of $\operatorname{Set}(U,V)$, and of course is isomorphic to $\operatorname{Mat}_{n \times n}$.
  • If $X =V= \mathbb{R}$ then we have an infinite chain of subspaces, $$ \operatorname{Set}(X,V) \supset C^0(\mathbb{R}) \supset C^1(\mathbb{R}) \supset \dots \supset C^n(\mathbb{R}) \supset \dots \supset C^{\infty}(\mathbb{R})$$ where $C^n(\mathbb{R})$ are the real valued functions whose $n$-th derivative is continuous.

And so on... Anyway, of course if I have a set function $X \xrightarrow{f} Y$, those comfortable with category theory know that I have a linear map $\operatorname{Set}(X,V) \xleftarrow{L_f} \operatorname{Set}(Y,V)$ given by a function $Y \xrightarrow{g} V$ gets assigned the composition $L_f(g)= (X \xrightarrow{f} Y \xrightarrow{g} V)$. So this is a nice way to show that you have a functor: $\operatorname{Set} \to \operatorname{Vect}$.

Similarly, we can explore the relationships of the free functor $$\mathbb{R}^{(X)} = \{ f \in \operatorname{Set}(X,\mathbb{R}) \mid f(x) \ne 0 \text{ for finitely many } x\}$$ as a subspace of $\operatorname{Set}\operatorname{Set}(X,\mathbb{R})$ and also how it provides a functor similar to the above but now $\operatorname{Set}^\mathrm{op} \to \operatorname{Vect}$. This functor is essentially the categorical version of change of basis.

I have lots more places I like to sneak these things in but hopefully that was the sort of answer you were looking for!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.