How many groups of order four are there? Technically, there are an enormous number, so much so, in fact, that the class of groups of order four is not even a set, but merely a proper class. This is because *any* four objects can be turned into a group by designating one of the four objects, say , to be the group identity, and imposing a suitable multiplication table (and inversion law) on the four elements in a manner that obeys the usual group axioms. Since all sets are themselves objects, the class of four-element groups is thus at least as large as the class of all sets, which by Russell’s paradox is known not to itself be a set (assuming the usual ZFC axioms of set theory).

A much better question is to ask how many groups of order four there are *up to isomorphism*, counting each isomorphism class of groups exactly once. Now, as one learns in undergraduate group theory classes, the answer is just “two”: the cyclic group and the Klein four-group .

More generally, given a class of objects and some equivalence relation on (which one should interpret as describing the property of two objects in being “isomorphic”), one can consider the number of objects in “up to isomorphism”, which is simply the cardinality of the collection of equivalence classes of . In the case where is finite, one can express this cardinality by the formula

thus one counts elements in , weighted by the reciprocal of the number of objects they are isomorphic to.

Example 1Let be the five-element set of integers between and . Let us say that two elements of are isomorphic if they have the same magnitude: . Then the quotient space consists of just three equivalence classes: , , and . Thus there are three objects in up to isomorphism, and the identity (1) is then justThus, to count elements in up to equivalence, the elements are given a weight of because they are each isomorphic to two elements in , while the element is given a weight of because it is isomorphic to just one element in (namely, itself).

Given a finite probability set , there is also a natural probability distribution on , namely the *uniform distribution*, according to which a random variable is set equal to any given element of with probability :

Given a notion of isomorphism on , one can then define the random equivalence class that the random element belongs to. But if the isomorphism classes are unequal in size, we now encounter a biasing effect: even if was drawn uniformly from , the equivalence class need not be uniformly distributed in . For instance, in the above example, if was drawn uniformly from , then the equivalence class will not be uniformly distributed in the three-element space , because it has a probability of being equal to the class or to the class , and only a probability of being equal to the class .

However, it is possible to remove this bias by changing the weighting in (1), and thus changing the notion of what cardinality means. To do this, we generalise the previous situation. Instead of considering sets with an equivalence relation to capture the notion of isomorphism, we instead consider groupoids, which are sets in which there are allowed to be *multiple* isomorphisms between elements in (and in particular, there are allowed to be multiple *automorphisms* from an element to itself). More precisely:

Definition 2A groupoid is a set (or proper class) , together with a (possibly empty) collection of “isomorphisms” between any pair of elements of , and a composition map from isomorphisms , to isomorphisms in for every , obeying the following group-like axioms:

- (Identity) For every , there is an identity isomorphism , such that for all and .
- (Associativity) If , , and for some , then .
- (Inverse) If for some , then there exists an inverse isomorphism such that and .
We say that two elements of a groupoid are

isomorphic, and write , if there is at least one isomorphism from to .

Example 3Any category gives a groupoid by taking to be the set (or class) of objects, and to be the collection of invertible morphisms from to . For instance, in the category of sets, would be the collection of bijections from to ; in the category of linear vector spaces over some given base field , would be the collection of invertible linear transformations from to ; and so forth.

Every set equipped with an equivalence relation can be turned into a groupoid by assigning precisely one isomorphism from to for any pair with , and no isomorphisms from to when , with the groupoid operations of identity, composition, and inverse defined in the only way possible consistent with the axioms. We will call this the *simply connected groupoid* associated with this equivalence relation. For instance, with as above, if we turn into a simply connected groupoid, there will be precisely one isomorphism from to , and also precisely one isomorphism from to , but no isomorphisms from to , , or .

However, one can also form multiply-connected groupoids in which there can be multiple isomorphisms from one element of to another. For instance, one can view as a space that is acted on by multiplication by the two-element group . This gives rise to two types of isomorphisms, an identity isomorphism from to for each , and a negation isomorphism from to for each ; in particular, there are *two* automorphisms of (i.e., isomorphisms from to itself), namely and , whereas the other four elements of only have a single automorphism (the identity isomorphism). One defines composition, identity, and inverse in this groupoid in the obvious fashion (using the group law of the two-element group ); for instance, we have .

For a finite multiply-connected groupoid, it turns out that the natural notion of “cardinality” (or as I prefer to call it, “cardinality up to isomorphism”) is given by the variant

of (1). That is to say, in the multiply connected case, the denominator is no longer the number of objects isomorphic to , but rather the number of *isomorphisms* from to other objects . Grouping together all summands coming from a single equivalence class in , we can also write this expression as

