Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

My mathematica Input[In] code:

***q = Quaternion[0.1, 0.2, 0.3, 0.4]

Resepective results[Out] from Mathematica 9.0:

Quaternion[0.1, 0.2, 0.3, 0.4]
Quaternion[-0.601986, 0.51519, 0.772785, 1.03038]

Theoretically scalar of Log of Quaternion should be zero.But Mathematica generated result not equal to zero. Quaternion[-0.601986, 0.51519, 0.772785, 1.03038] this should be Quaternion[0.0, new X, new Y, new Z] What is the reason for this issue?

share|improve this question
The scalar of the log of a unit quaternion is zero. q is not a unit quaternion. –  Rahul Feb 27 '14 at 4:48
thanks..which means I should Normalize "q" and execute Log[Norm q] –  Buddhika Chaturanga Feb 27 '14 at 4:50
Yes, you can do qNormalized = q/Sqrt[Norm[q]] and evaluate Log[qNormalized]. Mathematically it should be $q/\|q\|$, but for some reason Mathematica defines Norm[q] to be $\|q\|^2$ instead. –  Rahul Feb 27 '14 at 4:52
Thank you Rahul Narain.yeah you are correct Normalize command does not work for quaternions as we expected.Ex: q=Quaternion[1,1,1,1] Normalize[q] =>Quaternion[1/4,1/4,1/4,1/4] –  Buddhika Chaturanga Feb 27 '14 at 5:04
Mathemtica help doc expressed that: Norm[w] -the sum of the squares of the components of w –  Buddhika Chaturanga Feb 27 '14 at 5:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.