# Quaternions: Rotation Matrix Derivative

Given Data and Specifications in Question

1. If $q(t)$ represents the position vector as result of rotation with an angular velocity $\omega(t)$ in quaternions, then you can make the relationship

$\dot q(t)=\frac{\mathrm{d} q(t) }{\mathrm{d} t}=\frac{1}{2}q_\omega(t)\,q(t). \tag1$ Reference link pdf is here. All vectors here are converted as quaternions by putting $w=0$. Means a vector in quaternions represented as $(w,x,y,z)=(0,x,y,z)$.

1. Imagine a system with we only know rotation matrix at $R(t)$ which contains 3 orthonormal vectors as frames arranged columnwise to form the matrix $R(t)_{3 \times 3}$. Every rotation matrix has an angular velocity associated with it (if needed you can see here, how we calculate that) let us call $\Omega(t)$. Let us call $u(t)$ be the quaternion of rotation matrix $R(t)$.

Question

1. What could be the relation ship between rotation matrices and angular velocity of rotation matrices in quaternion domain as in equation (1). I am writing my solution. Please tell me whether I am correct or not in concept? It is a theoretical doubt to understand the relationship between quaternion rotation and angular velocity.

My solution

Let us call the quaternion representation of column matrices of $R(t)$ as $q_1(t),q_2(t), q_3(t)$. Let us call corresponding vectors as $v_1(t),v_2(t),v_3(t)$. They are orthogonal unit vectors. We already mentioned how to convert a vectors to quaternions. We know that change of rotation matrices can be treated as rotation of frames consisting of $v_1(t),v_2(t),v_3(t)$ around angular velocity vector $\Omega(t)$. So we can write finally as:

$(0,L_x,L_y,L_z)=L=\dot q_1(t)=\frac{\mathrm{d} q_1(t) }{\mathrm{d} t}= \frac{1}{2}q_\Omega(t)\,q_1(t)\tag2$

$(0,M_x,M_y,M_z)=M= \dot q_2(t)=\frac{\mathrm{d} q_2(t) }{\mathrm{d} t}= \frac{1}{2}q_\Omega(t)\,q_2(t)\tag3$

$(0,N_x,N_y,N_z)=N= \dot q_3(t)=\frac{\mathrm{d} q_3(t) }{\mathrm{d} t}= \frac{1}{2}q_\Omega(t)\,q_3(t)\tag4$

Note: We treated this orthonormal vectors as position vectors with starting point origin. That enable us to use equation (1) here. Vectors can be positioned anywhere. I am bit dubious in making $w$ part of $\frac{\mathrm{d} q_i(t) }{\mathrm{d} t}$ as zero. My logic is I treat rate of change of vector as another vector.

Finally we can make the relationship as follows:

$R_d=\dot{R(t)}=\frac{\mathrm{d} R(t) }{\mathrm{d} t}=\begin{bmatrix} L_x &M_x & N_x \\ L_y & M_y & N_y\\ L_z & M_z & N_z \end{bmatrix}. \tag 5$

I am not sure whether rate of change of rotation $R_d$ is a rotation matrix or not. So I am not able to write $\frac{\mathrm{d} u(t) }{\mathrm{d} t}=\dot{u(t)}$ from $R_d$. Please share your thoughts.