Last time I defined weak Hopf algebras, and claimed that they have groupoid-like structure. Today I’ll make that claim more precise by defining the *groupoid algebra* of a finite groupoid and showing that it has a natural weak Hopf algebra structure. In fact, we’ll get a functor from finite groupoids to weak Hopf algebras.

First, recall how the group algebra works. If G is a group, its group algebra is simply the vector space spanned by elements of G, and with multiplication extended linearly from G to this vector space. It is an associative algebra and has a unit, the identity element of the group.

If G is a groupoid, we can similarly form the groupoid algebra. This may seem strange at first: you might expect to get only an algebr*oid* of some sort. In particular, whereas for the *group* algebra we get the multiplication by linearly extending the group multiplication, a *groupoid* has only a partially defined “multiplication”—if the source of *g* differs from the target of *h*, then the composite *gh* is undefined.

However, upon “linearizing”, instead of saying *gh* is undefined, we can simply say it’s *zero* unless *s(g)=t(h)*. This is essentially all there is to the groupoid algebra. The** groupoid algebra** of a groupoid is the vector space with basis the morphisms of , with multiplication given on this basis by composition whenever this is defined, zero when undefined, and extended linearly from there.

It’s easy to see that this gives an associative algebra: the multiplication is linear since we define it on a basis and extend linearly, and it’s associative since the group multiplication is. It is a *unital* algebra if and only if the groupoid has finitely many objects, and in this case the unit is the sum of all of the identity morphisms.

Mainly to avoid saying “groupoids with finitely many morphisms”, I’ll just stick to finite groupoids from now on, where the sets of objects *and* morphisms are both finite.

If we have a groupoid homomorphism, then we get an algebra homomorphism between the corresponding groupoid algebras, also by linear extension. So we get a functor

from the category of finite groupoids to the category of unital algebras.

But in fact, this extends *canonically* to a functor

from the category of finite groupoids to the category of weak Hopf algebras.

To see how this works, notice first that there’s a canonical functor

from the category of sets to the category of coalgebras: Every set is a comonoid in a unique way, so we just linearly extend that comonoid structure to a coalgebra.

In case that’s not clear to you, here’s what I mean in detail. Given a set , there is a unique map that is coassociative, namely the diagonal map . This is easy to prove, so do it if you never have. Also, there is a unique map to the one-element set , up the choice of which one-element set to use. Linearly extending and , they become a coalgebra structure on the vector space with basis . Moreover, any function between sets is a homomorphism of comonoids, and its linear extension to the free vector spaces on these sets is thus a homomorphism of coalgebras. This gives us our functor from sets to coalgebras.

So, given a finite groupoid, the vector space spanned by its morphisms becomes both an algebra and a coalgebra. An obvious question is: do the algebra and coalgebra structure obey some sort of compatibility relations? The answer, as I already gave away at the beginning, is that they form a **weak Hopf algebra**. The antipode is just the linear extension of the inversion map .

(More generally, for those who care, the category algebra of a finite category (or any category with finitely many objects) is a weak bialgebra, and we actually get a functor

from finite categories to weak bialgebras. If happens to be a groupoid, is a weak Hopf algebra; if it happens to be a monoid, is a bialgebra; and if it happens to be a group, is a Hopf algebra. )

This is nice, but have we squashed out all of the lovely “oid”-iness from our groupoid when we form the groupoid algebra? In other words, having built a weak Hopf algebra on the vector space spanned by morphisms, is there any remnant of the original distinction between objects and morphisms?

As I indicated last time, the key is in these two “loop” diagrams:

The left loop says to comultiply the identity, multiply the first part of this with an element and apply the counit. Let’s do this for a groupoid algebra, where , where the sum runs over all objects . Since comultiplication duplicates basis elements, we get

We then get:

using the definition of multiplication and the counit in the groupoid algebra. Similarly, the loop going in the other direction gives , as anticipated last time.

So, we can see that the image of either of the two “loop” diagrams is the subspace spanned by the identity morphisms. This is a commutative subalgebra of the groupoid algebra, and these maps are both idempotent algebra homomorphisms. So, they give “projections” onto the “algebra of objects”.

In fact, something like this happens in the case of a more general weak Hopf algebra. The maps described by the “loop” diagrams, are again idempotent homomorphisms and we can think of them as analogs of the source and target maps. But there are some differences, too. For instance, their images need not be the same in general, though they are isomorphic. The images also don’t need to be commutative. This starts hinting at what Hopf algebroids are like.

But I’ll get into that later.