Endomorphism structure of quaternion group

This article discusses the endomorphism structure of the quaternion group, a group of order 8 given by the following multiplication table:

Here, the identity element is denoted $$1$$, and the unique non-identity central element is denoted $$-1$$.

Inner automorphisms
For the actual description of automorphisms, we use the left action convention, so conjugation by $$g$$ is the map $$h \mapsto ghg^{-1}$$. With the right action convention, what we call conjugation by $$g$$ becomes conjugation by $$g^{-1}$$. However, the data in the table below is the same for both left and right action conventions because, since every square is in the center, every element and its inverse are in the same coset of the center.

For every inner automorphism, there are two elements that give rise to it via the action by conjugation. Both these elements together form a coset of the center. The columns have been arranged so that all elements of a conjugacy class are in adjacent columns to each other. From this, you can notice that the inner automorphisms permute elements within their conjugacy class.

The inner automorphism group is isomorphic to a Klein four-group. The multiplication table, viewed in terms of corresponding cosets of the center, is:

Outer automorphisms and outer automorphism classes
There are six outer automorphism classes, and the outer automorphism group is symmetric group:S3. One way of thinking of this group is via its action on the set of non-identity cosets of the center, i.e., the set $$\{ \{ i, -i \}, \{ j,-j \}, \{ k,-k \}\}$$. Each outer automorphism class induces a permutation on this set of cosets, and every possible permutation arises from a unique outer automorphism class, so the outer automorphism group is isomorphic to symmetric group:S3.

In order to think of the whole automorphism group, the following approach can help. Consider the signed symmetric group of degree three, where the three signed points being acted upon are $$\pm i, \pm j, \pm k$$. We note that:


 * Every automorphism of the quaternion group must send each non-identity coset of the center to a non-identity coset of the center, hence the pairs $$\pm i, \pm j, \pm k$$ get permuted among themselves.
 * Thus, there is a homomorphism from the automorphism group of the quaternion group to the signed symmetric group on $$\pm i, \pm j, \pm k$$.
 * This homomorphism is injective, because if an automorphism induces the identity signed permutation, it cannot move anything and must be the identity automorphism.
 * Thus, the automorphism group of the quaternion group can be identified as a subgroup of the signed symmetric group of degree three.
 * In fact, it is precisely the subgroup with the property that the determinant of the signed matrix be 1, and is hence a subgroup of index two. The entire signed symmetric group is a semidirect product of elementary abelian group:E8 with symmetric group:S3, which turns out to become direct product of S4 and Z2. The subgroup of interest to us turns out to be asymmetric group:S4 direct factor.

Upshot: the automorphism group of the quaternion group can be identified with symmetric group:S4.

Summary
Here is a summary of the various kinds of endomorphisms. Note that the first and second to last row are special in that the first row is about automorphisms and the second to last row is about the trivial endomorphism, and these are not elaborated upon further in the sections below: