Why rotation matrix results in different angle between vectors before and after rotation?

87 Views Asked by At

I was playing around with 3D rotation matrix in the matlab code, in which I had to define angle to be rotated for each dimension $x, y, z$. For example,'''rotx(30) * roty(45) * rotz(60)''' results in matrix that rotates the vector 30 degrees in x axis, 45 degrees in y axis, and 60 degrees in z axis.

The problem is that, from my intuition, I thought the angle between any random unit vector and the rotated vector from that unit vector would always result in constant value. However, if I set $v1$ as random unit vector (in $\mathbb{R}^{3}$) and rotate that vector to be $v2$, I thought $v1^{T} \cdot v2$ would result in constant value for any $v1$. I found out that my intuition was quite wrong, but found out that the angles I specified above (30, 45, 60) at least give some constraints of the resulting outcome.

It seems my intuition works in 2D, but not in dimension more than 3. Could anyone tell me why this is the case?

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

It's usually helpful to consider simpler cases before more complex ones.

Consider a rotation of $90$ degrees around the $z$ axis. A vector in the $x,y$ plane will be rotated to another vector at a $90$ degree angle to the first. A vector on the $z$ axis will not be rotated at all.

Vectors that are in intermediate directions "between" the $x,y$ plane and the $z$ will be rotated to vectors that are at intermediate angles between $0$ and $90$ degrees from the original vector.

Two-dimensional rotations are like looking only at vectors in the $x,y$ plane while rotating around the $z$ axis. That's why every rotated vector makes the same angle with the original vector.