Computing a rotation: complex numbers vs rotation matrix A 2D vector can be rotated by an angle $\theta$ using the rotation matrix:
\begin{bmatrix}
\cos(\theta) &amp; -\sin(\theta) \\
\sin(\theta) &amp; \cos(\theta)
\end{bmatrix}

Or, it can be rotated by multiplying the vector by the complex number $c$:

$$c = \cos(\theta) + i\sin(\theta)$$

Is there any meaningful difference between these two methods? I tested both in MATLAB, and they seem to run at the same speed. 

On a related note, is there some spatial transformation that complex numbers can do but matrices cannot?
Both methods end up doing the same calculations when you break it down.

Rotating a vector $u$ with a matrix:
$$\begin{bmatrix}\cos\theta &amp; -\sin\theta \\ \sin\theta &amp; \cos\theta\end{bmatrix} \begin{bmatrix}u_x\\u_y\end{bmatrix} =
\begin{bmatrix}u_x \cos\theta - u_y\sin\theta \\ u_x \sin\theta + u_y \cos\theta \end{bmatrix}$$

Rotating a vector $u$ using complex numbers:
$$\begin{aligned}
(\cos\theta + i\sin\theta)(u_x + iu_y) &amp;= u_x\cos\theta + iu_y\cos\theta + iu_x\sin\theta - u_y\sin\theta \\
&amp;=(u_x\cos\theta - u_y\sin\theta) + i(u_x\sin\theta + u_y\cos\theta)
\end{aligned}$$

I wouldn't expect either one to be appreciably faster or slower than the other, since they all end up doing the same set of basic operations, i.e. 4 multiplies and 2 adds.

Conceivably, complex numbers could be faster when you have a large number of rotations stored in an array, because they have only two components instead of four and therefore more of them fit into each cache line.


  On a related note, is there some spatial transformation that complex numbers can do but matrices cannot?


No. Matrices are more general than complex numbers. Any complex number $z$ can be represented by a matrix as:
$$\begin{bmatrix}\text{Re}(z) &amp; -\text{Im}(z) \\ \text{Im}(z) &amp; \text{Re}(z) \end{bmatrix}$$
This corresponds to rotation by the phase of $z$ combined with scaling by the magnitude of $z$. Complex numbers can only represent rotation and uniform scaling. Matrices can represent those, but also nonuniform scaling and shearing. Another way to see it is that complex numbers have only two degrees of freedom, while 2×2 matrices have four degrees of freedom.