# Appearance of Formal Derivative in Algebra

When studying polynomials, I know it is useful to introduce the concept of a formal derivative. For example, over a field, a polynomial has no repeated roots iff it and its formal derivative are coprime. My question is, should we be surprised to see the formal derivative here?

Is there some way we can make sense of the appearance of the derivative (which to me is an analytic object) in algebra? I suspect it might have something to do with the fact that the derivative is linear and satisfies the product rule, which makes it a useful object to consider. It would also be interesting to hear an explanation which explains this in the context of algebraic geometry.

Thanks!

• Isn't this "For example, over a field, a polynomial has no repeated roots iff it and its formal derivative are coprime" reason enough? Commented Feb 18, 2013 at 21:14
• I agree that this fact gives us a reason to study the formal derivative, but the first time I saw it I was very surprised. I want to know if there's a deeper reason the derivative is showing up, or if it is just a useful operation that happens to do something nice. Do be more clear, what I am hoping for in an answer to this question is a fact or perspective which will make me say, "Oh, that's why the derivative is showing up." Or, "Wow, that's a cool way to think of the derivative in this context." Hope that helps. Commented Feb 18, 2013 at 21:23
• I once had the pleasure of hearing Abhyankar talk at a conference. He said something to the effect that his favorite derivative of a polynomial (?) $f(x)$ is $[f(x)-f(y)]/(x-y)$. "Because it always exists". Then on he went to talk about using that to prove higher order transitivity of Galois groups ending up giving the attendants the problem of realizing Mathieu-24 as a Galois group of an extension of function fields. A wonderful lecturer - the people I look up to were shaking their heads in awe. R.I.P. Commented Feb 18, 2013 at 21:50
• +1 I appreciate the question's interest in getting to the bottom of things. Commented Feb 18, 2013 at 22:04
• "over a field, a polynomial has no repeated roots iff it and its formal derivative are coprime" Shouldn't it be "has no repeated factor" ? (or assume the field algebraically closed) (I'm thinking of (X^2+1)^2) Commented Nov 28, 2020 at 12:28

Rather than being a deep surprise, the formal derivative is somewhat closer to being a triviality that is easy to overlook!

For example, the MacLaurin series for a polynomial:

$$f(x) = \sum_{i=0}^\infty f_i\: x^i$$

is simply writing out $f(x)$ in the usual fashion as the sum of its terms. It's also clear that every polynomial has a finite Taylor series around any point:

$$f(x) = \sum_{i=0}^\infty c_i \: (x-a)^i$$

and we can consider all points at once by letting $a$ be a variable. Then the coefficients are now functions of $a$:

$$f(x) = \sum_{i=0}^\infty c_i(a) \: (x-a)^i$$

in fact, it's easy to work out that they are polynomials in $a$. Going back to the original example, it's now clear that those $a$ such that $f(x)$ has a double root at $a$ are precisely the roots of $\gcd(c_0(x), c_1(x))$.

Of course, we know that $c_0(a) = f(a)$ and $c_1(a) = f'(a)$ and so forth; the derivatives of $f$ can effectively by defined by this equation. In fact, a common algebraic definition of the formal derivative is that it is the unique polynomial such that

$$f(x + \epsilon) = f(x) + \epsilon f'(x) \pmod{\epsilon^2}$$

where we consider $\epsilon$ a variable. The ring $F[\epsilon] / \epsilon^2$, incidentally, is called the ring of dual numbers.

This should look an awful lot like asymptotic notation for the first-order behavior of $f$ at $0$....

A posteriori we know that this point of view turns out to be extremely fruitful (not just in analysis, but even purely algebraically), and pushed to even greater extremes -- e.g. formal power series rings. And it generalizes to rings other than $F[x]$ where we consider things modulo powers of an ideal, which in turn leads to things like the $p$-adic numbers.

But without this knowledge, one might look at all I've said above, and think that all I've done is take a simple thing and make things complicated.

One might even be so bold to argue that the derivative is actually more of an algebraic idea that has been fruitfully generalized to the study of analytic objects rather than the other way around.

There was a tag, so this idea by Conor McBride might be of interest to you.

To put it shortly, you can find a meaning for formal derivative in discrete part of mathematics.

Introduction.

Let $A$, $B$, $C$, etc. be some types, and then $A\times B$ be the product type and $A + B$ be the coproduct. Moreover, let $B^A$ be the type of functions from $A$ to $B$. (To gain some intuition, you can think of $A$, $B$, etc., as subsets of some universe $U$, $A\times B$ would be then the Cartesian product and $A + B$ would be the disjoint union.)

Observe, that $|A+B| = |A| + |B|$, $|A\times B| = |A|\cdot|B|$, and $|B^A| = |B|^{|A|}$. Denote as

