This is the first of a series of posts about working with group representations in Sage.
Basic Definitions
Given a group $G$, a linear representation of $G$ is a group homomorphism $\rho: G \to \mathrm{GL}(V)$ such that
$\rho(g h) = \rho(g) \rho(h)$ $\forall g,h \in G$.
To define a representation in Sage, we thus need some function that takes group elements as input and returns matrices as output.
Various authors refer to the map $\rho$, the vector space $V$, or the tuple $(V,\rho)$ as a representation; this shouldn’t cause any confusion, as it’s usually clear from context whether we are referring to a map or a vector space. When I need to be extra precise, I’ll use $(V,\rho)$.
For our purposes, we will assume that $G$ is a finite group and $V$ is an $n$-dimensional vector space over $\mathbb{C}$. Then $\mathrm{GL}(V)$ is isomorphic to the invertible $n \times n$ matrices over $\mathbb{C}$, which we will denote $\mathrm{GL}_n \mathbb{C}$.
Some simple examples
Trivial representation
The simplest representation is just the trivial representation that sends every element of $G$ to the identity matrix (of some fixed dimension $n$). Let’s do this for the symmetric group $S_3$:
(The Sage cells in this post are linked, so things may not work if you don’t execute them in order.)
We can verify that this is indeed a group homomorphism (warning: There are 6 elements in $S_3$, which means we have to check $6^2 = 36$ pairs!):
Permutation representation
This isn’t very interesting. However, we also know that $S_3$ is the group of permutations of the 3-element set {$1,2,3$}. We can associate to each permutation a permutation matrix. Sage already has this implemented for us, via the method matrix() for a group element g:
Qn: From the permutation matrix, can you tell which permutation $g$ corresponds to?
We can again verify that this is indeed a representation. Let’s not print out all the output; instead, we’ll only print something if it is not a representation. If nothing pops up, then we’re fine:
Defining a representation from generators
We could define permutation representations so easily only because Sage has them built in. But what if we had some other representation that we’d like to work with in Sage? Take the dihedral group $D_4$. Wikipedia tells us that this group has a certain matrix representation. How can we recreate this in Sage?
We could hard-code the relevant matrices into a dictionary. Whenever we want the representation of a particular group element, we just have to look for the group element in the dictionary. However, typing all these matrices can be time-consuming, especially if the group is large.
But remember that representations are group homomorphisms. If we’ve defined $\rho(g)$ and $\rho(h)$, then we can get $\rho(gh)$ simply by multiplying the matrices $\rho(g)$ and $\rho(h)$! If we have a set of generators of a group, then we only need to define $\rho$ on these generators. Let’s do that for the generators of $D_4$:
We see that $D_4$ has a generating set of 2 elements (note: the method gens() need not returning a minimal generating set). Let’s call these $r$ and $s$. These correspond to $R_1$ and $S_0$ in the Wikipedia example, so let’s initialize our representation with the matrices corresponding to these elements:
Notice the square brackets used in accessing a dictionary: wiki_rep[r] (versus a function call, which would be written wiki_rep(r)). Now we just need to populate the dictionary wiki_rep with the other group elements.
We know that elements of $D_4$ can be written $r^is^j$, where $i = 0,1,2,3$ and $j = 0,1$. Running through all pairs $(i,j)$ should give us the whole group:
One can verify that this does indeed give the same matrices as the Wikipedia example, albeit in a different order.
We can do better!
All the representations we’ve defined so far aren’t very satisfying! For the last example, we required the special property that all elements in $D_4$ have the form $r^i s^j$. In general, it isn’t always easy to express a given group element in terms of the group’s generators (this is known as the word problem).
We’ve also been constructing representations in a rather ad-hoc manner. Is there a more general way to construct representations? And how many are representations are there?
In the next post, I’ll run through two simple ways of combining existing representations to get new ones: the direct sum and the tensor product. I’ll also define irreducible representations, and state some results that will shed some light on the above questions.