2));
qinv = quatinv(q)
</pre>
<pre class="mloutput">
qinv =
    0.0827
   -0.3621
    0.7267
   -0.5779
</pre>

<p>
To show that <code>qinv</code> is the inverse of <code>q</code> we perform quaternion multiplication between the two, which yields the (multiplicative) identity quaternion (equivalent to the identity matrix).
</p>

<pre class="matlab">
quatinv(qinv,q)
</pre>
<pre class="mloutput">
ans =
    1.0000
         0
         0
   -0.0000
</pre>


<!-- ==================================================