• $\mathbf{0}$, the uninhibited type (something like an empty set),
• $\mathbf{1}$, a type with one element (something like a singleton),
• $\mathbf{2}$, a type with two elements,
• etc.

Then, $|A\times A| = |A^\mathbf{2}|$, and of course there is an isomorphism between pairs of type $A$ and functions $\mathbf{2} \to A$ (indeed application of the first element of $\mathbf{2}$ would be a $\pi_1$ projection). Many more identities are working, e.g. distributive law

$$(A+B)\times C \equiv A\times C + B \times C,$$

and the well-known law of exponentiation becomes the Currying operation

$$(A^B)^C \equiv A^{B\times C}.$$

Data structures.

Data structures are functions on types. An example of non-trivial data structure is the list. It can be defined recursively as

$$L[X] = \mathbf{1} + X \times L[X], \tag{1}$$

that is, the list is an empty list or it contains the head (which is of the parameter type) and the tail (which is again, a list). Solving $(1)$ for $L[X]$ we get that

$L[X] \equiv \frac{\mathbf{1}}{\mathbf{1}-X} = \mathbf{1} + X + X^2 + X^3 + \ldots$.

In other words, the list is isomorphic to a type that is a singleton, or a 1-tuple, or 2-tuple, etc. Please note, that my description is rather informal, however, it would take ages to introduce proper definitions.

Formal derivative.

Now, the surprise: the formal derivation is similar to removing an element form the data structure in question (which is represented by some function).

For example, $(A^3)' \equiv 3\times A^2$, i.e. if we remove one $A$ from 3-tuple we get a 2-tuple and an indicator, where the element was taken from (there were three places possible).

$$L'[A] \equiv \left(\frac{1}{1-A}\right)' \equiv \left(\frac{1}{1-A}\right)^2 \equiv L[A]\times L[A],$$

in other words, a list without an element becomes two lists, that is the elements before the taken, and the rest, after the taken. The usual laws also work, e.g.

$$\left(F[G[X]]\right)' \equiv F'[G[X]]\times G'[X],$$ that is, if we want to remove $X$ from a nested structure $F[G[X]]$, the we need first to remove some $G[X]$ from $F$, and then from this $G[X]$ remove $X$.

Finally, the Taylor expansion also works, however, I will leave out the interpretation as to not spoil all the fun ;-)

$$F[X+Y] \equiv F[X] + F'[X]\times Y + F''[X]\times \frac{Y^2}{2} + F'''[X]\times\frac{Y^3}{3!} + \ldots$$

I hope I made you curious ;-)

• Wow, wasn't expecting something like this. Awesome! Commented Feb 18, 2013 at 22:53
• Surely this should also mention the theory of combinatorial species of A. Joyal!
– Pedro
Commented Jan 13, 2021 at 17:59

The formal derivative in a polynomial ring is just one example of a more general concept called a derivation. More explicitly, if $R, S$ are rings with $S$ an $R$ algebra, and $d : R \rightarrow S$ is a map which satisfies:

1) $d(a + b) = d(a) + d(b)$

2) $d(ab) = a d(b) + b d(a)$

Then $d$ is called a derivation. That formal derivative in a polynomial ring is just one example of a derivation, but there are many derivations that pop up all over the place in algebra and geometry.

In the general context of algebra, there is a big theory called differential galois theory, which studies differential field extensions (extensions of fields which have a derivation, such as $\mathbb{C}(x)$ for example).

In differential geometry, a smooth manifold has a derivation on its set of real-valued smooth functions $C^\infty(M)$, which is basically the usual derivative. The target of this derivation is not the set of functions, but the set of differential 1-forms $\Lambda^1(M)$.

These are just a couple of example, but derivations are important because of their algebraic properties, and because derivations show up naturally in many branches of mathematics. I can't speak for Algebraic Geometry, but I believe derivations play an important role in that theory as well.

• Is the derivative the only interesting derivation in polynomial rings? Commented Feb 18, 2013 at 21:26
• @DylanYott: Well, in one variable yes there is essentially only one derivation on a polynomial ring up to a multiplicative factor. You can prove this inductively using the product/addition rule. In several variables the set of derivations is a free $R$ module generated by the various partial derivatives. Commented Feb 18, 2013 at 21:32

One other place where it comes up is in the theory of formal languages. I believe it was Janusz Brzozowski who first noticed that regular expressions (in particular) have a useful derivative.

If you know anything about regular expressions, then the following will make sense, otherwise it won't. Nonetheless, here it is: A regular expression is an idempotent semi-ring with an additional operation called the Kleene star.

Intuitively, a regular expression represents a set of words over some alphabet. $0$ is the empty set, $1$ is a singleton set containing the zero-length word, multiplication is word concatenation, and addition is set union. The Kleene star represents a certain kind of iteration. Intuitively:

