Counting Nilpotents
Posted by Tom Leinster
What is the probability that a random linear operator is nilpotent?
Recall that a linear operator on a vector space is called “nilpotent” if for some . Assuming that is finite-dimensional and over a finite field, there are only finitely many operators on . Choose one at random. It turns out that the probability of it being nilpotent is
— the reciprocal of the number of elements of .
I’ll explain why. Along the way, we’ll meet some dynamical linear algebra, some -formalism, and a kind of generating function adapted to linear algebra over a finite field.
This post was inspired by John’s recent series on random permutations, but is free-standing and self-contained. Enjoy!
Dynamical linear algebra
I have a soft spot for what I call “dynamical linear algebra”: studying linear operators by looking at what happens when you iterate them a large number of times. Since a nilpotent operator is one which becomes trivial when iterated a large number of times, we’re squarely in the context of dynamical linear algebra.
Let be a vector space, which in this post will always mean “finite-dimensional vector space”. For the moment, the base field can be absolutely anything. The first significant result in dynamical linear algebra is that
every operator decomposes uniquely as the direct sum of an automorphism and a nilpotent.
If you know the (much more complicated) Jordan normal form theorem then you almost already know this, at least for algebraically closed fields: think about the subspace corresponding to the Jordan -blocks and the subspace corresponding to all the other Jordan blocks. But what the Jordan theorem doesn’t tell you — at least, as it’s usually stated — is that this decomposition is unique.
Anyway, this result is far simpler than the Jordan normal form theorem, and it works like this. Let be a linear operator on . The eventual image and eventual kernel of are the subspaces defined by
It’s a pleasant exercise to show the following basic facts:
;
restricts to an automorphism of ;
restricts to a nilpotent operator on .
And that’s the decomposition of an arbitrary operator into an automorphism and a nilpotent. With a little extra work, you can prove it’s the only such decomposition.
It follows that the set of endomorphisms of (i.e. operators on ) can itself be decomposed in a canonical way:
where the disjoint union is over all pairs of complementary subspaces of , and I’m writing and for the sets of automorphisms of and nilpotent operators on , respectively.
Anyone familiar with species will now be itching to rephrase that isomorphism… but I’ll leave that to you, and instead move on to counting.
-formalism
Our initial question — what’s the probability that a random operator is nilpotent? — is a counting problem for finite vector spaces. It’s “linear combinatorics”. So let’s warm up to it with some much simpler counting problems for finite vector spaces, keeping in mind throughout the analogous problems for finite sets (“ordinary combinatorics”).
As ever, let be a vector space. We’re still assuming that all vector spaces are finite-dimensional, and from now on we’ll also assume that the base field is finite, with elements. I’ll write for the field itself.
One of the most basic facts in ordinary combinatorics is that there are total orders on an -element set. The analogous question in linear algebra is: how many totally ordered bases are there for an -dimensional space?
Let’s write for the answer. The first basis element can be anything except , so there are ways of choosing it. The second basis element can be anything that isn’t in the span of the first, so there are ways of choosing it. Continuing in this way, we get
Now here’s a useful observation which at the moment I only understand as a little algebraic trick, but which I’d like to understand conceptually — maybe someone can help me here. Trivially,
Now here’s the trick: reverse the order of the powers of , to give
It follows that if we define
then
Equivalently, the sequence is defined by and .
Let’s use this formalism to answer another basic question about the combinatorics of finite vector spaces: given , how many ways are there of expressing a given -dimensional space as the direct sum of a -dimensional subspace and an -dimensional subspace ?
The analogous question for sets is “how many ways are there of expressing a given -element set as the disjoint union of a -element subset and an -element subset”, to which the answer is . So let’s write
for the number of pairs of subspaces of such that and (and, therefore, ).
To discover what actually is, we compute in two ways the number of such pairs together with an ordered basis of and an ordered basis of . On the one hand, by what we’ve just shown about ordered bases, it’s
On the other, it’s the same as the number of ordered bases of itself, which is . Comparing the two methods, we’ve got our answer:
That’s the number of direct sum decompositions of an -dimensional vector space over into subspaces of dimensions and .
Digression With this kind of stuff, interesting things sometimes happen when you substitute . For example, hence from which it follows that Of course, there is no field of order , but this is part of the lore of the “field with one element”: a vector space over the field with one element is supposed to be something like a set.
The number of nilpotents
We’re now ready to count the number of nilpotents on a vector space.
Let be an -dimensional vector space over . Earlier, we showed that
Taking cardinalities on each side, and writing for the number of endomorphisms of an -dimensional space, and similarly and , this implies that
where the sum is over all pairs such that . There are such pairs in which , so
By the explicit expression for , this says that
or equivalently
If you’re familiar with generating functions, you’ll recognize that now is the time to bring them into play! But what we need are not ordinary generating functions (which are adapted to finite totally ordered sets), or exponential generating functions (which are adapted to finite unordered sets), but what might be called “-exponential generating functions”, adapted to finite-dimensional vector spaces over . Specifically, the last equation gives an equality
of formal power series. This equation is going to lead us to the value of , which is our goal.
The first step is to find , which by definition is the number of automorphisms of an -dimensional vector space over . This is sort of trivial, but I want to make a song and dance about it for categorical reasons. If we fix (arbitrarily) an ordered basis of then applying any automorphism to it yields another ordered basis, and every ordered basis arises uniquely in this way. Thus, is the same as the number of ordered bases of , which is .
That’s the answer, but the important point is that there’s no natural bijection between ordered bases and automorphisms. It’s exactly like the situation for finite sets, where the number of (total) orders on an abstract set is equal to the number of permutations, but there’s no canonical bijection between orders and permutations. (Because if there was, which order would correspond to the identity permutation?) Abstractly, what we’ve got in both situations is a “torsor”: a group (automorphisms or permutations) that acts freely and transitively on a nonempty set (the ordered bases or orders). The group and the set are then in bijection, but not canonically so.
In any case, , so the generating function of is very simple:
Hence
After a couple of lines of algebra, taking advantage of the equality , this gives and
(). But the number of endomorphisms is also easy to compute! By the universal property of bases, a linear map from a vector space to itself amounts to a map of sets from any given basis to the space. In the case of , there are elements in a basis and elements in the space, so
Substituting this into the expression for and simplifying gives the answer:
And that’s the number of nilpotents on an -dimensional vector space over the field with elements.
The original question I asked was: what’s the probability that a randomly-chosen linear operator on is nilpotent? We’ve just shown that there are such operators, and when I say “randomly-chosen” I mean chosen uniformly at random: all the operators get an equal chance. So the answer to that question is
We’re done!
The final answer is almost suspiciously simple. It’s not a surprise that the generating function method works, but a fair amount of lucky cancellation happened towards the end, leading to an answer that’s simpler than we had a right to expect. This suggests that there should be a better proof, revealing why that simple answer is what it is.
I have an idea about how such a proof might look, roughly. But I’m out of energy now, so let me save that for another day.
Re: Counting Nilpotents
What a great proof of an enigmatically easy-to-state fact! I wonder if the probability that the eventual image is -dimensional has a similarly simple formula for values of other than .
Other thoughts: how far can we push an analogy between cycles of a random permutation and Jordan blocks of a linear transformation (or blocks in rational canonical form)? For matrices, we end up with a partition of into block sizes, but with extra data on each block (such as whether the block is nilpotent or invertible).