Saturday, August 6, 2022

Octonions

I'm trying to learn about octonions. Rather than standard descriptions, these are some of my own thoughts, not all will necessarily be accurate as they're quite complicated beasts. I have added a more thorough set of information here

It is helpful to describe them in terms of the other division algebras:

  1. The complex numbers describe rotation in one plane (2D) plus scale. That is two degrees of freedom, so one complex number is applied in the multiply, giving a binary operator: 
  2. The quaternions describe rotations in two planes (4D) plus scale. That requires two quaternions to apply in the multiply, so fundamentally it is a trinary operator. q1 and q2 together rotate q:
  3. The octonions describe rotations in 4 planes (8D) plus scale. That requires four octonions to apply in the multiply, so fundamentally it is a 5-ary operator:

People don't use the multiply syntax quite as above, but I think that is a clearer way to describe what is happening, because using those operators each one is describing a full rotation in 2D, 4D and 8D respectively. The usual description is that it requires 7 octonion multiplies to generate a full 8D rotation, but that is when all multiplies work the same way. In On Quaternions and Octonions (A.K. Peters 2003) they get down to SO(8) from 5 multiplications as long as they aren't all left, all right or all bimultiplies (a left and right by the same octonion). The '5-ary' multiply above is four multiplications, but we pull from more than just left and right multiplies, so it seems reasonable that it could represent SO(8). I'll explain using the quaternions as an example.

A single quaternion left-multiply rotates in one plane that contains the (1,0,0,0) vector, and by an equal angle in the orthogonal plane. The right multiply does the same thing but rotates about the negative angle in the orthogonal plane. This combination of a ++ with a +- by a different angle value allow any combination of two angles, giving a full rotation. 

For octonions there are four planes that the rotation angle can be positive or negative on. This doesn't leave enough room with just left and right multiplies for all of the combinations. We want to rotate using ++++, ++--, +-+- and +--+ by different angles for each, which achieves the full set of rotations. That would require an "up multiply" and "down multiply" or some such label. In the 5-ary operator above o1,o2,o3 and o4 would each use a different one of these multiplies.

You can of course still define the usual quaternion or octonion multiply, and these single binary operations both apply a 'special rotation' by which I mean a subset of the full set of rotations. For quaternions that is a self-dual or isoclinic rotation, which means by the same angle on two orthogonal planes, and for octonions it is by the same angle on four orthogonal planes. 

You can also negate the extra rotation planes to leave a 'simple rotation' meaning a rotation around a single plane. For quaternions that is or in usual syntax:. For octonions it is:or something similar. The idea is that the ++++, ++--, +-+-, +--+ sum together to give 4,0,0,0 times whatever the rotation angle was. This means that octonions would be a quadruple cover of the space, when used for simple rotations.

Note that octonion multiplication only rotates 8D vectors, not 8D rotations. While the above complex number and quaternion multiplications are equivalent to vector transformation  and matrix (SO(n)) transformation , octonions are only equivalent to the vector transformation. That is because 8D rotations are SO(8) which can be represented by an 8x8 orthonormal matrix, and matrix multiplication is associative, unlike for octonions.

In summary:

  • Complex, Quaternion and Octonion numbers all support three types of rotation:
    • a 'full rotation' (binary, trinary and 5-ary operators), by different angles for each plane
    • a 'special rotation' (isoclinic), which is the standard binary product operator
    • a 'simple rotation' which is in a single plane
  • It is just that for complex numbers, the three are the same.
  • while quaternion (and complex number) multiplication rotates both vectors and other isoclinic rotations, octonion multiplication only rotates (8D) vectors, it cannot be thought of as an 8D isoclinic rotation under multiplication. 

If we define Is(n) to be the set of isoclinic rotations from SO(n) then this is a better way to summarise:


The - at the bottom indicates that 8D isoclinic rotations do not form a group under octonion multiplication. Indeed, it is true that 8D (and any higher order) isoclinic rotations are not a group. So they do not form a subgroup of SO(8).

