Why was this moved? This thread is program-agnostic. Oh well...
DarkBeam you mean the two-edged variants?
I'll give you the formulae but I'd urge you to learn to read the multiplication tables too: They are super useful, pretty straight forward and nicely compact. I'll try to explain them to you first.
Let's start with the simplest possible multiplication table:
To read it, you go "first of row times head of column equals entry".
Let's read the first row. Its leftmost entry is 1. So we know it's
.
Next, read the head of the column. It's another 1. So we know it's
.
Finally, the point where they meet is another 1. So we now know that, in this system,
. How exciting!
Ok that was, perhaps, overly simple. Let's try a 2D table, say, for the complex numbers:
The very first entry is the same as before. It follows the exact same process as above.
.
Next, what about the second row first column?
Left most: i
Head: 1
Meet: i
Now let's check the first row second column:
Left: 1
Head: i
Meet i
A multiplication table that's symmetric along its primary axis, like this one, is commutative.
Finally: Row 2 Column 2:
Left: i
Head: i
Meet: -1
If you want to read off the actual product of two arbitrary numbers given a multiplication table, you can also "quickread" it: Go through it from top to bottom (or from left to right either will do, just don't confuse your multiplication order: left side times top side!) for each of your unique elements. you can quickly collect all the terms right away. For instance, and please try following along, then it should be clear, let's take the table I termed Digon:
Find all 1s:
1*1 (from row 1 column 1)
i*i (row 2 column 2)
k*k (row 3 col 3)
ik*ik (r 4 c 4)
so if you call your number, say, a = a1 + ai i + ak k + aik ik and b = b1 + bi i + bk k + bik ik, we just found that the first result is:
c1 = a1 b1 + ai bi + ak bk + aik bik
Next, all the
is:
1*i (1 2)
i*1
k*ik
ik*k
thus
ci = a1 bi + ai b1 + ak bik + aik bk
Next, all the ks:
1*k
i*ik
k*1
ik*i
ck = a1 bk + ai bik + ak b1 + aik bi
and finally, all iks:
1*ik
i*k
k*i
ik*1
cik = a1 bik + ai bk + ak bi + aik b1
in summary:
c = (a1 b1 + ai bi + ak bk + aik bik) * 1 + (a1 bi + ai b1 + ak bik + aik bk) * i + (a1 bk + ai bik + ak b1 + aik bi) * k + (a1 bik + ai bk + ak bi + aik b1) * ik
Since this happens to be commutative (the multiplication table is symmetric along the major axis), this simplifies quite nicely in the case where a = b:
a² = (a1² + ai² + ak² + aik²) * 1 + 2 * (a1 a1 + ak aik) * i + 2 * (a1 ak + ai aik) * k + 2 * (a1 aik + ai ak)
I suspect this to look rather boring. It's probably, as said before, just the split-complex quaternions? Although I can't recall whether those would commute as this does.
The other two tables, at any rate, do not commute, so something different must go on there.
So next, "Two Edges Infacing". - By the way, the labels I chose are, of course, arbitrary for the resulting multiplication table. They did come from what operations are possible at any given moment on a pair of edges connected at one end though. That's why "Two Edges Outfacing" doesn't have k on its own but it DOES have iki.
Anyway, here we go:
1:
1 1
i i
k k
ik k
c1 = a1 b1 + ai bi + ak bk + aik bk
i:
1 i
i 1
k i
ik k
ci = a1 bi + ai b1 + ak bi + aik bk
k:
1 k
i ik
k 1
ik ik
ck = a1 bk + ai bik + ak b1 + aik bik
ik:
1 ik
i k
k ik
ik 1
cik = a1 bik + ai bk + ak bik + aik b1
c = a1 b1 + ai bi + ak bk + aik bk + i (a1 bi + ai b1 + ak bi + aik bk) + k (a1 bk + ai bik + ak b1 + aik bik) + ik (a1 bik + ai bk + ak bik + aik b1)
c = a1 b1 + ai bi + (ak + aik) bk + i (ai b1 + (a1 + ak) bi + aik bk) + k (a1 bk + ak b1 + (ai +aik) bik) + ik (ai bk + (a1 + ak) bik + aik b1)
if a = b:
a² = a1² + ai² + ak² + (aik + ak) ak + i (2 a1 ai + (ai + aik) ak) + k (2 a1 ak + (ai + aik) aik) + ik (2 a1 aik + (ai + aik) ak)
and finally, outfacing:
1:
1 1
i i
ki i
iki iki
i:
1 i
i 1
ki iki
iki i
ki:
1 ki
i iki
ki 1
iki ki
iki:
1 iki
i ki
ki ki
iki 1
c = a1 b1 +ai bi + aki bi + aiki biki + i (a1 bi + ai b1 + aki biki + aiki bi) + ki (ai biki + aki b1 + (a1 + aiki) bki) + iki (a1 biki + (ai + aki) bki + aiki b1)
if a = b:
a² = a1² + ai² + (ai + aiki) aiki + i (2 a1 ai + (ai + aiki) aiki) + ki (2 a1 aki + (ai + aki) aiki) + iki (2 a1 aiki + (ai + aki) aki)
I hope that helps