# Trigonometry Refresher for Complex Arithmetic

I am preparing a post and accompanying code to demonstrate the usefulness of using complex analysis in the context of computer programming. In order to prepare the blog post, I had to re-learn some trigonometry. Here's the main facts I needed as a refresher.

## Complex Number

A complex number $z$ is a number with “real” $Re(z)$ and “imaginary” $Im(z)$ parts. A complex numbers allows us to perform algebra with the $\sqrt{-1} = i$ as a well-defined concept.

Since complex numbers are simple to think about as rotations on the Cartesian XY plane, it's useful to recall the basic trigonometric functions and their common formulae.

## Unit Circle

Draw a right triangle onto the complex plane with $a = b$ and hypotenuse $r = 1$. The Pythagorean Theorem gives us lengths for $a$ and $b$ as

Division by an irrational number is a computationally fraught exercise. Try it by hand and think about what's involved: an infinite sequence of divisions plus one more once you're done. So it's easier to multiply by identity to bring the irrational number up top, like so

from which point you can find a suitable approximation for $\sqrt{2}$ and divide that approximation by $2$.

Note that there are two solutions $\frac{\sqrt{2}}{2}$ and $-\frac{\sqrt{2}}{2}$. We'll just take the positve solution for now (the negative is simply reflected across the origin).

## Basic Functions

From the above, we have a right triangle inscribed in the unit circle with sides of length $a = \frac{\sqrt{2}}{2}$, $b = \frac{\sqrt{2}}{2}$, and $r = 1$. And since $a = b$, the angles of the triangle must be $\pi / 4$, $\pi / 4$, and $\pi / 2$ adding up to $\pi$ or 180 degrees.

All this information allows us to describe the trigonometric functions

These functions have “flipped” versions

## Inverse Functions

Inverse trig functions are described by the definitions

For instance, if you know that $\sin \theta = \frac{\sqrt{2}}{2}$ then you can find $\sin^{-1} \frac{\sqrt{2}}{2} = \frac{\pi}{4}$. Why? Because $\sin \frac{\pi}{4} = \frac{\sqrt{2}}{2}$ as computed previously.

Trigonometic tables are usually employed rather than re-compute the functions and their inverese repeatedly; understanding the relation, however, is still important when simplyfying expressions.

## Summation and Difference Formulae

Not that the symbol $\mp$ is not a typo; the sign switches in those cases, eg. $\cos(\alpha + \beta) = \cos \alpha \cos \beta - \sin \alpha \sin \beta$.

It's best to commit these to sum/difference formulae to memory or keep handy someplace.

## More Trigonometry

Here's a useful cheat sheet to refresh your memory: Trig Cheat Sheet by Paul Dawkins.

Content by © Jared Davis 2019
Theme by © Emir Ribic 2017