Friday, July 8, 2022

Quaternions and Anti-twisters

Anti-twisters are a motion of 3D space that allows the centre of the space to rotate continually without the rest of the space getting tangled up. If we think of the space as a number of strings or belts coming from the centre, then the word tangled makes more sense. The process is also basically the same as the belt trick, tangloids and is the topic of orientation entanglement

In this gif you can see the central cube rotating continually and the six belts attach the cube to the rest of the space, without getting tangled up. The same trick works regardless of how many strings you have:
we can think of this at its limit as the whole continuous 3D space rotating in a manner that avoids overlap. 

The method is simpler than it looks. Each frame is calculated independently: it starts with a set of radial belts (or the red band in this video), then rotates them by around the blue axis as shown. i.e. from 0 at the outer radius, up to 180 degrees in the centre.


That becomes the state of your radial belts for that frame. For the next frame the blue axis is at a new orientation in the horizontal plane, as shown.


If you look carefully at the first video, you might see that the central object rotates twice before the belts (the 3D space) returns to its start position. The same is true for quaternions, orientations are represented as a (w,x,y,z) quantity, which only returns to the same value after rotating 720 degrees. 

So is there a connection between anti-twisters and quaternions?

Looking at the first video, the overall motion is simply an extended version of the motion of the two vertical belts, which look like this:

These two '?' shaped belts rotate around the vertical axis, and also rotate around their own axis by the same (but opposite) angle. The box ends up spinning twice the angle of either individual rotation.

If we look at just the top belt, and distort it slightly then we can draw it as two of the same belt shapes, just different sizes. Here in red and green:
From the top to the bottom, the red belt rotates around the vertical axis by angle A, and around its own axis by angle -A. The green belt rotates around the vertical axis by angle A and around its own axis by angle A. The combined motion rotates the inner cube the angle 2A around the vertical axis.

Unit quaternions also rotate around two independent axes by equal angles. We could describe it in 4D but it is easier to visualise in 3D by taking the stereographic projection of the quaternion space around the w axis. In this projection the two axes of rotation are the two axes of a torus, so around the torus and around its ring (a non-straight axis). Let's make the torus's axis of symmetry vertical here, to match the anti-twister example.

A quaternion rotation of a vector v is first a right multiply vq' (the conjugate of q) which rotates the vector around the vertical axis by angle A and around its ring by angle -A:


Then a left multiply qv rotates around the vertical axis by angle A and around its ring by angle A. The result qvq' rotates an angle of 2A around the vertical axis.

So as you can see, there is some similarity between a single quaternion multiplication and the transformation applied by the green or red belt in the anti-twister motion. 

