```python
import transforms3d.quaternions as tf
import sympy
sympy.init_printing()
```


```python
a = sympy.symbols('a_1:3')
b = sympy.symbols('b_1:3')
c = sympy.symbols('c_1:3')
d = sympy.symbols('d_1:3')

q0 = sympy.Matrix([a[0], b[0], c[0], d[0]])
q1 = sympy.Matrix([a[1], b[1], c[1], d[1]])
```


```python
def qmult(q0, q1):
    res = sympy.Matrix(tf.qmult(q0, q1))
    res.simplify()
    return res

def qconj(q):
    return sympy.Matrix([q[0], -q[1], -q[2], -q[3]])

def qnorm(q):
    return sympy.sqrt(qmult(q, qconj(q))[0])
```


```python
qmult(q0, q1)
```


```python
qconj(q1).T
```


```python
qnorm(q1)
```


```python
qmult(q0, qconj(q0)/qnorm(q0)**2)
```


```python
qmult(q0, qconj(q0)/qnorm(q0))
```


```python
def qinv(q):
    res = qconj(q)/qnorm(q)**2
    res.simplify()
    return res
```


```python
qmult(q0, qinv(q1))
```

ec77811005eef6088e68c191219ddf63a708518a
ipynb
Jupyter Notebook
Quaternion Inverse Check.ipynb
jgoppert/iekf_analysis
d41ad34b37ef2636e20680accf399ea4a9332811
BSD-3-Clause
2018-01-16T06:46:38.000Z
2019-06-19T10:17:12.000Z
Quaternion Inverse Check.ipynb
jgoppert/iekf_analysis
d41ad34b37ef2636e20680accf399ea4a9332811
BSD-3-Clause
Quaternion Inverse Check.ipynb
jgoppert/iekf_analysis
d41ad34b37ef2636e20680accf399ea4a9332811
BSD-3-Clause
Qwen/Qwen-72B
1. YES
2. YES