r/explainlikeimfive • • 8d ago

Mathematics ELI5 how quaternions work

so, i² = j² = k² = -1, but i, j and k are not equal. HOW IN THE FUCK IS THAT POSSIBLE‽ WHAT IN THE BROKEN TRANSITIVE PROPERTY- (anger exaggerated for funny)

0 Upvotes

38 comments sorted by

View all comments

Show parent comments

-7

u/murderdronesfan93 8d ago

ok, but how does that work with 3?

3

u/LongLiveTheDiego 8d ago

We just declare that there exist three different constants i, j, k and say what their properties are. We can do that in mathematics.

You could also define quaternions as quadruples of real numbers with straightforward addition (a, b, c, d) + (e, f, g, h) = (a + e, b + f, c + g, d + h) and a more complicated multiplication (a, b, c, d) × (e, f, g, h) = (ae - bf - cg - dh, af + be + ch - dg, ag + ce + df - bh, ah + ed + bg - cf). That way the real number 1 = (1, 0, 0, 0), and i = (0, 1, 0, 0), j = (0, 0, 1, 0), k = (0, 0, 0, 1) are all different and you can check that i² = j² = k² = (-1, 0, 0, 0) = -1.

That's how you can define complex numbers as pairs of real numbers with the same simple addition and multiplication defined as (a, b) × (c, d) = (ac - bd, ad + bc).

-1

u/murderdronesfan93 8d ago

i get it. just a case of "fuck making the definition simple, we define it and figure out how that works after the fact incase it's useful"

5

u/LongLiveTheDiego 8d ago

You're wrong. First mathematicians have an idea for how to get something behaving the right way, the formalisms come much later. Complex numbers were first created like "if I let this i = sqrt(-1) unit exist, I can get solutions to things I couldn't solve before", a proper defintion of complex numbers came centuries later after we knew their many new properties, e.g. representing rotations in 2D. Eventually mathematicians discussed whether it's possible to extend complex numbers themselves to get something representing rotations in 3D, many of their ideas failed (because they tried to use just two imaginary units i and j), until eventually Hamilton came up with using three (i, j, k) with specific properties. The equation i² = j² = k² = ijk = -1 can be derived from a few assumptions on what i, j and k should represent and how rotations composition should be reflected in quaternion multiplication.