Can anyone explain how the complex matrix representation of a quaternions is constructed? I am reading some properties of quaternionic matrices and I am unable to understand how can we got such matrix representation. please help in this regards.
 A: The ring of quaternions $\mathbb{H}$ is isomorphic to the 
ring of matrices with complex entries of the form $A =\begin{pmatrix} 
x & y 
\\
- \bar{y} & \bar{x} 
\end{pmatrix} $ 
For a quaternion $z=a+b\mathbf{i}+c\mathbf{j}+d\mathbf{k}$ the isomorphism is given by:
$$
z=a+b\mathbf{i}+c\mathbf{j}+d\mathbf{k} \quad  \mapsto \quad \mathbf{Z}= a\mathbf{U}+b\mathbf{I}+c\mathbf{J}+d\mathbf{K} \quad a,b,c,d \in \mathbb{R}
$$
with:
$$
\mathbf{U}=
\left( 
 \begin{array}{ccccc}
1&0  \\
 0 &1
\end{array}
\right)
\qquad
\mathbf{I}=
\left( 
 \begin{array}{ccccc}
i&0  \\
 0 &-i
\end{array}
\right)
\qquad
\mathbf{J}=
\left( 
 \begin{array}{ccccc}
0&1  \\
 -1 &0
\end{array}
\right)
\qquad
\mathbf{K}=
\left( 
 \begin{array}{ccccc}
0&i  \\
 i &0
\end{array}
\right)
$$
We can easy see that:
$$
\mathbf{I}^2=\mathbf{J}^2=\mathbf{K}^2=\mathbf{I}\mathbf{J}\mathbf{K}=-\mathbf{U}
$$
and
$$
z=a+b\mathbf{i}+c\mathbf{j}+d\mathbf{k} \quad  \mapsto \quad \mathbf{Z}=
\left( 
 \begin{array}{ccccc}
 a+ib&c+id  \\
 -c+id &a-ib
\end{array}
\right)
$$
with
$$
\mbox{det}(\mathbf{Z})=
\left |
\left( 
 \begin{array}{ccccc}
 a+ib&c+id  \\
 -c+id &a-ib
\end{array}
\right)
\right |=
a^2+b^2+c^2+d^2=|z|^2
$$
A: The key is as Jyrki states in the comments: view $\mathbb{H}$ as a right vector space over $\mathbb{C}$. That means we apply scalars from the right, instead of the left. This way, if $q\in\mathbb{H}$ is a scalar and $L_q(x)=qx$ is the left-multiplication-by-$q$ map, it is $\mathbb{C}$-linear in the sense that $L_q(x\lambda)=L_q(x)\lambda$ for all $x\in\mathbb{C}$ and complex scalars $\lambda\in\mathbb{C}$. As a complex vector space, $\mathbb{H}$ is $2$-dimensional with basis $\{1,\mathbf{j}\}$.
With this idea, every $L_q$ corresponds to a $2\times 2$ complex matrix:
$$ \begin{cases} L_1(1)=1+\mathbf{j}0 \\ L_1(\mathbf{j})=0+\mathbf{j}1 \end{cases} \implies \quad L_1\leftrightarrow \begin{pmatrix} 1 & 0 \\ 0 & 1\end{pmatrix} $$
$$ \begin{cases} L_{\mathbf{i}}(1)=\mathbf{i}+0\mathbf{j} \\ L_{\mathbf{i}}(\mathbf{j})= 0-\mathbf{j}\mathbf{i} \end{cases} \implies \quad L_{\mathbf{i}}\leftrightarrow \begin{pmatrix} i & 0 \\ 0 & -i \end{pmatrix} $$
$$ \begin{cases} L_{\mathbf{j}}(1)=0+\mathbf{j}1 \\ L_{\mathbf{j}}(\mathbf{j})=-1+\mathbf{j}0  \end{cases} \implies \quad L_{\mathbf{j}}\leftrightarrow \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} $$
$$ \begin{cases} L_{\mathbf{k}}(1)=0-\mathbf{ji} \\ L_{\mathbf{k}}(\mathbf{j})=-\mathbf{i}+\mathbf{j}0 \end{cases} \implies \quad L_{\mathbf{k}}\leftrightarrow \begin{pmatrix} 0 & -i \\ -i & 0 \end{pmatrix} $$
The correspondence $\mathbf{q}\leftrightarrow L_{\mathbf{q}}$ preserves addition and multiplication, hence is an $\mathbb{R}$-algebra homomorphism from $\mathbb{H}$ into $M_2(\mathbb{C})$. The image is then an isomorphic copy of $\mathbb{H}$.
Other conventions are possible. For instance, we could associate $\mathbf{q}\mapsto R_{\overline{\mathbf{q}}}$ (notice that conjugation).
A: Your question is essentially the aim of representation theory: representing the elements of a group as matrices. 
https://en.m.wikipedia.org/wiki/Group_representation
