I'm trying to learn some group theory for physics as a self-learner. I'm reading about rotation in 2D and 3D space. The book I'm following, Physics from symmetry by Schwichtenberg, firstly proves that the $SO(2)$ group is isomorphic to the $U(1)$, then talks about quaternions and tries to find a relation between $SO(3)$ and $SU(2)$, which is the group formed by unitary quaternions. In the first case, to do so, the author expresses complex numbers as matrices. This is clear as there can be made a map:
$$ e^{i \theta} \to \begin{bmatrix} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{bmatrix} = \cos \theta \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} + i\sin \theta \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} $$
Thus $1$ and $i$ can be mapped to
$$ 1 \to \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$
$$ i \to \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} $$
The process, instead, isn't clear in the case of quaternion, for which have been chosen the following matrices:
$$ 1 \to \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$
$$ i \to \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} $$
$$ j \to \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix} $$
$$ k \to \begin{bmatrix} i & 0 \\ 0 & -i \end{bmatrix} $$
It is clear that this serves the purpose, but why have these matrices been chosen, is the choice purely random, or is there a motivation as for the case of 2D rotation?
P.S.: Thanks in advance for your eventual answers, and excuse my English, as I'm still learning it!