Artificial intelligent assistant

Commutative applying rotations around three axis Rotating an object in a 3 dimensional space by euler angles might be intuitive but comes with some problems. First, the order of applied rotations around the different axis matters. Second, there is gimbal lock. To overcome this, I thought about converting each angle to a quaternion and multiplying them so that I would end up with a single quaternion to apply. But logically, multiplication of quaternions isn't commutative, too. So given three values how can I apply them as rotations so that first, the order doesn't matter and second, every possible angle can be represented?

The order inherently matters. If you look to your left and then tilt your chin to where your forehead is, it's different from tilting your chin to your forehead then moving your nose to where the left ear was.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7ffa06ce10de44c984b50eef62ee5b42