They aren't exactly the same, but it would be tempting to say that a quaternion is a representation of half the anti-twister mechanism, and quaternion multiplication qvq' is a representation of the whole anti-twister mechanism, which itself is just a way of describing the interval of 3D space between the inner and outer radius, a bijection from R3 to R3 (it wouldn't be a bijection if the belts ever overlapped).

HOWEVER, there is one problem with this identification of quaternions and anti-twisters. The anti-twister maintains a state, which is the yaw of the blue axis in the third video. The central object turns according to where the blue axis orients to, but the blue axis can only change in two dimensions, it has no effect if it twists (rotates about its own length). If you jump the blue axis to a different angle in order to modify the central rotation in any of its three possible degrees of freedom, then the belts still wouldn't tangle, but they could (probably) get an unlimited amount of stretch. 

I am not sure to what extent this is a problem with the identification. It may be that it is better to identify the quaternion with the superposition of belt configurations for all possible blue-axis orientations, or something like that. 

Some more details are given here.

Monday, June 27, 2022

8 types of shape

A random thought from the other day is that shapes can be categorised by the presence or not of faces, edges and corners. That's a 3D table so I'll fill it in as two 2x2 tables:

faces:





Edges No edges
Corners
No corners


no faces:





Edges No edges
Corners
No corners   .

For the object with no faces but edges and corners, you can see the corners as protrusions on the top side, and the edges when viewed on the bottom side.

The spikey object (bottom left) with only appears to have corners because I have cropped it to finite size, but the basic structure is unbounded and all those corners connect to another to make continued curved edges.

The object with no faces, corners or edges is probably just a point, or just nothing.

Tuesday, June 21, 2022

Many-valued Polynomials

Multi-valued algebra promises to help with multi-valued problems such as: if x^2=1 and y = 2x then what is x+y? They aren't super popular as it is hard to make them into them into something consistent like a proper mathematical field. But never mind hey.

Let's define a multi-valued algebra as one where each element is a closed set of complex numbers, let's call the set of such closed sets M. Equality is set equality, summation is the Minkowski sum, and subtraction is the inverse of the Minkowski sum (which doesn't always have a solution).

Let's use capital letters for members of the multi-valued algebra, and lower case letters for single complex numbers.

In this system a 'complex linear multi-valued polynomial' means the complex-valued function:

y = aX + b

Which only occurs when X has a single element, so not very interesting.

a 'complex quadratic multi-valued polynomial' is:  

y = aX^2 + bX + c

which for the specific case a=1, b=-1, c=0, can be written as:

X = X^2 + y

which is reminiscent of the Julia set iteration for each y. 

Indeed the value of X is indeed a Julia set of that complex number, as it is the largest closed set that satisfies the equation. It also remains a Julia set when a,b,c are different values, just with a Euclidean transform applied.

So the function M->C is defined for Julia sets, and each Julia set is the preimage of its corresponding parameter y.

If we 'expand out' the domain into its individual complex elements then the function becomes a many-to-many map m(z): C->C, and m(0) is the Mandelbrot set. So the Mandelbrot set is the image of the number zero under this mapping. More generally m(x) are the generalised Mandelbrot sets that start at point x.  

Above: m(0.3i) and m(0.3-0.3i), these are variants of the Mandelbrot set.


We could approximate this idea by saying that the quadratic polynomial's "multivalue-range" is the generalised Mandelbrot sets, and its domain is the Julia sets.

While we have done a lot of hand waving here, the interesting result is that Julia sets and Mandelbrot sets are fundamental elements of multi-valued quadratics. Fixed y cross section is a Julia set and the fixed z cross section is a Mandelbrot set. 

I haven't explored higher order polynomials, but it seems probably that these produce higher order Julia sets and the higher order 'multibrots', and perhaps linear combinations of these at each order.


This is a nice idea as it suggests that Julia and Mandelbrot/Multibrot sets are the fundamental elements of this multi-valued algebra. If we make the leap that standard algebra is missing something in its inability to answer questions such as the initial one, then we may even consider Julia and Multibrot sets to be fundamental quantities more widely in algebra.

To add to this, the Multibrot sets are universal objects, which loosely means that you will find them in bifurcating mappings. 


The mapping m() can also be seen as a four dimensional shape. In this shape the Julia sets are the horizontal cross-sections, and the generalised Mandelbrot sets are the orthogonal cross-sections. It would be interesting to see what diagonal cross-sections look like.

Wednesday, June 15, 2022

Disk Cluster

 Here is a nice example of a cluster.


A cluster is a recursive set of separated solids. It isn't too hard to make an example of one using squares, but harder with disks. In this case I wanted an example with no smooth (differentiable) surface, just as the Koch curve and other fractals have no smooth parts to them. 

It is a little hard to see in the image above, but you couldn't 'land' on any of these disks as there are increasingly small disks towards the surface. 

My first attempt was quite interesting because it contains a Koch snowflake within it (can you see it?):

But the relative structure between clusters changes as you go inwards towards the centre, it also means that the outer shape almost definitely self-connects so isn't a cluster at all. 

The top image however applies Mobius transformations to each cluster so that the gap between clusters remains similar all the way down. Everywhere is disconnected, and it also gives it nice point corners.

A less spikey cluster can be achieved by rotating the shape each iteration:



Saturday, February 19, 2022

Mean Brownian Paths



Brownian motion is a pure random process and produces paths that are each and very squiggly. In fact so squiggly that their fractal dimension is 2. 

But what about the shape of the path on average?

For any particular section of a random (Brownian) path, we can perform a least squares alignment of every such path and draw the mean path shape:

It is straight because there are as many trajectories that bend anticlockwise as those that bend clockwise. But we are interested in paths rather than trajectories, and the time direction doesn't matter with paths. So here we find the closest Euclidean alignments for either time direction:

It is (I very much suspect) a circular arc. The angle of rotation of this arc would be an interesting constant to discover, it seems to be 1 radian, but that is a rough guess. The bulge is about 0.152 of the arc length, which is interesting because that is exceedingly close to the proposed solution to Moser's worm problem, which is an arc displaced 0.1528 at the centre (An Improved Upper Bound for Leo Moser’s Worm Problem). Moser's worm problem is to find the minimum area shape to accomodate unit length curves, the above curve is the mean unit length curve, because Brownian motion over a unit length is statistically the set of all unit length curves with no bias. So it is interesting that the minimal area shape is potentially a reflected pair of these mean curves:

potential minimum area solution to Moser's worm problem. Bounded by two similar arcs to the mean Brownian path.

The mean curve has bilateral symmetry because we don't allow mirroring in our equivalence class of path shapes. If we do allow mirroring we get:

The two images were for a different number of vertices and different random values, to show that the shape is consistent. This is an average path if you allow flipping, so its mirror image is the other equivalent average path.

You might be wondering what would happen if you don't allow time symmetry but you do allow mirror symmetry. The result appears to be exactly the same as just time symmetry and no mirror symmetry. This makes sense to me. 




Brownian motion in 2D inevitably crosses over itself to form a loop. If we look at just these loops when we get a similar set of results. If time symmetry is disabled then the average circuit is a straight line back-and-forth motion:
If it is enabled then we get a bilaterally symmetric shape:
Here are the points (separate run):


and if we allow mirroring in our equivalence class then we get this funny shape:
and its reflection  (separate run):
We generate these loops because each axis in 2D is performing Brownian motion, which we can model at large scale as a normally distributed offset between each point in turn. In order to get a loop we need each axis to return to the original value, which is called a Brownian bridge. Rather than running a million times until it happens to return to the same value, we simply subtract the linear function from start to finish, which is proven to be equivalent. 


So there we go. Since Brownian motion is a purely random process, these shapes are sure quite relevant as the bulk shape traced by random paths and random loops. We might even think of them as archetypal paths and loops, as they don't seem to contain any prior information, just randomness.

Since there is no prior information in the formulation, the shapes are pretty much definied by the equivalence class used. If you know what your symmetries are when declaring two shapes to be the same, then this dictates what the shape will look like; the result is a function of your interpretation of what a shape is.  

Wednesday, August 25, 2021

Between a tetrahedron and a sphere

What's in between a tetrahedron and a sphere? You could smooth the tetrahedron partially but this no longer has any flat sides, or you could go to higher solids like an octahedron then an icosahedron, but these still have sharp edges, unlike a sphere.

A polyhedron has C0 continuity and a sphere has Cinfinity continuity. It makes sense that an intermediate could have C1 continuity, which is what this shape has:

We start with a tetrahedron:

then slice off the corners and the edges:
and repeat:
the limit as the iterations goes up is:

I am just showing the edges, but this is a convex solid with flat surfaces in all the circles. In this one the corners are cut off so the slices touch, and the edges cut off one third of the way along the sliced edges. The result has octahedral symmetry, with 8 largest circle faces. 

It is C1 continuous because its face angles (the first derivative) follow a devil's staircase function across an edge, this is a continuous function. 

Here's the solid object:

and here's the same thing but starting with a cube:

Here is the Octahedral rendered with transparency and refraction: