Replace some matrix multiplications by quaternion multiplications