## Tuesday, May 9, 2017

### It isn't trig, or geometry, or analysis: it's maths.

We all learn the standard trigonometry function addition formulae at school: $\begin{split} \sin(\theta+\phi) &= \sin(\theta)\cos(\phi)+\cos(\theta)\sin(\phi)\\ \cos(\theta+\phi) &= \cos(\theta)\cos(\phi)-\sin(\theta)\sin(\phi). \end{split}$ There are many ways to see the truth of these. Let's take a look at two of them, and the relationship between them.

# Geometry

Since a rotation by the angle $$\theta$$ about the origin in the Euclidean plane is described by the matrix $R(\theta) = \left[ \begin{array}{cc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right],$ it follows that a rotation by $$\theta$$ followed by a rotation by $$\phi$$ results in a rotation by $$\theta+\phi$$. In terms of the matrices, $\begin{split} R(\theta+\phi) &= R(\theta)R(\phi) \\ &= \left[ \begin{array}{cc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right] \left[ \begin{array}{cc} \cos(\phi) & -\sin(\phi) \\ \sin(\phi) & \cos(\phi) \end{array} \right]\\ &= \left[ \begin{array}{cc} \cos(\theta)\cos(\phi)-\sin(\theta)\sin(\phi) & -\sin(\theta)\cos(\phi)-\cos(\theta)\sin(\phi) \\ \sin(\theta)\cos(\phi)+\cos(\theta)\sin(\phi) & \cos(\theta)\cos(\phi)-\sin(\theta)\sin(\phi) \end{array} \right]\\ &= \left[ \begin{array}{cc} \cos(\theta+\phi) & -\sin(\theta+\phi) \\ \sin(\theta+\phi) & \cos(\theta+\phi) \end{array} \right], \end{split}$ so comparing the entries of the matrices, we obtain the addition formulae.

There's actually quite a bit going on here.
1. First, this works no matter the size (or sign) of $$\theta$$ and $$\phi$$. If we can just remember that $$\sin(-\theta)=-\sin(\theta)$$ and $$\cos(-\theta)=\cos(\theta)$$ then formulae for $$\cos(\theta-\phi)$$ and $$\sin(\theta-\phi)$$ come along for the ride.
2. Second, although matrix multiplication is not generally commutative, in this case it is: $R(\theta+\phi) = R(\theta)R(\phi) = R(\phi)R(\theta) = R(\phi+\theta).$
So, thinking in terms of angles of rotation rather than just angles at a corner of a triangle, we get a nice intuitive derivation of the addition formulae.

# Analysis

On the other hand, we have some intriguing formulae. The power series for the exponential function is very familiar: $\exp(x) = 1+x+\frac{x^2}{2} + \ldots + \frac{x^n}{n!} + \ldots$ But now if we replace the real value $$x$$ by the purely imaginary one $$i\theta$$ we have $\begin{split} \exp(i\theta) &= 1 + i\theta - \frac{\theta^2}{2} -i\frac{\theta^3}{3!} + \ldots \\ &= 1-\frac{\theta^2}{2}+\frac{\theta^4}{4!} + \ldots + i(\theta-\frac{\theta^3}{3!} + \ldots)\\ &= \cos(\theta) + i \sin(\theta). \end{split}$ Putting this together with $\exp(x+y) = \exp(x)\exp(y)$ we have $\begin{split} &\cos(\theta+\phi)+i\sin(\theta+\phi)\\ &= \exp(i(\theta+\phi))\\ &= \exp(i\theta)\exp(i\phi)\\ &= (\cos(\theta)+i\sin(\theta))(\cos(\phi)+i\sin(\phi))\\ &= (\cos(\theta)\cos(\phi)-\sin(\theta)\sin(\phi)) + i(\cos(\theta)\sin(\phi)+\sin(\theta)\cos(\phi)). \end{split}$ So again, this time by matching up the real an imaginary parts, we get the addition formulae.

# Maths

These calculations are weirdly similar. There's obviously something going on here. So, what's the connection between the matrices and the complex exponentials?

I claim that they're really just different ways of representing the same thing, and we can see this in terms of complex numbers, where we use the fact that the complex number $$z=x+iy$$ can be thought of as the point $$(x,y)$$ with position vector $$\left[ \begin{array}{c} x\\y \end{array} \right]$$.

To see this, let's take a complex number $$z=x+iy$$ and multiply it by $$\exp(i\theta)$$: we have $\begin{split} \exp(i\theta)z &= (\cos(\theta)+i\sin(\theta))(x+iy)\\ &= \cos(\theta)x-\sin(\theta)y +i(\sin(\theta)x+\cos(\theta)y). \end{split}$ Alternatively, we could take the vector $$\vec{z}=\left[\begin{array}{c} x \\ y\end{array} \right]$$ and multiply it by $$R(\theta)$$. That gives $\begin{split} R(\theta) \vec{z} &= \left[ \begin{array}{cc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right] \left[\begin{array}{c} x \\ y\end{array} \right]\\ &= \left[\begin{array}{c} \cos(\theta)x-\sin(\theta)y \\ \sin(\theta)x+\cos(\theta)y \end{array} \right] \end{split}$ We can see that there is a common structure here. By converting between the complex number $$z$$ and the vector $$\vec{z}$$ and simultaneously between the exponential $$\exp(i\theta)$$ and the matrix $$R(\theta)$$, we convert between the analytic picture and the geometric one.

So, why did I call this last section maths? Weren't the geometry and analysis maths? Well, yes, of course they were, and (at least to my taste) both are good fun. But seeing that two apparently different structures and really one and the same but in two different guises is somehow a particularly satisfying, and even mathsier part of mathematics.