## Representing complex numbers as 2×2 matrices

We can represent complex numbers as $2 \times 2$ real matrices, such that arithmetic operations $(+, -, \times, \div)$ on complex numbers become equivalent to arithmetic operations on their matrix representations.

Consider a matrix-valued function $M: \mathbb{C} \rightarrow \mathbb{R}^{2 \times 2}$ defined as

$M(z) = \left[\begin{array}{cc} \Re\{z\} & -\Im\{z\}\\ \Im\{z\} & \Re\{z\}\\ \end{array}\right]$,

where $\Re\{z\}$ and $\Im\{z\}$ are the real and imaginary parts of $z \in \mathbb{C}$, respectively. It can be shown that for all $z_1, z_2 \in \mathbb{C}$, we have that

• $M(z_1 + z_2) = M(z_1) + M(z_2)$.
• $M(z_1 - z_2) = M(z_1) - M(z_2)$.
• $M(z_1 z_2) = M(z_1) M(z_2)$.
• $M(z_1 / z_2) = [M(z_2)]^{-1} M(z_1)$, if $z_2 \neq 0$.

There seems to be an homomorphism here.

__________

Matrix Representation of a Complex Number

Let $z = a + i b$, where $i = \sqrt{-1}$ and $a,b \in \mathbb{R}$, be a complex number. Its matrix representation is

$M(z) = M(a + i b) = \left[\begin{array}{cc} a & -b\\ b & a\\ \end{array}\right] = a \left[\begin{array}{cc} 1 & 0\\ 0 & 1\\ \end{array}\right] + b \left[\begin{array}{cc} 0 & -1\\ 1 & 0\\ \end{array}\right]$.

Let matrices $I_2, Q \in \mathbb{R}^{2 \times 2}$ be

$I_2 = \left[\begin{array}{cc} 1 & 0\\ 0 & 1\\ \end{array}\right], \quad{} Q = \left[\begin{array}{cc} 0 & -1\\ 1 & 0\\ \end{array}\right]$,

then the matrix representation of $z \in \mathbb{C}$ is

$M(z) = M(a + i b) = a I_2 + b Q$.

Note that both $I_2$ and $Q$ are orthogonal matrices, and therefore $Q^{-1} = Q^T$. Since $I_2$ is the $2 \times 2$ identity matrix, we have that $I_2$ and $Q$ commute, i.e., $I_2 Q = Q I_2$.

The matrix representation of the complex conjugate of $z$ is

$M(z^*) = M(a - i b) = a I_2 - b Q = M^T (z)$,

which follows from the fact that matrix $Q$ is skew-symmetric, i.e., $Q^T = -Q$. The complex conjugate of a complex number can thus be computed by transposing its matrix representation. Since $Q^T = Q^{-1}$ and $Q^T = - Q$, we have $Q^2 = - I_2$.

The square of the magnitude of a complex number, $|z|^2 = zz^*$, is equal to the determinant of its matrix representation, as follows

$\det(M(z)) = \det(M(a + i b)) = \begin{vmatrix} a & -b \\ b & a\\ \end{vmatrix} = a^2 + b^2 = |z|^2$.

A complex number written in the cartesian form, $z = a + i b$, can be converted to its polar form, $z = \rho e^{i \theta}$, where $\rho = \sqrt{a^2 + b^2}$ and $\theta = \arg(z)$. Given a complex number in the polar form $z = \rho e^{i \theta}$, its cartesian form is

$z = \rho (\cos(\theta) + i \sin(\theta))$,

and its matrix representation is

$M(z) = \rho \left[\begin{array}{cc} \cos(\theta) & -\sin(\theta)\\ \sin(\theta) & \cos(\theta)\\ \end{array}\right] = \rho R(\theta)$,

where

$R(\theta) = \left[\begin{array}{cc} \cos(\theta) & -\sin(\theta)\\ \sin(\theta) & \cos(\theta)\\ \end{array} \right]$

is a rotation matrix that rotates a vector in $\mathbb{R}^2$ by a counterclockwise angle $\theta$ radians, leaving the vector’s $\|\cdot\|_2$ unchanged. Matrix $R(\theta)$ is orthogonal, and thus $R^{-1} (\theta) = R^T (\theta)$. Given that

$\sin(-\theta) = - \sin(\theta), \quad{} \cos(-\theta) = \cos(\theta)$,

we have $R(-\theta) = R^T (\theta) = R^{-1}$. As $\det(R(\theta)) = 1$ for any value of $\theta$, we can conclude that $R(\theta) \in \text{SO}(2)$.

Finally, note that $Q = R(\frac{\pi}{2})$, i.e., matrix $Q$ rotates a vector in $\mathbb{R}^2$ $\pi/2$ radians counter-clockwise. If we multiply a complex number by $i$, we rotate it by a counterclockwise angle of $\pi/2$ radians

$i z = i \rho e^{i \theta} = \rho e^{i (\theta + \frac{\pi}{2})}$,

and in terms of matrix representations, this is equivalent to multiplying $M(z)$ by matrix $Q$. It does not matter if we multiply by $Q$ on the left or on the right, because matrices $I_2$ and $Q$ do commute.

__________

Arithmetic Operations