$$A^* = 1 + A + A^2 + A^3 + \cdots$$

It's possible to define this in terms of simple equality axioms, but we're not going to do that here.

So we have an idempotent semiring (idempotent because $A + A = A$), plus the Kleene star. The Kleene star plays the role of $e^x$ (if this seems weird, think of the power series of $e^x$, plus the fact that addition is idempotent). The letters in the underlying alphabet behave like variables. In particular, we can define evaluation at zero:

$$a(0) = 0$$ $$(AB)(0) = A(0) B(0)$$ $$(A+B)(0) = A(0) + B(0)$$ $$A^*(0) = 1$$

Given a regular expression $E$, $E(0)$ is either $0$ or $1$. It is $1$ if the empty string is a member of $E$, and $0$ otherwise.

We can also define a derivative:

$$\frac{\partial a}{\partial a} = 1$$ $$\frac{\partial b}{\partial a} = 0$$ $$\frac{\partial (A+B)}{\partial a} = \frac{\partial A}{\partial a} + \frac{\partial B}{\partial a}$$ $$\frac{\partial AB}{\partial a} = A(0) \frac{\partial B}{\partial a} + \frac{\partial A}{\partial a} B$$ $$\frac{\partial A^*}{\partial a} = \frac{\partial A}{\partial a} A^*$$

The only odd rule here is the one for multiplication. It's almost like the familiar product rule; the difference is due to the fact that concatenation is non-commutative.

What the derivative intuitively means is that $\frac{\partial E}{\partial a}$ is the set of strings in $E$ which start with the symbol $a$, but with that $a$ removed. So $a \frac{\partial E}{\partial a}$ is the set of strings in $E$ which start with $a$.

Thinking about it for a moment, if ${a\ldots z}$ is the alphabet, then:

$$E = E(0) + a \frac{\partial E}{\partial a} + b \frac{\partial E}{\partial b} + \cdots + z \frac{\partial E}{\partial z}$$

This is Taylor's theorem, only for regular languages. Moreover, it is also a rule for creating DFAs directly from regular expressions! $E(0)$ is $1$ if and only if the initial state is a final state, and the other terms are the transitions.

One remarkable thing about this is that the familiar regular expression operators (plus some less familiar ones, such as set intersection and set difference) are completely determined by their derivatives, plus their evaluation at zero. This is what we'd expect from the fundamental theorem of calculus, but it's interesting to see it here too.

Incidentally, this theory scales up to context-free and recursive languages too, but you need a bit more machinery for that which I won't go into here.

Your observation is absolutely correct. A derivation over a commutative algebra $A$, i.e. a linear map $D\colon A\to A$ such that $D(ab)=aD(b)+D(a)b$ has all these useful properties. For example, we have $D(f^2)=2fD(f)$ and $D(f^2g)=f\cdot(fD(g)+2D(f)g)$, hence the rule about repeated roots (at least in one direction).

You are correct that derivations are important because they are linear and obey the product rule. In noncommutative algebra and physics one has interesting rings such as $A_n={\mathbb R}\left[x_1,\cdots ,x_n ;{\partial \over \partial x_1},\cdots,{\partial \over \partial x_n }\right]$ form an interesting class of simple noncommutative rings and in the case $n=1$ it is the well-studied Weyl differential algebra $\cong F\left<x,y\right>\left/<yx-xy=1>\right.$ where $F$ is a field and $F\left<x,y\right>$ the free algebra in noncommutating indeterminants with $x$ operating on $F[x]$ by multiplication and y operating on $F[x]$ by differentiation.

The best way to get an answer to your question is to go to Wikipedia and look up derivation (abstract algebra). They mention some commutative algebra use there.

Differential algebra is simply an abstraction of the analytic case, abstracting out the derivative as a linear operator satisfying the derivative product rule (a derivation). That many results carry over into the algebraic realm shows that their essence is purely algebraic - independent of any analytic considerations. This is true not only for simple results like the derivative test for multiple roots, but also for broad theories like integration in finite terms, and nonlinear analogs (differential Galois theory), which is used by many computer algebra systems as the theory behind algorithms for computing integrals and solving differential equations. Ditto for the seeemingly more analytic study of asymptotic of solutions of differential equations, which has also been effectively algebraically abstracted via differential valuations and associated objects, e.g. look up Hardy-Rosoenlicht fields and transseries.

Formal derivatives appear naturally when trying to rewrite a polynomial in $$x$$ ( over a characteristic $$0$$ field ) as a polynomial in $$(x-c)$$ :