where is the automorphism group of , that is to say the group of isomorphisms from to itself. (Note that if belong to the same equivalence class , then the two groups and will be isomorphic and thus have the same cardinality, and so the above expression is well-defined.

For instance, if we take to be the simply connected groupoid on , then the number of elements of up to isomorphism is

exactly as before. If however we take the multiply connected groupoid on , in which has two automorphisms, the number of elements of up to isomorphism is now the smaller quantity

the equivalence class is now counted with weight rather than due to the two automorphisms on . Geometrically, one can think of this groupoid as being formed by taking the five-element set , and “folding it in half” around the fixed point , giving rise to two “full” quotient points and one “half” point . More generally, given a finite group acting on a finite set , and forming the associated multiply connected groupoid, the cardinality up to isomorphism of this groupoid will be , since each element of will have isomorphisms on it (whether they be to the same element , or to other elements of ).

The definition (2) can also make sense for some infinite groupoids; to my knowledge this was first explicitly done in this paper of Baez and Dolan. Consider for instance the category of finite sets, with isomorphisms given by bijections as in Example 3. Every finite set is isomorphic to for some natural number , so the equivalence classes of may be indexed by the natural numbers. The automorphism group of has order , so the cardinality of up to isomorphism is

(This fact is sometimes loosely stated as “the number of finite sets is “, but I view this statement as somewhat misleading if the qualifier “up to isomorphism” is not added.) Similarly, when one allows for multiple isomorphisms from a group to itself, the number of groups of order four up to isomorphism is now

because the cyclic group has two automorphisms, whereas the Klein four-group has six.

In the case that the cardinality of a groupoid up to isomorphism is finite and non-empty, one can now define the notion of a random isomorphism class in drawn “uniformly up to isomorphism”, by requiring the probability of attaining any given isomorphism class to be

thus the probability of being isomorphic to a given element will be inversely proportional to the number of automorphisms that has. For instance, if we take to be the set with the simply connected groupoid, will be drawn uniformly from the three available equivalence classes , with a probability of attaining each; but if instead one uses the multiply connected groupoid coming from the action of , and draws uniformly up to isomorphism, then and will now be selected with probability each, and will be selected with probability . Thus this distribution has accounted for the bias mentioned previously: if a finite group acts on a finite space , and is drawn uniformly from , then now still be drawn uniformly up to isomorphism from , if we use the multiply connected groupoid coming from the action, rather than the simply connected groupoid coming from just the -orbit structure on .

Using the groupoid of finite sets, we see that a finite set chosen uniformly up to isomorphism will have a cardinality that is distributed according to the Poisson distribution of parameter , that is to say it will be of cardinality with probability .

One important source of groupoids are the fundamental groupoids of a manifold (one can also consider more general topological spaces than manifolds, but for simplicity we will restrict this discussion to the manifold case), in which the underlying space is simply , and the isomorphisms from to are the equivalence classes of paths from to up to homotopy; in particular, the automorphism group of any given point is just the fundamental group of at that base point. The equivalence class of a point in is then the connected component of in . The cardinality up to isomorphism of the fundamental groupoid is then

where is the collection of connected components of , and is the order of the fundamental group of . Thus, simply connected components of count for a full unit of cardinality, whereas multiply connected components (which can be viewed as quotients of their simply connected cover by their fundamental group) will count for a fractional unit of cardinality, inversely to the order of their fundamental group.

This notion of cardinality up to isomorphism of a groupoid behaves well with respect to various basic notions. For instance, suppose one has an -fold covering map of one finite groupoid by another . This means that is a functor that is surjective, with all preimages of cardinality , with the property that given any pair in the base space and any in the preimage of , every isomorphism has a unique lift from the given initial point (and some in the preimage of ). Then one can check that the cardinality up to isomorphism of is times the cardinality up to isomorphism of , which fits well with the geometric picture of as the -fold cover of . (For instance, if one covers a manifold with finite fundamental group by its universal cover, this is a -fold cover, the base has cardinality up to isomorphism, and the universal cover has cardinality one up to isomorphism.) Related to this, if one draws an equivalence class of uniformly up to isomorphism, then will be an equivalence class of drawn uniformly up to isomorphism also.

Indeed, one can show that this notion of cardinality up to isomorphism for groupoids is uniquely determined by a small number of axioms such as these (similar to the axioms that determine Euler characteristic); see this blog post of Qiaochu Yuan for details.

The probability distributions on isomorphism classes described by the above recipe seem to arise naturally in many applications. For instance, if one draws a profinite abelian group up to isomorphism at random in this fashion (so that each isomorphism class of a profinite abelian group occurs with probability inversely proportional to the number of automorphisms of this group), then the resulting distribution is known as the *Cohen-Lenstra distribution*, and seems to emerge as the natural asymptotic distribution of many randomly generated profinite abelian groups in number theory and combinatorics, such as the class groups of random quadratic fields; see this previous blog post for more discussion. For a simple combinatorial example, the set of fixed points of a random permutation on elements will have a cardinality that converges in distribution to the Poisson distribution of rate (as discussed in this previous post), thus we see that the fixed points of a large random permutation asymptotically are distributed uniformly up to isomorphism. I’ve been told that this notion of cardinality up to isomorphism is also particularly compatible with stacks (which are a good framework to describe such objects as moduli spaces of algebraic varieties up to isomorphism), though I am not sufficiently acquainted with this theory to say much more than this.

## 15 comments

Comments feed for this article

13 April, 2017 at 5:17 pm

AnonymousVery interesting! Thanks for sharing your insights! :-)

