# Thread: Complex verses Quaternion Question

1. ## Complex verses Quaternion Question

In Python, complex numbers are typed as follows: 3+4j. This kinda bugs me that they use "j" instead of the traditional "i", particularly because quaternions (4-dimensional complex numbers) use i, j, and k for the three "imaginary" directions, so this would cause some overlap. But then I got to thinking ... would using the "j" from a quaternary system be any different than using the "i"? Don't they each have the same properties relative to the real number line? I'm fairly certain they do, but my knowledge of quaternions comes almost exclusively from Youtube and Wikipedia, so I'd like to hear an actual expert's opinion.

2. ## Re: Complex verses Quaternion Question

The only requirement we put on $i$ to get the complex numbers is that $i^2 = -1$

the other two unit quaternions share this property so there would be no difference in the complex numbers generated with respect to the real axis.

3. ## Re: Complex verses Quaternion Question

Hey Flexico.

You need to look up the multiplication tables for a quaternion to understand the algebra.

The intuition involves making it a division algebra - meaning you can do things like do a*b/b = a [i.e. you can do divisions and they act like real numbers algebraically]. This is what the inventor of Quarternions Sir William Rowan Hamilton was trying to do when he was thinking about their construction.

The understanding algebraically would be to understand multiplications on the unit sphere and you could write some code to do that if you are keen.

4. ## Re: Complex verses Quaternion Question

Originally Posted by Flexico
In Python, complex numbers are typed as follows: 3+4j. This kinda bugs me that they use "j" instead of the traditional "i" ....
The use of $\bf{j}$ for the imaginary unit is the convention in engineering (probably to avoid confusion with the symbol for electrical current).

.

5. ## Re: Complex verses Quaternion Question

Originally Posted by zzephod
(probably to avoid confusion with the symbol for electrical current)..
definitely to avoid confusions with the symbol for electric current

6. ## Re: Complex verses Quaternion Question

Originally Posted by romsek
definitely to avoid confusions with the symbol for electric current
Well if you Engineers would just use "I" for current like any self-respecting Physicist we wouldn't have this problem!

-Dan

7. ## Re: Complex verses Quaternion Question

Originally Posted by topsquark
Well if you Engineers would just use "I" for current like any self-respecting Physicist we wouldn't have this problem!

-Dan
as opposed to "i" ?

8. ## Re: Complex verses Quaternion Question

Originally Posted by romsek
as opposed to "i" ?
Well, yeah! I mean, geez! Currants are important enough to use a capital letter with.

-Dan

9. ## Re: Complex verses Quaternion Question

Originally Posted by topsquark
Well, yeah! I mean, geez! Currants are important enough to use a capital letter with.

-Dan

10. ## Re: Complex verses Quaternion Question

Originally Posted by romsek
The only requirement we put on $i$ to get the complex numbers is that $i^2 = -1$

the other two unit quaternions share this property so there would be no difference in the complex numbers generated with respect to the real axis.
Ah cool, that's what I was thinking. Thanks for the confirmation!

Originally Posted by topsquark
Well if you Engineers would just use "I" for current like any self-respecting Physicist we wouldn't have this problem!

-Dan
Ahahaha seems my question touched a few nerves. XD
Also, in the Python module "Sympy" a capital "I" is used for the imaginary unit, so yay for confusion!

11. ## Re: Complex verses Quaternion Question

Originally Posted by chiro
Hey Flexico.

You need to look up the multiplication tables for a quaternion to understand the algebra.

The intuition involves making it a division algebra - meaning you can do things like do a*b/b = a [i.e. you can do divisions and they act like real numbers algebraically]. This is what the inventor of Quarternions Sir William Rowan Hamilton was trying to do when he was thinking about their construction.

The understanding algebraically would be to understand multiplications on the unit sphere and you could write some code to do that if you are keen.
Yes, I have seen the multiplication table. The algebraic approach seems solid enough, though my tendency in most cases is to calculate things visually, and trying to picture the 4-D space in which quaternions exist often leaves something to be desired. The idea of multiplications being non-commutative takes some getting used to.

12. ## Re: Complex verses Quaternion Question

For reference here is one of many discussions on stackoverflow about the imaginary unit choice in Python.

13. ## Re: Complex verses Quaternion Question

[QUOTE=Flexico;911613 The idea of multiplications being non-commutative takes some getting used to.[/QUOTE]

ever deal with matrices?

14. ## Re: Complex verses Quaternion Question

Originally Posted by romsek
ever deal with matrices?
Surprisingly little! I switched schools between Algebra I and Algebra II, and managed to skip the matrix lesson entirely (without realizing it at the time). I've taken several Calculus courses in college, but never really worked with matrices.

Oh, but I have worked with the matrix data type on my graphing calculator, mostly using them as data storage when programming games. XD Never actually did operations on them though.

15. ## Re: Complex verses Quaternion Question

Originally Posted by Flexico
Surprisingly little! I switched schools between Algebra I and Algebra II, and managed to skip the matrix lesson entirely (without realizing it at the time). I've taken several Calculus courses in college, but never really worked with matrices.
ah. Well you'll find that they aren't commutative w/respect to multiplication either.

Page 1 of 2 12 Last