inverse#
- Quaternion.inverse#
Return the inverse Quaternion
The inverse quaternion \(\mathbf{q}^{-1}\) is such that the quaternion times its inverse gives the identity quaternion \(\mathbf{q}_I=\begin{pmatrix}1 & 0 & 0 & 0\end{pmatrix}\)
It is obtained as:
\[\mathbf{q}^{-1} = \frac{\mathbf{q}^*}{\|\mathbf{q}\|^2}\]If the quaternion is normalized (called versor) its inverse is the conjugate.
\[\mathbf{q}^{-1} = \mathbf{q}^*\]- Returns:
out – Inverse of quaternion.
- Return type:
numpy.ndarray
Examples
>>> q = Quaternion([1., -2., 3., -4.]) >>> q Quaternion([ 0.18257419, -0.36514837, 0.54772256, -0.73029674]) >>> q.inverse array([ 0.18257419, 0.36514837, -0.54772256, 0.73029674]) >>> q@q.inverse array([1.00000000e+00, 0.00000000e+00, 0.00000000e+00, 2.77555756e-17])