7/52: Mathematical exorcism – Quaternions, higher dimensions, fuera!

“Oh dear! Oh dear! I shall be too late!”

– The White Rabbit, Alice in Wonderland

And I am late, in a few ways. But join me in my rabbit-hole.

This is an exorcism of sorts. I found out the answer to a little question that was knocking around my brain for, oh, around 15 years…

Around 1987 I read a book called Chaos by James Gleick. This was something like a formative experience: being shown, in words and pictures, the strange ways nature (as well as man-made systems) could act: simple rules producing complex, “unpredictable” seeming behaviour; nature being self-similar on many levels (i.e. fractal); the way that order hides with disorder, and vice versa… The book also covers some of the interesting characters and situations around the emergence of Chaos theory.

One of many mad illustrations in the book caught my eye. It was a computer-generated picture showing a sort of colourful square divided into four colours, four segments, like a pie. But this psychedelically demented pie was odd: between two any two colours on it, the other two colours interposed themselves. Ad nauseam. Here’s that diagram, which I’ve recreated:

Newton-Raphson 'pie' diagram for solutions to z^4 = 1

[click image to see more on my flickr site]

This fractal diagram is borne of a certain question concerning complex numbers. I am sometimes perversely interested in higher dimensions and strange mathemagical things, so when I found out years ago that there was a higher dimensional extension to the complex numbers called Quaternions, I wondered how the above picture would extend in these higher dimensions – would it be particularly interested or mad?

In order to find out the answer, I wrote a visualisation tool in Processing that pretty much told me the answer… (Download processing script – zip file, 16K).

Then I went and looked at the mathematics behind Quaternions, and found out that the answer I was seeing in the visualisation was correct.

They say one of the best ways to make sure you have understood something is to explain it to someone else – so with that in mind, I’ve written up the full gory details of the ‘answer’ on the create52 cookbook.

(Note on quaternions: The Quaternions are a number system that can describe rotations (in 2, 3 and 4 dimensions), and they are an extension of Complex numbers. Like a lot of things that bear some sort of fruit in mathematics, the Quaternions were originally considered “mathematically pathalogical” (what a term).)

As penance for being somewhat lazy with getting this one out, I intend to do something with some utility next. Gawsh. Possibly something faceboot related, but actually useful with it…

One Response to “7/52: Mathematical exorcism – Quaternions, higher dimensions, fuera!


Leave a Reply