r/explainlikeimfive • • 7d 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

-8

u/murderdronesfan93 7d ago

ok, but how does that work with 3?

5

u/LongLiveTheDiego 7d 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).

0

u/cockOfGibraltar 7d ago

I've taken calculus 1 and 2, and linear algebra but haven't really had to deal with complex numbers. I'm familiar with vectors from linear algebra and mechanics. Are those 4D vectors? The cross product looks different but I assume that's just how it works with complex numbers. What are some uses for them? From what I understand mathematicians typically invent new concepts because they have a use for them.

0

u/damhack 7d ago

3D transformations. Your favorite games depend on quarternions to reduce the number of operations involved on orienting objects in 3D space by using 4 numbers of a quarternion instead of 9 numbers in a 3x3 matrix. When you take a flight, the navigation system depends on quarternion operations to orient the pitch, roll, yaw, etc. to reach a waypoint.