2015-07-31 03:33:17 +0200 asked a question How do I multiply quaternion and vector? I started with this N. = QQ[] H. = QuaternionAlgebra(c,d) a = a1 + a2 * i + a3 * j + a4 * k b = b1 + b2 * i + b3 * j + b4 * k a+b a*b  but the next step does not work gravity = vector([0, 0, 1]) a * gravity * a.conjugate()  2015-07-31 03:24:53 +0200 received badge ● Editor (source) 2015-07-31 03:24:24 +0200 answered a question How to do symbolic computation with quaternions N. = QQ[] H. = QuaternionAlgebra(c,d) a = a1 + a2 * i + a3 * j + a4 * k b = b1 + b2 * i + b3 * j + b4 * k a+b a*b  Seems to give better results Now I just need to figure out how to define vector and rotate it with quaternion.