You can use quaternions to rotate vectors or other quaternions. The same formula is used to rotate quaternions by other quaternions as to rotate vectors by other quaternions. The only difference is that the vector becomes a quaternion with a scalar component of zero, yet the scalar of the resulting product is ignored. The formula for rotating vectors and quaternions is shown in Figure 2.4.
Figure 2.4 Using a quaternion to rotate vectors and other quaternions.
Remember, when rotating a vector, you use a quaternion with a scalar value of zero and ignore the resulting scalar in the result.