# Euler Angles - Gimbal lock, why non-orthogonal axes?

I really can't understand how and why gimbal lock occurs using euler angles. First of all let me clear this "I know that gimbal lock occurs when 2 gimbals/axes coincide thus losing 1 degree of freedom"

However what I'm interested in why the axes are coinciding in the first place when they are supposed to remain perpendicular when we move anyone.

According to wikipedia here :

The general problem of decomposing a rotation into three composed movements about intrinsic axes was studied by P. Davenport, under the name "generalized Euler angles", but later these angles were named "Davenport angles" by M. Shuster and L. Markley.

Davenport proved that any orientation can be achieved by composing three elemental rotations using non-orthogonal axes.

That's what I want to hear about more. Why "non-orthogonal" ? I can't see any problems with making the axes orthogonal? What does making the axes non-orthogonal give us?

2) After the above one has been answered. How is this all tied up to rotational matrices? How can we achieve gimbal lock through the matrices when they only rotate a given point/vector around global axis. For example If i multiply a column vector with a Rotation matrix around X-axis Rx and then with Ry It will rotate around the global X-axis first, then global Y-axis second. So how can I achieve the lock situation using matrices?

EDIT:- To make it more clear I've also heard about rotation orders like in the order Y-Z-X when Y axis rotates then Z and X rotate with it but when Z rotates only X rotates with it. thus making the axes non-orthogonal. I am assuming that's what it means by non-orthogonal mentioned in the wiki article. Here is a picture.

As you can see in the Y-Z-X order, the Y axis remains there as in 3rd picture causing the axes to coincide...

Is the wikipedia article perhaps talking about non-orthogonal axes of rotation? Because that's what happens with Euler Angles. In the yaw,pitch, roll case, the first axis of rotation is about the inertial z axis. The next one is about an axis that is in the x-y plane (roll). So you can imagine that the last axis of rotation will be non orthogonal to the first two axis.

Anyway, when it comes to Gimbal lock, I look at it in the context of the following question: "Given the rotation matrix, can I parametrize it uniquely in terms of Euler angles yaw, pitch, and roll?"

Take the rotation matrix formed by the Euler angle rotations of (0,90,0) angles for (yaw,pitch,roll). Now assume for a second that I did not tell you the (yaw,pitch,roll) combination I used to come up with the rotation matrix and I ask you the question "what is my (yaw,pitch,roll)". You will not be able to come up with a unique solution. In fact there are infinitely many of them. This singularity or loss of a dimension is a gimbal lock situation and it tends to cause havoc in control/estimation algorithms if Euler angles are used.

• Suppose I am using tait-bryan angles causing rotation in the order X-Y-Z, then all of these are orthogonal at first? I am assuming non-orthogonal means that when the middle axis rotates like Y then Z also rotates with it but X doesn't making it non-ortho. That's what I want to know, why? Secondly in your case if you cause rotation aroun Z first then any axis in the XY plane, the last rotation can be orthogonal by choosing the correct axis. For example if 2nd rotation is around a 45 degree counter clockwise tilted axis, last rotation can be around 135 degree cc tilted axis? – gallickgunner Jan 30 '18 at 8:50
• I don't know about tait-bryan angles. About my yaw,pitch,roll example: Put your palm on a level surface and assume it is aligned with the inertial/fixed frame. Rotating your palm while it remains flat on the surface is a rotation about inertial z (yaw). Notice that the body frame z axis is aligned with inertial z, but the body frame x and y are not. Next, rotate about the body x axis (pitch). A positive rotation will lift your fingers off the table. Now you must do a rotation about body y frame, which is shooting out of your fingertips. This axis is not orthogonal to the initial z axis. – Mr. Fegur Jan 30 '18 at 9:41
• When that happens the Y-axis coincides with the z-axis. that's what I am asking why is it coinciding? Put your left palm on the table, fingers pointing right (X-axis), rotate around the Z axis (pointing upward) 90 degrees counter clockwise, now the X-axis is pointing forward with the fingers and Y-axis is pointing right. Next if you rotate around X by 90 there are 2 cases. The Z-axis remains there and Y (right axis) coincides with Z OR Y axis becomes previous Z pointing upward and Z becomes -Y pointing left. I want to know why case 1 happens but not 2? This is the order Z-X-Y see op – gallickgunner Jan 30 '18 at 10:33
• I don't follow. You should be more explicit about body vs fixed axes and carry this distinction as you do rotations. I'm not even sure if your frames are right handed. – Mr. Fegur Jan 30 '18 at 14:45
• see my edited original post. Added a picture for clarity. – gallickgunner Jan 30 '18 at 15:26

So I finally figured out what was confusing me. Although I still didn't understand what they mean by non-orthogonal axes but I got all that coinciding thing. I asked this question on Computergraphics exchange so posting the link to the answer which I posted there.

https://computergraphics.stackexchange.com/questions/6233/euler-angles-gimbal-lock-why-non-orthogonal-axes