13 April, 2017 at 7:25 pm

Jesus OchoaIn the case of stacks, the notion of cardinality has been developed by Weinstein in https://arxiv.org/pdf/0809.2130.pdf, where it has been called te volume of a stack.

13 April, 2017 at 11:40 pm

Oscar CunninghamI was thinking about this just the other day. One nice thing that I noticed was that groupoid cardinality behaves nicely with respect to adding additional structure. For example suppose we try to calculate the cardinality of “groups equipped with a chosen element”. Obviously for each group G there will be one such structure up to isomorphism for each orbit of G under Aut(G). The structure (G,g) has size 1/|Aut(G,g)|, and by the orbit-stabilizer theorem this is equal to |G(g)| / |Aut(G)|.

So if we sum the cardinalities of all the structures with underlying group G we get |G| / |Aut(G)|. So despite the fact that we were counting everything up to isomorphism, we still get that there are |G| ways of picking an element from G!

14 April, 2017 at 2:28 am

RidderIn definition 2, I’m confused about the Identity part: The requirement that Id_y = f, for all f in Iso(x->y) and all x,y in X, it seems strange? Then Iso(x->y) is just {Id_Y}?

14 April, 2017 at 3:30 am

Azad TasanI think the second “=” was supposed to be another composition sign, that is f ( Id_x ) = Id_y( f ). Just my guess though.

[

Corrected, thanks -T.]14 April, 2017 at 10:10 am

AnonymousIn addition to the fix mentioned above (which you made), I think you still want the “=f” at the end (otherwise the identity maps can act like an idempotent projection). So the correct formula should have two equalities: f \circ id_X = id_Y \circ f = f.

[Corrected, thanks – T.]14 April, 2017 at 7:14 am

JohnIn the third paragraph the set of all y which are in the same equivalence class as x should read [x]= { y \in X : x~y } and not [x]= { y \in X : x~X }.

Great article!

[Corrected, thanks – T.]14 April, 2017 at 9:03 am

Romain ViguierThanks tao for that article (interestingly fascinating)

17 April, 2017 at 3:24 am

John MangualI think, even without resorting to functors or hodge theory, the exercise of counting can be rather difficult. We count various things: fish, sources of income, distance to work, etc. This discretization process varies from person to person, and task to task.

18 April, 2017 at 8:16 am

bfFor algebraic stacks wthere is a well-defined notion of Chow groups with rational coefficients since the paper of Vistoli in 1989; the counting you describe corresponds to the degree (pushforward to a point) of a discrete (smooth, zero dimensional) Deligne-Mumford algebraic stack.

19 April, 2017 at 11:47 am

Gil KalaiMaybe it is worth mentioning that in combinatorics counting according to isomorphism classes is a very important problem and Burnside lemma and Polya theory are quite crucial.

(On a lighter note the discussion of the number of groups of order four reminds me the discussion of the question: In how many ways you can chose a committee of three students from a class of ten students? )

24 April, 2017 at 2:10 am

Groups and Group Actions: Lecture 9 | Theorem of the week[…] Tao has just been writing on his blog about classifying objects up to […]

26 April, 2017 at 5:25 am

Sergei OfitserovDear Terence Tao! Your formula(1) irreproachable! There is elements of expected tasked put a question,meaning whats I can to explain. First, I right away pay attention to unknown divisor |X/~|,what have direct attitude to objects of ascent (raise) up to isomorphism. Secondly, |[x]| in double brackets – that x in closed space (lift in tower of Erdesh). So like, what I know, how liberate (to free) x from closed space. Thus, for a start we necessary to compose plan of operations (or what we necessary?) 1.Quantity groups. 2.Expansion groups. 3. Compress groups. It is possible, the fact that you get to know, perhaps shock or amazement. Secret in divisor! 1. If in |X/~| to put (under) numerical meanings, that which receive: for example X=2017 (this number we know), and ~ = 0,9999. If to make this operation of division on 16-digits calculator, then receive endless quantity groups 2017 2.If in X for example add 0, or X=20017, and in divisor add one 9, or ~ =0,99999, then receive endless quantity groups 20017. 3.If in X=2017 to remove 0, and in divisor to remove one 9, or X=217 and -~ = 0,999, then receive endless quantity groups 217. In all three cases concept of endlessness remain (intact). Thanks. Sergei.

26 May, 2017 at 4:17 am

Tan Wei ShingWhat a mumbo-jumbo calculation that really intriguing me! Math is definitely my love and passion, appreciate your insights!

1 June, 2017 at 12:49 am

Maths studentIt seems as though groupoid cardinality gives a framework for counting the number of “essentially different” objects of a given category. In fact, categories are defined by the axioms which are to be satisfied by the objects therein. Thus, one may define the notion of “categoricity” in terms of groupoid cardinality: A system of axioms is then categorical iff the cardinality of the corresponding category=groupoid up to isomorphism is one.

For the notion of categoricity see this paper by O. Veblen:

Click to access S0002-9947-1904-1500678-X.pdf