# Automorphisms of quaternion group

I learned this morning from Brian Bi that the automorphism group of the quaternion group is in fact $S_4$. Why? The quaternion group is generated by any two of $i,j,k$ all of which have order $4$. $\pm i, \pm j, \pm k$ correspond to the six faces of a cube. Remember that the symmetries orientation preserving of cube form $S_4$ with the objects permuted the space diagonals. Now what do the space diagonals correspond to? Triplet bases $(i,j,k), (-i,j,-k), (j,i,-k), (-j,i,k)$, which correspond to four different corners of the cube, no two of which are joined by a space diagonal. We send both our generators $i,j$ to two of $\pm i, \pm j, \pm k$; there are $6\cdot 4 = 24$ choices. There are by the same logic $24$ triplets $(x,y,z)$ of quaternions such that $xy = z$. We define an equivalence relation with $(x,y,z) \sim (-x,-y,z)$ and $(x,y,z) \sim (y,z,x) \sim (z,x,y)$ that is such that if two elements are in the same equivalence class, then results of the application of any automorphism on those two elements will be as well. Furthermore, no two classes are mapped to the same class. Combined, this shows that every automorphism is a bijection on the equivalence classes.