Left Cosets on Groups

I met Aryan Pahwani at the Hacktron AI x Secure Sips – Breaking & Building AI Meetup, who is really fucking chill, and yet very motivated and relentless. Check out his site by clicking on his name.

He asked me about left cosets on groups. I am terrible at explaining, and want to get better. This is a nice little self-contained blog/note. A little experience with proof-based math, sets, and functions is enough. Or, you can always raw-dog it and look up things along the way.


Note: I use the word function and map interchangeably, sometimes transform too. They all mean the same thing.

Whenever I write the product of two elements in a group gg as gGg, it is to emphasize that the product is using the operator of the group G.

gG is to be read as: g belongs to G, or g is in G.

When I put a (why?), I implore the reader to pause and think, to justify the statement preceding it.


Let G be a group. That means G is a set, and there is an operator on G that takes two elements and spits out a single element.

Imagine the elements of G as (weird) people. They act on other people, and when they do, they both change into a new person. for this analogy to work, its best think that no person gets deleted, and no duplicates are made, just free transformation. In particular, when g and h transform to gh, g and h are still there, and there still only one gh. It would have probably been better if I said that there is only one person, and his traits are all elements of G which are present at all times, but we can also think about two traits combining to jump to another trait in this fixed set of ever-present traits. I don't know, but I already wrote this out :).

A person g can act on another person h on the left: gh,
or on the right: hg. And moreover, action of people on people is symmetric—
in the sense that g acting on the left of h is the same as h acting on the right of g.
Both are gh.

There are some rules however:

Rule 1. Closure
Whenever one person acts on another, the result is still a person in the same society.

Rule 2. Identity
There is a special person e in the society. He leaves any element gG (including himself) unchanged, on left action or right action.

He is the only one who does not like changing people.
By symmetry, when other people act on him, they do not change—but he becomes them.

Rule 3. Associativity
Suppose h acts on the left of k, becoming hk, and then g acts on this resulting in the person g(hk). And now, suppose g acts on the left of h first, resulting in gh, and then the person gh acts on the left of person k, resulting in the person (gh)(k).
Then g(hk) and (gh)k are the same person.
ie: g(hk)=(gh)k

Rule 4. Inverses
Every person g has a unique partner g1 who turns them into the special guy e who does not change anyone.


Okay, now.

Left cosets

Take and fix a person g. The idea of a left coset is to study what happens to each person xG when g acts on them, on the left.

Formally, the left coset map of G is a function fg:GG where fg(x)=gx.

The first question: will the action of g on two different people x1,x2 transform them into the same person?

That is, can it ever be that gx1=gx2 when x1x2?

Well, pluck out the transformed person gx1, and then let the inverse partner of g, g1, act on x1. Do the same for x2.

Then we have g1(gx1)=g1(gx2). But the action is associative, so we might as well think about (g1g) acting on x1 and x2.
That is, (g1g)x1=(g1g)x2.

But when g1 and g act on each other, they become that guy who leaves everyone else unchanged. Hence:

ex1=ex2, or x1=x2!

Would you look at that. When our guy g acts on two different people, he transforms them into two different people only.


Now, g has a crush x but he is also a creep and x doesn’t like him.
So he has a devious plan (this is so fucked up lmao): he realizes that if he can find someone else y and act on them on the left, he can turn them into x, like the filthy creep he is.

Can he do this?

That is, does there exist yG for which gy=x? Well of course. He just looks for his inverse partner g1, and then g1gy=g1x.

From now on I will slowly dilute the weird people metaphor.

And by associativity and blah blah blah… (the reader is implored to solve the equation or fill the intermediate step(s)) we have y=g1x.

Now we notice that the specificity of creepy g’s crush x has nothing to do with the above argument.
If g crushes on a new x, with the same argument he can find a gullible y=g1x, such that when he acts on the left of y, he will turn into x.

What a terrible guy g. Don’t be like him.


The above two arguments formally tell us that the left coset map of g, fg:GG, fg(x)=gx, is both injective and surjective. That is, fg is bijective.


Group homomorphisms and isomorphisms

Let G,H be groups. Think of abstract algebra as a set with additional structure.

If I take an arbitrary function ϕ:GH, can I call this ϕ a "map between groups"?
If we strip away the operators on G and H? Well, the function ϕ still remains well-defined. Because functions simply take elements of one set to elements of another set.

So if our group is a set with added structure, our map ϕ between groups needs to respect and take into account that extra structure.

Using the people metaphor again: imagine ϕ turns people in G into people in H. If two people g1,g2G act on each other to transform into g1Gg2, and then we take ϕ on it, we get the person ϕ(g1Gg2)H.