Let $$f(x) = a_n x^n + \ldots + a_1 x + a_0 \in K[x]$$ ( with $$a_n \neq 0$$ ). Given any $$c \in K$$, we can expand $$f(x)$$ as a polynomial in $$(x-c)$$ to get $$\displaystyle f(x) = \sum_{j=0}^{n} a_j x^j = \sum_{j=0}^{n} a_j (x-c+c)^j$$ $$\displaystyle = \sum_{j=0}^{n} a_j \bigg( \sum_{r = 0}^{j} \binom{j}{r} (x-c)^{r} c^{j-r} \bigg)$$ $$\displaystyle = \sum_{0 \leq r \leq j \leq n} (x-c)^{r} a_j \binom{j}{r}c^{j-r}$$ $$\displaystyle = \sum_{r=0}^{n} (x-c)^{r} \bigg( \sum_{j=r}^{n} a_j \binom{j}{r}c^{j-r} \bigg)$$

$$\big[$$ Here "$$\binom{j}{r}$$" should be understood as $$1 + \ldots + 1$$ with $$\frac{j(j-1)..(j-(r-1))}{r!}$$ many $$1$$s $$\big]$$

Now assuming $$\text{char}(K) = 0$$ we can write $$\binom{j}{r} = (r!)^{-1} ( j(j-1)..(j-r+1) )$$ [ where again each term "$$n$$" should be understood as $$1 + \ldots + 1$$ with $$n$$ many $$1$$s ], giving us
$$f(x) \displaystyle = \sum_{r=0}^{n} \frac{(x-c)^{r}}{r!} \bigg( \sum_{j=r}^{n} a_j \: j(j-1)\ldots(j-(r-1)) \: c^{j-r} \bigg)$$.

But $$\displaystyle \sum_{j=r}^{n} a_j \: j(j-1)\ldots(j-(r-1)) \: c^{j-r}$$ is just $$(D^{r} f)(c)$$, where $$D : K[x] \rightarrow K[x]$$ is a map sending $$c_0 + c_1 x + c_2 x^2 + \ldots + c_n x^n$$ $$\mapsto c_1 + 2 c_2 x + \ldots + n c_n x^{n-1}$$.

To summarise : Let $$f(x) = a_0 + \ldots + a_n x^n \in K[x]$$, $$c \in K$$, and $$\text{char}(K) = 0$$. Then $$f(x) = f(c) + (Df)(c) \: (x-c)$$ $$+ \frac{(D^2 f)(c)}{2!} \: (x-c)^2 + \ldots + \frac{(D^n f)(c)}{n!} \: (x-c)^n$$, where $$D : K[x] \rightarrow K[x]$$ sends $$c_0 + c_1 x + \ldots + c_n x^n$$ $$\mapsto c_1 + 2 c_2 x + \ldots + n c_n x^{n-1}$$ [ especially if $$\alpha \in K$$ is a root of $$f$$, it's multiplicity is the least $$j$$ for which $$(D^j f)( \alpha ) \neq 0$$ ].

Edit: [This should work in general characteristic]

For every $$f \in K[x]$$ there is a unique $$\psi _f \in K[x,y]$$ such that $$f(y) - f(x) = (y-x) \psi _f (x,y).$$

Explicitly, taking $$f(x) = \sum _{0} ^{n} a _i x ^i,$$ we get $$f(y) - f(x)$$ $${= \sum _{0} ^{n} a _i (y ^i - x ^i)}$$ $${= (y-x) \left( \sum _{1} ^{n} a _i (y ^{i-1} + y ^{i-2} x + \ldots + x ^{i-2} y + x ^{i-1}) \right).}$$

Now $$K[x] \longrightarrow K[x,y]$$ sending $$f(x) \mapsto \psi _f (x,y)$$ is linear.

$$f(y) - f(x) = (y-x) \psi _f,$$ and $$g(y) - g(x) = (y-x) \psi _g.$$ Taking $${\alpha \cdot (\text{eq}1) + \beta \cdot (\text{eq}2)}$$ gives $$\psi _{\alpha f + \beta g} = \alpha \psi _f + \beta \psi _g.$$

Also $$\psi _{fg} = \psi _f g + f \psi _g + (y-x) \psi _f \psi _g$$.

$$(fg)(y)$$ $${= (f(x) + (y-x) \psi _f)(g(x) + (y-x) \psi _g)}$$ $${ = (fg)(x) + (y-x)(\psi _f g+ f \psi _g + (y-x) \psi _f \psi _g)}$$

So the map $$K[x] \overset{D}{\longrightarrow} K[x]$$ sending $$f(x) \mapsto \psi _f (x,x)$$ is linear, with "Leibnitz rule" $$D(fg) = (Df)g + f(Dg).$$ From the expression for $$\psi _f$$ we get the explicit description $$D\left( \sum a _i x ^i \right) = \left(\sum i a _{i} x ^{i-1} \right).$$