# The absolute basics of representation theory of finite groups

This will be an "ML-oriented" introduction to representation theory of finite groups. It is an introductory sketch that orients towards both a language and a result (the "real semisimplicity" result) that is useful for thinking about the subject in an interpretability context.

This is a somewhat low-effort math post (subbing in for a planned post I'm running late on). It isn't a prerequisite for anything, but will be useful background for a future discussion of how NN's learn associative group multiplication (a joint project with Louis Jaburi). I'm hoping for this to be readable by people with a very small amount of background in abstract algebra: it is meant to fill in some very basic knowledge gaps. I'd be very interested in comments about what is confusing or difficult about this post, to help focus on the right exposition directions when writing about this in the future.

I'm not going to assume much abstract algebra, other than the notions of a [*group*](https://en.wikipedia.org/wiki/Group_(mathematics)) and an [*algebra*](https://en.wikipedia.org/wiki/Associative_algebra) (always assumed to be a unital, associative algebra).

Algebras of note
================

Recall that all the set \\(\\text{Mat}_{n\\times n}\\) of \\(n\\times n\\) (real-valued) matrices forms an algebra (it's a vector space with an associative product that distributes across addition). For any field F, there is a notion of a *matrix algebra over F* and \\(\\text{Mat}_{n\\times n}\\) is naturally an algebra over \\(\\mathbb{R}\\). The set  \\(\\text{Mat}_{n\\times n}(\\mathbb{C})\\) of *complex-valued* matrices forms an algebra over \\(\\mathbb{C}\\), but it can also be viewed as an algebra over \\(\\mathbb{R}\\), in the same way as \\(\\mathbb{C}\\) can be viewed as a two-dimensional vector space.

We will be interested in understanding the "algebra" associated to a finite group G. It turns out that working with algebras over \\(\\mathbb{C}\\) is easier than working with algebras over \\(\\mathbb{R}\\) from a theoretical viewpoint (this is of course because \\(\\mathbb{C}\\) is *algebraically closed*, i.e., any polynomial equation has a solution. We'll start out looking at such representations. However unfortunately, neural nets don't care about theoretical ease: instead they care about compression and efficiency, and this will necessitate also understanding a bit of representation theory over \\(\\mathbb{R}\\).

For starters, we work over \\(\\mathbb{C}\\). We'll need one more useful algebra that will be one of the main characters in our discussion: namely, the *group algebra* of G, written \\\[\\mathbb{C}\[G\]\\\]. This is the algebra whose elements are formal *complex* linear combinations of elements of \\(G\\), and where product is induced from the product on \\(G\\) distributively. We analogously have the real-valued group algebra \\(\\mathbb{R}\[G\]\\). When we don't want to commit to either real or complex coefficients and want to treat them simultaneously, we'll write \\(F\[G\]\\) for F one of our fields \\(\\mathbb{R}\\) or \\(\\mathbb{C}\\) (a bit of the analysis here carries over to more general fields, though usually one should require the *characteristic* of the field to be relatively prime to the order \\(|G|\\) of the group for the theory to have comparable niceness).

So for example if \\(G = C\_n\\) is the cyclic group on n elements (\\(C\_n\\) is better notation for the group that is sometimes written \\(\\mathbb{Z}\_n\\) or \\(\\mathbb{Z}/n\\)), then an element of \\(\\mathbb{C}\[G\]\\) is a sum \\\[\\lambda\_0 \\mathbf{0} + \\lambda\_1 \\mathbf{1}+\\lambda\_2 \\mathbf{2} + \\ldots \\lambda_{n-1} \\mathbf{n-1}.\\\] Here the "bolded" numbers are group elements. Note of course that since we're viewing it as a group, *multiplication* in \\(C_n\\) corresponds to *addition* of numbers: i.e., \\(\\mathbf{a} \\cdot \\mathbf{b} = \\mathbf{a+b\\mod n}.\\) (This is another reason why \\(C\_n\\) is better notation -- since \\(\\mathbb{Z}/n\\) could also mean the ring, multiplicative and additive notions can be more confusing.) To see how group multiplication in this algebra works, let's work out an example with \\(G = C\_3\\): \\\[(4\\cdot \\mathbf{1} + 5\\cdot\\mathbf{2})\\cdot (-3\\cdot \\mathbf{0} + \\mathbf{2}) =\\\] \\\[-12\\mathbf{1}\\cdot \\mathbf{0} + 4\\mathbf{1}\\cdot \\mathbf{2} - 15\\cdot \\mathbf{2}\\cdot\\mathbf{0} + 10\\cdot \\mathbf{2}\\cdot\\mathbf{2} =\\\] \\\[4\\cdot\\mathbf{0}+(-12 + 10)\\cdot\\mathbf{1} -15\\cdot \\mathbf{2}.\\\] (Here remember that we're writing the group multiplicatively, so for example \\(\\mathbf{2}\\cdot \\mathbf{2} = \\mathbf{1}\\) since \\(2+2\\equiv 1\\mod 3\\).)

Representations
===============

Now for the purposes of this note we define an n-dimensional *representation* of \\(G\\) to be a map of algebras from the group algebra to a matrix algebra: \\(\\rho:F\[G\]\\to \\text{Mat}_{n\\times n}(F).\\) Here F can either be the field \\(\\mathbb{R}\\) ("real-valued representations") or the field \\(\\mathbb{C}\\) ("complex-valued representations").

Of course by linearity, it's enough to specify \\(\\rho(g)\\) for elements \\(g\\in F\[G\]\\), which are the standard basis for the group algebra: i.e., \\(\\rho\\) can be recovered from its restriction \\(\\rho\\mid\_G: G\\to \\text{Mat}\_{n\\times n}\\). Conversely, any map \\(\\rho\_0: G\\to \\text{Mat}\_{n\\times n}\\) leads to a map of algebras if it's

*   Unital, i.e. \\(\\rho_0(1) = 1\\) and
*   A multiplicative homomorphism, i.e., \\(\\rho(gh) = \\rho(g) \\rho(h)\\) (product of matrices on the RHS). 

Note that setting \\(h = g^{-1}\\) and using the homomrphism property tells us that \\(\\rho(g)\\) must always be invertible, i.e., an element of the group of invertible matrices \\(GL\_n(F)\\subset \\text{Mat}\_{n\\times n}(F)\\); this shows that our notion of representation is equivalent to the usual notion of group homomorphism \\(\\rho\_0:G\\to GL\_n(F)\\). We say that two representations \\(\\rho\_1, \\rho\_2\\) are *equivalent* if 

*   they have the same dimension (i.e., both n-dimensional for the same n) and
*   they are *conjugate*: so there exists some other invertible matrix \\(\\gamma\\in GL\_n(F)\\) such that, for all \\(g\\in G\\), we have the identity \\\[\\rho\_2(g) = \\gamma\\rho\_1(g)\\gamma^{-1}\\\] (if you haven't seen expressions like this, convince yourself that the formula on the right defines a new representation of \\(G\\) for any fixed invertible \\(\\gamma\\).) In this case we think of \\(\\rho\_1\\) and \\(\\rho\_2\\) to act "via the same symmetries", just expressed in different bases (the standard basis in the case of \\(\\rho\_1\\) and the basis given by \\(\\gamma\\) in the case of \\(\\rho_2\\)). 

If you've ever heard of group representations, you've heard of the notion of *irreducibility*. A representation \\(\\rho\\) is irreducible if it cannot be decomposed into smaller components: i.e., if it isn't conjugate to a block-diagonal representation of the form 

\\\[g\\mapsto \\begin{pmatrix} \\rho\_1(g) & 0 \\\ 0 & \\rho\_2(g)\\end{pmatrix},\\\] for \\(\\rho\_1, \\rho\_2\\) nonzero representations.

The "reducible" representation above (check this is a representation if you don't believe me!) is denoted \\(\\rho\_1\\oplus \\rho\_2\\). 

Now the big secret point of representation theory is that the set of irreducible representations (up to isomorphism) "contain all the algebraic information" about G. This is encompassed by a series of results; an appealing consequence of these results (and a way of condensing much of the information contained in them) is the *semisimplicity theorem* below.

Let \\\[\\rho\_1: \\mathbb{C}\[G\]\\to \\text{Mat}\_{n\_1\\times n\_1}(\\mathbb{C}),\\ldots \\rho\_k: G\\to \\text{Mat}\_{n\_k\\times n\_k}(G)\\\] be a collection of representations that contains each irreducible representation exactly once up to conjugacy. (Usually, since conjugacy, i.e., "isomorphism", simply corresponds to choosing a different basis, people will use "sum of all irreducible representations" to mean this object). Here \\(n\_1,\\dots, n\_k\\) are the dimensions of the irreducible representations. The classification of (complex) representations of G and the eigenvalues of the matrices \\(\\rho_i(g)\\) is called *character theory* (something that gets covered in a first course on representation theory, but that we won't get into here). Character theory in particular implies that the number (k) of distinct irreducible complex representations is equal to the number of conjugacy classes of G, i.e., the number of elements on the set obtained from G by identifying \\(g\\) and \\(\\gamma g\\gamma^{-1}\\) for any G. If G is commutative, then each conjugacy class just has a single element (each element g above only gets identified with itself), so in the special case of commutative groups (also known as "abelian" groups), the number of conjugacy classes is equal to the number of elements, i.e., \\(k = |G|\\).

**Theorem** (semisimplicity of the group algebra): 

\\\[\\rho\_1 \\oplus \\rho\_2 \\oplus \\ldots \\oplus \\rho_k\\\] be the direct sum of all irreducible representations of G. Then the map 

\\\[\\mathbb{C}\[G\]\\to \\text{Mat}_{n\_1+n\_2 +\\cdots + n_k}(\\mathbb{C})\\\]

is injective, and identifies \\(\\mathbb{C}\[G\]\\) with the set of *all* block diagonal matrices 

\\\[\\begin{pmatrix} M\_1 & 0&\\cdots & 0 \\\ 0&M\_2&\\cdots &0\\\ \\vdots &\\vdots& \\ddots & \\vdots \\\ 0& 0&\\cdots &M_k\\end{pmatrix}.\\\]

(Here the \\(M\_i\\) are \\(n\_i\\times n_i\\) complex-valued matrices). In other words if we only care about the *algebra* \\(\\mathbb{C}\[G\]\\), then all of its structure is fully determined by the (unordered) collection of irreducible representation dimensions \\(n\_1, \\dots, n\_k\\). Since there are *a lot* of groups, this implies that there are some pairs of distinct groups G, H that have isomorphic matrix algebras! I.e., while the groups cannot be identified with each other, every element of G can be identified with a linear combination of elements of H in a way that respects multiplication and admits an inverse (once again linear combination-valued): indeed, if the representation dimensions of G and H coincide, then *as algebras*, we can identify both group algebras with the same algebra of block-diagonal matrices. A simple example of a pair of distinct groups with isomorphic group algebras are the groups \\(C\_9\\) and \\(C\_3\\times C_3\\)[^rivephtix2j].

Real reprsentation theory, and "representation type".
=====================================================

But once again, if we want to understand how NN's process groups, we need to understand the "more efficient" representation theory over \\(\\mathbb{R}\\). Here we can start our analysis by looking at the same picture as before: namely, while we have no guarantee that the matrix coefficients of a matrix \\(\\rho(g)\\) in a complex representation has real coefficients, we *do* have a real subring \\(\\mathbb{R}\[G\]\\subset \\mathbb{C}\[G\]\\), namely real-valued formal linear combinations of group elements viewed as a subring of complex-valued ones. Since each complex linear combination can be uniquely identified with a unique block-diagonal matrix \\\[\\text{Block}_\\mathbb{C}: = \\begin{pmatrix} M\_1 & \\cdots & 0 \\\ \\vdots & \\ddots & \\vdots \\\ 0& \\cdots &M\_k\\end{pmatrix},\\\] we want to understand what kinds of subrings we can obtain. This must be a "decomplexification" (more standardly called "real form") of \\(\\text{Block}_\\mathbb{C}\\), a subring \\\[\\text{Block}_\\mathbb{R}\\subset \\text{Block}_\\mathbb{C}.\\\] which has the following properties: 

*   \\(\\text{Block}_\\mathbb{R}\\) is closed under multiplication by real scalars (but not necessarily complex scalars),
*   \\(\\text{Block}_\\mathbb{R}\\) has half the dimension of the real vector space \\(\\text{Block}_\\mathbb{C}\\).
*   each block-diagonal matrix \\(M\\in \\text{Block}_\\mathbb{C}\\) can be expressed as \\(M\_0 + i M\_1,\\) for \\(M\_0, M\_1\\) in \\(\\text{Block}_\\mathbb{R}\\).

Of course, one "real form" is the set of block-diagonal matrices as above with real coefficients, and sometimes this does correctly capture the image of the real group algebra (this is the case, for example, for the symmetric group \\(S_n\\)). However, there exist other possibilities for the real form. The property of being "real" (i.e., having real coefficients as a formal linear combination of group elements) as a group algebra vector may not be compatible (even after allowing a fixed conjugation) with the property of being "real" (i.e., having real coefficients as a matrix) as a block-diagonal matrix. In other words, the group G (and its real group algebra) "chooses" a specific real form of the algebra of block diagonal matrices.

Such real forms can be fully classified, and there are exactly three things that can happen to some \\(n\\times n\\) block \\(\\text{Mat}_{n\\times n}(\\mathbb{C}).\\)

1.  It gets replaced by (a conjugate of) \\\[\\text{Mat}_{n\\times n}(\\mathbb{R})\\subset \\text{Mat}_{n\\times n}(\\mathbb{C}).\\\] Irreducible representations \\(\\rho_i\\) for which this happens for the corresponding block are said to be of "real type" (note that being of real type is a property of a *complex-valued* representation!).
2.  It gets combined with another \\(n\\times n\\) block and (again up to conjugating by some invertible matrix \\(\\gamma\\)), a block-diagonal matrix spanning these two blocks \\\[\\begin{pmatrix} A& 0 \\\ 0 &B \\end{pmatrix}\\in \\text{Block}_\\mathbb{R}\\\] is "real" if and only if A and B are (coordinatewise) *complex* conjugates: i.e., coordinatewise, \\(A = \\bar{B}\\). Pairs of representations \\(\\rho\_i, \\rho\_j\\) for which this happens are said to be of "complex type", and they always satisfy \\(\\rho\_i(g) = \\bar{\\rho}\_j(g)\\) (after possibly replacing one of \\(\\rho\_i, \\rho\_j\\) by a conjugate). 
3.  The dimension n of the corresponding block is even and, up to conjugation, the matrices \\(M\_i\\in \\text{Mat}\_{n\\times n}(\\mathbb{R})\\) in the real form associated to this block can be split into \\(2\\times 2\\) blocks:
    
    \\\[M\_i = \\begin{pmatrix} h\_{0,0} & \\cdots & h_{0,n/2}\\\ \\vdots&\\ddots&\\vdots\\\ h_{n/2, 0}& \\cdots & h_{n/2,n/2}\\end{pmatrix},\\\]
    
    where each \\(h_{ij}\\in \\text{Mat}_{2\\times 2}(\\mathbb{C})\\) above is a complex-valued \\(2\\times 2\\) *quaternion* matrix, i.e., a matrix of the form 
    
    \\(h_{ij}\\) = a**1** \+ b**i +** c**i** \+ d**j**, where \\(a,\\dots, d\\) are real numbers and **1** =\\(\\begin{pmatrix}1&0\\\0 &1\\end{pmatrix}\\) is the usual unit matrix, and we have 
    
    **i** = \\(\\begin{pmatrix}i&0\\\0&i\\end{pmatrix}\\),
    
    **j** = \\(\\begin{pmatrix}0&1\\\-1&0\\end{pmatrix}\\) and
    
    **k** = \\(\\begin{pmatrix}0& i\\\-i&0\\end{pmatrix}\\)
    
    (These matrices are known in physics as the *Pauli matrices*.)
    
    The resulting 4-dimensional real subalgebra of \\(\\text{Mat}_{2\\times 2}\\) is called the quaternion algebra, denoted \\(\\mathbb{H}\\). It has the wonderful property of being the only (finite-dimensional) *division algebra* over \\(\\mathbb{R}\\) (i.e. algebra all of whose nonzero elements are invertible) except for \\(\\mathbb{C}\\) and \\(\\mathbb{R}\\) itself, and the only non-commutative one. Representations \\(\\rho_i\\) whose associated block exhibits this behavior are said to be of "quaternionic type". 
    

Together, these results imply that whereas the complex group algebra \\(\\mathbb{C}\[G\]\\) is always (isomorphic to) a direct sum of matrix algebras \\\[\\text{Mat}_{n\_1\\times n\_1}\\oplus \\cdots \\oplus \\text{Mat}_{n\_k\\times n\_k}\\\] (this expression, with the symbol \\(\\oplus\\) denoting "direct sum", is the standard mathematical notation for the block-diagonal algebra), the *real* group algebra \\(\\mathbb{R}\[G\]\\) is isomorphic to a direct sum of matrix algebras of three forms:

1.  *Real matrix algebras* \\(\\text{Mat}_{n\\times n}(\\mathbb{R})\\) (each is associated to a single complex representation of dimension n).
2.  *Complex matrix algebras* \\(\\text{Mat}_{n\\times n}(\\mathbb{C})\\) (*but viewed as an algebra over* \\(\\mathbb{R}\\)). These components of the real-valued group algebra "combine" two complex representations, so there are half as many such components as there are irreducible (complex-valued) representations of complex type.
3.  *Quaternionic matrix algebras* \\(\\text{Mat}_{n\\times n}(\\mathbb{H})\\) (each is associated to a single complex representation of dimension 2n). 

Examples
========

We conclude by giving some explicit examples of the comparison between the group algebra the block-diagonal matrix algebra associated to irreducible representations.

Complex representations of cyclic groups
----------------------------------------

Let \\(G = C_n\\) be the cyclic group on n elements. In this case it turns out each irreducible representation of G is one-dimensional and there are n of these. By our semisimplicity result above, this is equivalent to the fact that the group algebra \\(\\mathbb{C}\[G\]\\) is isomorphic to the algebra of diagonal \\(n\\times n\\) complex matrices. To see this it is enough to construct an isomorphism. 

Let \\\[\\zeta : = \\exp(2\\pi i/n)\\\] be the elementary nth root of unity. For any residue \\\[**a**\\in C_n\\\], we write \\\[M(a) = \\text{diag}(1, \\zeta^\\mathbf{a}, \\zeta^{2\\mathbf{a}}, \\dots, \\zeta^{(n-1)\\mathbf{a}}).\\\]

Here in order to make sense of \\(\\zeta^\\mathbf{a}\\) where **a** is a residue (rather than an integer), we're implicitly using the fact that \\(\\zeta^n = 1\\) (and so exponents of \\(\\zeta\\) only depend on their residue mod n). The mapping above is obviously a homomorphism (i.e., compatible with multiplicaiton). It's a standard fact that the above diagonal matrices are linearly independent as **a** ranges over the group elements. Since both the algebra of \\(n\\times n\\) diagonal matrices is n-dimensional, these n linearly independent vectors must form a basis; since we have identified a basis of the group algebra \\(\\mathbb{C}\[G\]\\) with a basis of the block-diagonal matrix algebra, this is an isomorphism. If we look at the diagonal matrix associated to the linear combination \\\[\\lambda\_0\\mathbf{0}+ \\ldots + \\lambda\_{n-1}\\mathbf{n-1},\\\] its kth element is \\\[\\lambda\_0 + \\lambda\_1\\zeta + \\lambda\_2 \\zeta^2 + \\ldots + \\lambda\_{n-1} \\zeta^{n-1}.\\\] Looking at this formula, we see that we have rediscovered the finite *Fourier transform*: indeed, if we view the coefficients \\(n\\mapsto \\lambda_n\\) as a complex-valued function \\(\\lambda\\) on \\the group elements \\(\\mathbf{0},\\dots, \\mathbf{n-1}\\),  then the (k,k)th matrix coefficient of the associated diagonal matrix is the Fourier transform \\(\\hat{\\lambda}(k)\\). The homomorphism property in this case is equivalent to observing that the *convolution product* (which is equivalent to the group algebra product -- checking this is a nice exercise) maps to the elementwise product after Fourier transform (and of course multiplying diagonal matrices multiplies their coefficients elementwise). 

Real representations of cyclic groups
-------------------------------------

Here there is a difference between even and odd n. The results of the previous section tell us that there are n different complex one-dimensional representations \\(\\rho\_i\\) (with the kth representation corresponding to taking an element of the group algebra to the kth diagonal element). A one-dimensional representation just takes each element of \\(\\mathbf{a}\\in C\_n\\) to an (invertible) element \\(\\rho\_k(\\mathbf{a})\\in \\mathbb{C},\\) and is given by the formula \\(\\rho\_k(\\mathbf{a}) = \\zeta^{k\\mathbf{a}}.\\) For all n, the representation \\(\\rho\_0\\) is of real type: indeed, it takes every element of G to 1, which is a real-valued \\(1\\times 1\\) matrix. If n is even, then the representation \\(\\rho\_{n/2}\\) is also real-valued, as it takes each element **a** to \\((-1)^{\\mathbf{a}}\\in \\pm 1\\). And whether n is even or odd, all other \\(\\rho\_k\\) are of complex type: we can check this simply by seeing that \\(\\rho\_k\\) is not isomorphic to the complex conjugate representation \\(\\bar{\\rho}\_k = \\rho\_{-k}\\). (Note since two matrix representations are isomorphic if and only if they're conjugate by some fixed matrix \\(\\gamma\\), any 1-dimensional representation will be conjugate only to itself. Thus it's enough to observe that for \\(k\\neq 0, n/2\\), \\\[\\bar{\\rho}\_k(1) = \\bar{\\zeta^k} = \\zeta^{-k}\\neq \\rho\_k(1)\\\] to see that \\(\\rho\_k\\) is of complex type. Thus semisimplicity in the real case tells us that the group algebra \\(\\mathbb{R}\[C\_n\]\\) is isomorphic 

*   \\(\\mathbb{R}\\oplus \\mathbb{C}^{\\frac{n-1}{2}},\\) if n is odd and
*   \\(\\mathbb{R}^2\\oplus \\mathbb{C}^{\\frac{n-2}{2}},\\) if n is even.

(Here an "exponent" d is the direct sum expression is shorthand for taking the direct sum of d copies of the same component).

The group of elementary quaternions
-----------------------------------

Unspurprisingly (since the quaternions are a noncommutative division ring), no commutative group has representations of quaternionic type. The smallest group with a representation of quaternionic type is the group \\\[G = Q_8\\\] of elementary quaternions, with the 8 elements **1, -1, i, -i, j, -j, k, -k**. We can identify each of these elements with the corresponding \\(2\\times 2\\) "Pauli" matrix above, and then they form a group with identity **1** and the following multiplication table: 

*   (**-1**)\\(\\pm \\mathbf{\\alpha} = \\mp \\mathbf{\\alpha}\\) for \\(\\mathbf{\\alpha}\\) one of the symbols **1, i, j, k**;
*   **i^2 = j^2 = k^2 = -1;**
*   **ij = k, ji = -k, jk = i, kj = -i, ki = j, ik = -j**.

This group has one 2-dimensional complex representation of quaternionic type, thus giving a map \\(Q\_8\\to \\text{Mat}\_{1\\times 1}\\mathbb{H}=\\mathbb{H}\\) (remember that the quaternionic dimension is half the complex dimension). This is the obvious map, taking each element of the group to the corresponding quaternion; it also has 4 different 1-dimensional real representations: one is (as for any group) the *trivial* representation, taking every \\(g\\in G\\) to 1, and the other three factoring through one of three surjective homomorphisms \\(Q\_8\\to C\_2,\\) which ignore sign and take 2 of the three letters **i, j, k** to -1. There are no other representations, so we see that the real group algebra \\(\\mathbb{R}\[Q\_8\]\\) is isomorphic to the direct sum \\\[\\mathbb{H}\\oplus \\mathbb{R}^4.\\\] In particular, \\(Q\_8\\) has no representations of complex type.

[^rivephtix2j]: In fact, these two algebras have the same group algebras over \(\mathbb{R}\), which is a stronger result. Similarly, the Klein 4-group \(C_2\times C_2\) has the same complex group algebra as the cyclic group \(C_4\), but these have nonisomorphic group algebras over \(\mathbb{R}\).