Let $z_1 = a_1 + i b_1$ and $z_2 = a_2 + i b_2$ be two complex numbers. Their addition/subtraction is thus

$z_1 \pm z_2 = (a_1 \pm a_2) + i (b_1 \pm b_2)$,

and from the rules of matrix addition / subtraction it can easily be shown  that $M(z_1) \pm M(z_2) = M(z_1 \pm z_2)$.

It’s easier to compute products of complex numbers if we write them in the polar form, i.e., $z_1 = \rho_1 e^{i \theta_1}$ and $z_2 = \rho_2 e^{i \theta_2}$. The product is thus $z_1 z_2 = \rho_1 \rho_2 e^{i (\theta_1 + \theta_2)}$. The product of the matrix representations is

$M(z_1) M(z_2) = \rho_1 R(\theta_1) \rho_2 R(\theta_2) = \rho_1 \rho_2 R(\theta_1 + \theta_2) = M(z_1 z_2)$,

since $R(\theta_1) R(\theta_2) = R(\theta_1 + \theta_2)$. Dividing $z_1 \in \mathbb{C}$ by $z_2 \in \mathbb{C} \setminus \{0\}$ yields

$\displaystyle\frac{z_1}{z_2} = \frac{\rho_1}{\rho_2} e^{i (\theta_1 - \theta_2)}$,

whose corresponding matrix representation is

$\displaystyle M(z_1 / z_2) = \frac{\rho_1}{\rho_2} R(\theta_1 - \theta_2)$.

Note that

$M^{-1} (z_2) M(z_1) = \displaystyle \frac{\rho_1}{\rho_2} R(-\theta_2) R(\theta_1) = \frac{\rho_1}{\rho_2} R(\theta_1 - \theta_2)$

and therefore $M^{-1} (z_2) M(z_1) = M(z_1 / z_2)$.

We can conclude that arithmetic operations on complex numbers are equivalent to arithmetic operations on the matrices representing such complex numbers.

I have absolutely no idea what use this matrix representation could possibly have, but it’s quite interesting nonetheless.

__________

Related:

### 11 Responses to “Representing complex numbers as 2×2 matrices”

1. Stephen Spear Says:

This reminds me of a chapter in Hirsch and Smale’s wonderful book, Differential Equations, Dynamical Systems and Linear Algebra, where they discuss the complex numbers/2×2 matrices isomorphism in detail.

2. Michael Croucher Says:

Hi Rod

I wasn’t aware of this stuff and yet complex analysis is one of my favourite areas of mathematics! It looks like an interesting bit of maths but, like you, I would love to see a practical application.

Cheers,
Mike

3. Sreeram Kannan Says:

Here’s an application:

Suppose you wanted a finite set of $2 \times 2$ matrices such that the determinant of the difference of any two matrices is non-zero. To get the matrices, we can choose a collection of complex numbers and use its appropriate matrix representation in order to get this property for the matrices. Since the difference of the matrices is isomorphic to the difference of two complex numbers, the difference matrix is invertible as long as the two matrices are different. This is the basis of designing ‘space time codes’, which are used for communication on multiple antenna wireless channels.

This principle can be extended to obtaining $n \times n$ matrices with the aforementioned property, however, instead of representing complex numbers, one needs to represent appropriate algebraic structures, such as division algebras, examples of which are complex numbers and hamiltons quaternions.

In fact, your observation is a specific instance of a more general principle. If I remember correctly, any associative algebra can be embedded isomorphically into a sub-algebra of a suitable matrix algebra. Now all that remains is to choose your starting associative algebra correctly. As it turns out, for the application at hand, the “correct” algebra is the cyclic division algebra.

Btw, Rod, nice blog!

4. matt Says:

Note that this can be taken much further if instead of using the transpose as analogue to complex conjugation, we use the adjoint. Then much of matrix arithmetic will match complex arithmetic.

• benj Says:

matrices with a bunch of complex numbers particularly rectangular forms are used to find mesh currents of circuits with reactive and inductive reactances using mesh current analysis.

5. Jesse Farmer Says:

Nitpick: the map $M : \mathbb{C} \to \mathbb{R}^{2 \times 2}$ is not an isomorphism because it’s not onto. Another way to see that is to note that $\mathbb{C}$ is a field but $\mathbb{R}^{2 \times 2}$ is not, so it’s impossible for them to be isomorphic.

That said, the subspace generated by matrices of that form is a field which is isomorphic to the complex numbers.

• Rod Carvalho Says:

You are absolutely correct. Since map $M: \mathbb{C} \rightarrow \mathbb{R}^{2 \times 2}$ is not onto, it can’t be an isomorphism. I suppose it’s only a homomorphism.

Thanks for pointing that out. I will correct the post right away.

6. Lonas Says:

Nice post. There’s a similar topic thats related to this in Yahoo answers or Google groups, I think. I’ll find the link and post it back here. This should spark up a good debate.

7. S Saravanan Says:

“I have absolutely no idea what use this matrix representation could possibly have, but it’s quite interesting nonetheless.”

Inverse of a matrix of complex numbers is one of the uses .

8. Patrick Says:

Using complex numbers in matrix libraries which can’t handle complex numbers is another use.

9. Tyu Says:

M(z1/z2) =M(z1)M(1/z2)?