Using the hamilton product, we can rotate a vector using a quaternion. Suppose vector is $$ v = {0, v_1, v_2, v_3} $$ and after rotation it is $v'$ and $$ Q = {q_0, q_1, q_2, q_3}. $$ So function to rotate by quaternion is $$ f(rot) = QvQ' $$. Now what I want is to rotate the vector back to $v'$ from $v$. I have tried $$ Q'v'Q $$ where $Q'$ is the conjugate but it does not seem to work. How do I calculate the original vector after it was rotated using $Q$?
2026-03-29 14:55:30.1774796130
Quaternion vector rotation
978 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in MATRICES
- How to prove the following equality with matrix norm?
- I don't understand this $\left(\left[T\right]^B_C\right)^{-1}=\left[T^{-1}\right]^C_B$
- Powers of a simple matrix and Catalan numbers
- Gradient of Cost Function To Find Matrix Factorization
- Particular commutator matrix is strictly lower triangular, or at least annihilates last base vector
- Inverse of a triangular-by-block $3 \times 3$ matrix
- Form square matrix out of a non square matrix to calculate determinant
- Extending a linear action to monomials of higher degree
- Eiegenspectrum on subtracting a diagonal matrix
- For a $G$ a finite subgroup of $\mathbb{GL}_2(\mathbb{R})$ of rank $3$, show that $f^2 = \textrm{Id}$ for all $f \in G$
Related Questions in ROTATIONS
- Properties of a eclipse on a rotated plane to see a perfect circle from the original plane view?
- why images are related by an affine transformation in following specific case?(background in computer vision required)
- Proving equations with respect to skew-symmetric matrix property
- Finding matrix linear transformation
- A property of orthogonal matrices
- Express 2D point coordinates in a rotated and translated CS
- explicit description of eigenvector of a rotation
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
- How to find a rectangle's rotation amount that is inscribed inside an axis-aligned rectangle?
- Change of basis with rotation matrices
Related Questions in QUATERNIONS
- Intuition behind quaternion multiplication with zero scalar
- Universal cover $\mathbb{S}^3 \rightarrow SO(3)$ through Quaternions.
- Variance of a set of quaternions?
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
- How many different quaternions $q$ are in a satisfying equation $q^2 = 1$?
- Dual quaternions displacement
- Why quaternions is a group?
- Why does the real part of quaternion conjugation with a pure quaternion stay 0?
- derive quaternion from rotation matrix, via eigenvector
- Complex and Quaternionic Matrices(Book)
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
You have adopted the scalar-vector notation of quaternions with $$Q = \pmatrix{ s \\ \boldsymbol{v} } \tag{1}$$
and the inverse
$$ Q^{-1} = \frac{Q^\star}{\sqrt{s^2 + \| \boldsymbol{v} \|^2}} = \frac{1}{\sqrt{s^2 + \boldsymbol{v}\cdot\boldsymbol{v} }} \pmatrix{ s \\ -\boldsymbol{v} } \tag{2}$$
Where $\boldsymbol{v} = \pmatrix{v_x & v_y & v_z}$ is the vector part of the quaternion and $s$ the scalar part.
All rotation operations need to be done with unit quaternions by setting $Q \leftarrow \frac{1}{\mathrm{mag}(Q)} Q$, which yields the identity $s^2 + \boldsymbol{v} \cdot \boldsymbol{v} = 1$. This is going to be used to simplify the expressions below.
Now a point P with coordinates $\boldsymbol{p} = \pmatrix{p_x & p_y & p_z}$ is rotated into $\boldsymbol{p}'$ with
$$ \pmatrix{ 0 \\ \boldsymbol{p}' } = \pmatrix{s \\ \boldsymbol{v} } \otimes \pmatrix{ 0 \\ \boldsymbol{p} } \otimes \pmatrix{s \\ \boldsymbol{v}}^{-1} \tag{3} $$
where $\otimes$ is the quaternion multiplication.
The above is expanded out to $$\boldsymbol{p}' = \boldsymbol{p} + 2 s (\boldsymbol{v} \times \boldsymbol{p}) + 2 ( \boldsymbol{v} \times ( \boldsymbol{v} \times \boldsymbol{p})) \tag{4}$$
considering the multiplication rule
$$ \pmatrix{s_1 \\ \boldsymbol{v}_1 } \otimes \pmatrix{ s_2 \\ \boldsymbol{v}_2 } = \pmatrix{ s_1 s_2 - \boldsymbol{v}_1 \cdot \boldsymbol{v}_2 \\ s_1 \boldsymbol{v}_2 + s_2 \boldsymbol{v}_1 + \boldsymbol{v}_1 \times \boldsymbol{v}_2 } \tag{5}$$
Now the inverse operation is done with
$$ \pmatrix{ 0 \\ \boldsymbol{p} } = \pmatrix{s \\ \boldsymbol{v} }^{-1} \otimes \pmatrix{ 0 \\ \boldsymbol{p}' } \otimes \pmatrix{s \\ \boldsymbol{v}} \tag{6} $$
which works out to
$$\boldsymbol{p} = \boldsymbol{p}' - 2 s (\boldsymbol{v} \times \boldsymbol{p}') + 2 ( \boldsymbol{v} \times ( \boldsymbol{v} \times \boldsymbol{p}')) \tag{7}$$
Note that the reverse rotation of $\pmatrix{s \\ \boldsymbol{v}}$ is $\pmatrix{s \\ -\boldsymbol{v}}$ given unit quaternion. This means that you go directly from (4) to (7) by changing the sign of the vector $\boldsymbol{v}$.
The last part of the puzzle is to show that (4) corresponds to the Rodrigues formula for rotation. Note that for a unit quaternion that is a rotation $$Q = \pmatrix{s \\ \boldsymbol{v}} = \pmatrix{ \cos \tfrac{\theta}{2} \\ \boldsymbol{\hat{z}} \sin \tfrac{\theta}{2} }$$ where $\boldsymbol{\hat{z}}$ is the rotation axis, and $\theta$ the rotation angle.
Use the scalar and vector part in (4) to get
$$ \begin{aligned}\boldsymbol{p}' & =\boldsymbol{p}+2s\left(\boldsymbol{v}\times\boldsymbol{p}\right)+2\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}\right)\\ & =\boldsymbol{p}+2\cos\tfrac{\theta}{2}\sin\tfrac{\theta}{2}\left(\boldsymbol{\hat{z}}\times\boldsymbol{p}\right)+2\sin\tfrac{\theta}{2}\sin\tfrac{\theta}{2}\boldsymbol{\hat{z}}\times\left(\boldsymbol{\hat{z}}\times\boldsymbol{p}\right)\\ & =\boldsymbol{p}+\sin\theta\left(\boldsymbol{\hat{z}}\times\boldsymbol{p}\right)+\left(1-\cos\theta\right)\boldsymbol{\hat{z}}\times\left(\boldsymbol{\hat{z}}\times\boldsymbol{p}\right) \end{aligned} \;\;\checkmark$$
Appendix
I will show how to go from (3) to (4)
$$ \begin{aligned}\begin{pmatrix}0\\ \boldsymbol{p}' \end{pmatrix} & =\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}\otimes\begin{pmatrix}0\\ \boldsymbol{p} \end{pmatrix}\otimes\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}^{-1}\\ & =\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}\otimes\begin{pmatrix}0\\ \boldsymbol{p} \end{pmatrix}\otimes\begin{pmatrix}s\\ -\boldsymbol{v} \end{pmatrix}\\ & =\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}\otimes\begin{pmatrix}\boldsymbol{p}\cdot\boldsymbol{v}\\ s\boldsymbol{p}-\boldsymbol{p}\times\boldsymbol{v} \end{pmatrix}\\ & =\begin{pmatrix}s\left(\boldsymbol{p}\cdot\boldsymbol{v}\right)-\boldsymbol{v}\cdot\left(s\boldsymbol{p}-\boldsymbol{p}\times\boldsymbol{v}\right)\\ \boldsymbol{v}\left(\boldsymbol{p}\cdot\boldsymbol{v}\right)+s\left(s\boldsymbol{p}-\boldsymbol{p}\times\boldsymbol{v}\right)+\boldsymbol{v}\times\left(s\boldsymbol{p}-\boldsymbol{p}\times\boldsymbol{v}\right) \end{pmatrix}\\ & =\begin{pmatrix}s\left(\boldsymbol{p}\cdot\boldsymbol{v}\right)-s\left(\boldsymbol{v}\cdot\boldsymbol{p}\right)\\ \boldsymbol{v}\left(\boldsymbol{p}\cdot\boldsymbol{v}\right)+s^{2}\boldsymbol{p}-s\left(\boldsymbol{p}\times\boldsymbol{v}\right)+s\left(\boldsymbol{v}\times\boldsymbol{p}\right)-\boldsymbol{v}\times\left(\boldsymbol{p}\times\boldsymbol{v}\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{v}\left(\boldsymbol{p}\cdot\boldsymbol{v}\right)+\left(1-\boldsymbol{v}\cdot\boldsymbol{v}\right)\boldsymbol{p}+2s\left(\boldsymbol{v}\times\boldsymbol{p}\right)-\boldsymbol{v}\times\left(\boldsymbol{p}\times\boldsymbol{v}\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}+\underbrace{\boldsymbol{v}\left(\boldsymbol{v}\cdot\boldsymbol{p}\right)-\boldsymbol{p}\left(\boldsymbol{v}\cdot\boldsymbol{v}\right)}_{\text{triple product}}+2s\left(\boldsymbol{v}\times\boldsymbol{p}\right)+\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}+\underbrace{\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}\right)}_{\text{triple product}}+2s\left(\boldsymbol{v}\times\boldsymbol{p}\right)+\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}+2s\left(\boldsymbol{v}\times\boldsymbol{p}\right)+2\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}\right) \end{pmatrix} \end{aligned} $$
and from (6) to (7)
$$ \begin{aligned}\begin{pmatrix}0\\ \boldsymbol{p} \end{pmatrix} & =\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}^{-1}\otimes\begin{pmatrix}0\\ \boldsymbol{p}' \end{pmatrix}\otimes\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}\\ & =\begin{pmatrix}s\\ -\boldsymbol{v} \end{pmatrix}\otimes\begin{pmatrix}0\\ \boldsymbol{p}' \end{pmatrix}\otimes\begin{pmatrix}s\\ \boldsymbol{v} \end{pmatrix}\\ & =\begin{pmatrix}s\\ -\boldsymbol{v} \end{pmatrix}\otimes\begin{pmatrix}-\boldsymbol{p}'\cdot\boldsymbol{v}\\ s\boldsymbol{p}'+\boldsymbol{p}'\times\boldsymbol{v} \end{pmatrix}\\ & =\begin{pmatrix}s\left(-\boldsymbol{p}'\cdot\boldsymbol{v}\right)-\left(-\boldsymbol{v}\right)\cdot\left(s\boldsymbol{p}'+\boldsymbol{p}'\times\boldsymbol{v}\right)\\ s\left(s\boldsymbol{p}'+\boldsymbol{p}'\times\boldsymbol{v}\right)+\left(-\boldsymbol{p}'\cdot\boldsymbol{v}\right)\left(-\boldsymbol{v}\right)+\left(-\boldsymbol{v}\right)\times\left(s\boldsymbol{p}'+\boldsymbol{p}'\times\boldsymbol{v}\right) \end{pmatrix}\\ & =\begin{pmatrix}-s\left(\boldsymbol{p}'\cdot\boldsymbol{v}\right)+s\left(\boldsymbol{v}\cdot\boldsymbol{p}'\right)\\ s^{2}\boldsymbol{p}'+s\left(\boldsymbol{p}'\times\boldsymbol{v}\right)+\boldsymbol{v}\left(\boldsymbol{p}'\cdot\boldsymbol{v}\right)-s\left(\boldsymbol{v}\times\boldsymbol{p}'\right)+\left(-\boldsymbol{v}\right)\times\left(\boldsymbol{p}'\times\boldsymbol{v}\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \left(1-\boldsymbol{v}\cdot\boldsymbol{v}\right)\boldsymbol{p}'+\boldsymbol{v}\left(\boldsymbol{p}'\cdot\boldsymbol{v}\right)-2s\left(\boldsymbol{v}\times\boldsymbol{p}'\right)+\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}'\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}'+\underbrace{\boldsymbol{v}\left(\boldsymbol{p}'\cdot\boldsymbol{v}\right)-\boldsymbol{p}'\left(\boldsymbol{v}\cdot\boldsymbol{v}\right)}_{\text{triple product}}-2s\left(\boldsymbol{v}\times\boldsymbol{p}'\right)+\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}'\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}'+\underbrace{\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}'\right)}_{\text{triple product}}-2s\left(\boldsymbol{v}\times\boldsymbol{p}'\right)+\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}'\right) \end{pmatrix}\\ & =\begin{pmatrix}0\\ \boldsymbol{p}'-2s\left(\boldsymbol{v}\times\boldsymbol{p}'\right)+2\boldsymbol{v}\times\left(\boldsymbol{v}\times\boldsymbol{p}'\right) \end{pmatrix} \end{aligned} $$