Calculus and Category theory

Your question for the derivative of a function $f$ with respect to a function $g$ is answered in the comments: $\frac{df}{dg}=f'(g(x))\cdot g'(x)$.

As for the categorical approach, I'll try to indicate some inherent problems with categorifying the notions of limits and derivatives from analysis.

When you define something in a category, you are defining a concept that is sensitive to all of the morphisms in the category. The more category theoretic way of phrasing this is of course the notion of universality, which is everywhere in category theory.

However, a limit of a function at a point, or the derivative of a function at a point is a notion that is very local. You can change the function's values everywhere out of a tiny little neighborhood of the point, and the local behaviour of the function at that point does not change.

Thus, there is some tension here between the categorical philosophy where everything is global and highly sensitive to the other morphisms in the category, and the analytical notions of locality.

Having said that, there are some things that can (sort of) be categorified. There is Lawvere's work on generalized metric spaces which shows that quite a lot of metric space theory can be seen as enriched category theory. In particular, the notion of weighted (co)limits does related to an analytical notion of limit but not quite the ordinary one. Completion of metric spaces has been categorified, but here too the categorified notion is not quite the same as the analytic metric one.


To answer the part of your question about a categorical point of view of calculus, Bill Lawvere developed an axiomatization of differential geometry in a smooth topos, which unifies many operations in both differential geometry (hence classical calculus) and algebraic geometry. This beautiful theory is called synthetic differential geometry, and is in many ways much simpler than the usual approach to calculus via limits.

In synthetic differential geometry the total derivative is the internal hom functor $(-)^D$, where $D := \{ d \in R : d^2 = 0\}$ is the "walking tangent vector". Here, $R$ is the line object in the smooth topos, which is like the classical real line but augmented with nilpotent elements.

To be more precise the above definition is an axiomatization of the tangent functor from classical differential geometry, so unlike the single-variable classical calculus derivative (which is a special case of the exterior derivative or Darboux derivative) it keeps track of the base points in the space. The classical derivative of a map between vector spaces can be obtained from the tangent map by projecting to the typical fibre of the tangent bundle, which is trivial in this case.

I apologize if this is a bit over your head, but check out John Bell's A Primer of Infinitesimal Analysis for an undergrad-level introduction, or Anders Kock's freely available text for a slightly more advanced but more comprehensive introduction.


A couple of days ago I came across a paper that marginally relates to the topic in this question, so I thought it would be useful to cite it here. Yes, I realize this paper has little to do with the specific question asked above, but I think it is likely that someone looking in math StackExchange for what this paper covers would be led to this question.

Giampaolo Cicogna, A method from categories for introducing a general notion of convergence and limit, Journal of Mathematical Analysis and Applications 76 #1 (July 1980), 476-482. MR 81k:18002 Zbl 441.18006

The Introduction to the paper follows.

This paper does not contain, properly, any "new theorem." Rather, it wants to propose an abstract construction, essentially of algebraic nature, which provides a sort of "axiomatization" of some classical topics of Mathematical Analysis, as well as possibly a convenient frame for understanding and generalizing some "global" properties of them.

This general construction is obtained by using a typical technique taken from Category theory: it is mainly given by (repeated) Kan extensions [6, 8] of suitable patterns of functors, as we shall describe in the next section. In the last section, we will test this scheme, by reexaminating [= reexamining] some key concepts of analysis, such as the notion of limit, of semicontinuous envelope, the various notions of convergence, including some more recent and refined ideas.