To respect the action between people in G, it better be that if the transformed g1 in H under ϕ, i.e. ϕ(g1), when acted with the transformed g2 in H under ϕ, i.e. ϕ(g2), we get:

ϕ(g1)Hϕ(g2)

and that this should be the same as ϕ(g1Gg2).

That is: if two people in G first act on each other and then transform into people in H, that should be the same as first transforming themselves into people in H and then acting on each other there.

Formally, ϕ:GH is a group homomorphism (or just group morphism)
if for each g1,g2G:

ϕ(g1Gg2)=ϕ(g1)Hϕ(g2).

You, the reader, I implore you to prove these small but powerful statements (or just sketch them in your head and move on; the proofs are very straightforward):

  1. Prove that for any group G, there is one and only one element g for which gg=g (which element is this?).
  2. Prove that if ϕ:GH is a group homomorphism, then ϕ(eG)=eH (homomorphism takes identity to identity).
  3. Prove that ϕ(g1)=(ϕ(g))1. That is, inverting an element gG and then taking ϕ is the same as first taking ϕ and then inverting the result in H.
  4. Prove that if ϕ:GH and λ:HL are both group homomorphisms, then the composed map λϕ:GL is also a group homomorphism.

Now, an isomorphism is just a bijective homomorphism.
It’s like each person g in G went to their government, all gave the same renaming rule ϕ, changed their names to ϕ(g), and now they call themselves H.


Back to left coset maps. We will now completely abandon the people metaphor and just do math.

As a note: the people metaphor is not meant to be patronizing, it’s just a fun way to think about it (at least I think). I have no doubt in your capacity to do abstract and formal math, and get intuition on your own, whoever you are. But a spoonful of sugar makes the medicine go down better, and math is medicine.


Denote L(G)={fg:gG} as the collection of all left coset maps of G.

We have a set now, and we are studying groups… so can we make this into a group?

What operator do we choose on L(G)?

The obvious choice is function composition.
That is, if fg,fhL(G), define their product as fgfh:=fgfh. (:= means "defined equal to").

Okay, what does this look like? What is fgfh(x) for any xG?
Well—it’s just (gh)x. (we don’t even need to write brackets, because associative :))

What identity do we pick? Obviously fe.
In fact, fe is the identity function on G, since fe(x)=ex=x for any xG.

What is the inverse of fg? As you may guess, it is just fg1. (why?)

And of course, function composition is associative, so our operator here is associative too. And voila—we have a group.


Out of curiosity, let us make a map h:GL(G) which takes each gG to fgL(G).
i.e. h(g)=fg.

First, obviously, this h is bijective. (why?)

Now, what is h(g1g2)?
Well, it’s fg1g2. Which is also just fg1fg2. (why?)

Thus indeed, writing the equation with emphasis on which group’s product:

h(g1Gg2)=h(g1)L(G)h(g2).

Wow! So h is a bijective homomorphism and hence an isomorphism!

So the set of left coset maps of G, L(G), is isomorphic to G itself!!


I will leave the reader with a warning and an optional exercise.

Warning!!

A left coset map is NOT a homomorphism.
Let G be a group. Then for fgL(G) with ge, fg is not a homomorphism from G to G.
fg(xy)=g(xy), while fg(x)fg(y)=gxgy. Even if G is abelian, gxgy=g2xy.


Optional exercise:

Let G be a subgroup of G. That is, G is a subset of G (as sets) and inherits the operator from G, and is closed under it: for any g1,g2G, g1Gg2G, where G=G.

  1. What happens when you take an element inside G, call it g, and construct the set of left coset maps fg:GG?
  2. What if you extend the domain of fg, allowing inputs from all of G: fg:GG? Is this map even well defined? That is, for every xG, does gx lie in G?
  3. What if we extend the range instead: restrict inputs to G but output to all of G: fg:GG?
  4. Finally, what if we extend both domain and target sets: fg:GG?

For the above, the rule fg(x)=gx is always the same. But the domain and/or target sets may change. Think about:

I really encourage the reader to explore such ideas, which is why the problems are vague. The best way to learn math is to generate it, rather than just read it. Be sound in logic, allow your mind to come up with whatever ideas it wants, and know there is a comfortable bed of sound mathematical logic to fall back into—to test ideas, build counterexamples, and so on.

Thank you for reading :)

Closing remarks

Yes, I did give chatGPT this note, but only to fix grammar, spacing and slight readability, the words ARE MINE AND WILL ALWAYS BE LIKE THAT, I ran multiple prompts with very specific instructions to not change my words. And hence a few em dashes crept in. I think they are tasteful here, so I'll leave them in. So don't be that guy who sees an em dash or two and immediately jump to the conclusion that is "AI slop". Also, the people metaphor and the creepy g stuff may be offensive to some.