A vector \vec{r} in space has to be expressed using basis \hat{e} as a reference and coordinate \vec{v}, such that,

\displaystyle \vec{r} = \hat{e} \cdot \vec{v} = \sum_{i} \hat{e}_i v_i

A transform of a vector R(\vec{r}) is done by

\vec{r'} = R(\vec{r}) = \hat{e} \cdot R \cdot \vec{v}

This transform can be view as

(\hat{e}\cdot R) \cdot \vec{v} = \hat{e} \cdot ( R \cdot \vec{v})

The first one is change the basis and keep the coordinate, and the later is change the coordinate and keep the basis.

The Euler angle, defined as,

\vec{r'} = \hat{e} \cdot R_{z}(\alpha) \cdot R_{y}(\beta) \cdot R_{z}(\gamma) \cdot \vec{v}

Since the rotational matrix is fixed and not based on any basis, how to understand this transform can be viewed differently.

The implementation of the rotation usually like this:

\vec{v'} = R_{z}(\alpha) \cdot R_{y}(\beta) \cdot R_{z}(\gamma) \cdot \vec{v}

And the rotation order is \alpha \to \beta \to \gamma. In this order, the rotation is using body (or current, intrinsic) axis.

If the rotation order is \gamma \to \beta \to \alpha, the rotation is using fixed (or global, external, Laboratory) axis.

To understand this, we have to add back the basis \hat{e}. When using the body axis, the left most matrix actually act on the basis (operationally)

\hat{e}\cdot R_{z}(\alpha) \cdot R_{y}(\beta) \cdot \vec{v} \to \hat{e'} \cdot R_y(\beta) \cdot \vec{v}

When using the fixed axis,

\hat{e}\cdot R_{z}(\alpha) \cdot R_{y}(\beta) \cdot \vec{v} \to \hat{e} \cdot R_z(\alpha) \cdot \vec{v'} \to \hat{e} \cdot \vec{v''}

Thus, if we using Euler angle \alpha \to \beta \to \gamma in fixed frame, the correct matrix is

R_{z}(\gamma) R_y(\beta) R_z(\alpha)

In the following, we use fixed frame, unless specified. 

Since using Euler angle \alpha \to \beta \to \gamma in changing frame, the rotation \gamma is fixed on the new axis \hat{n}(\theta = \beta , \phi = \alpha) . However, the matrix

R(\hat{n}, \omega) = R_z(\phi) \cdot R_y(\theta)\cdot R_z(\omega)

is NOT a rotation on the axis with the angle. As we can see that, for a zero rotation \omega = 0 , any vector will still be transformed by R_z(\phi) \cdot R_y(\theta) .

Now, suppose we have a rotation axis \hat{n} and an rotation angle \omega , the rotation matrix can be constructed as follow.

Notice that the rotational matrix R is a unitary transform, its eigen-vectors are P,

\displaystyle R\cdot P = P \cdot \begin{pmatrix} 1 & 0 & 0 \\ 0 & a + i b & 0 \\ 0 & 0 & a-i b \end{pmatrix}

a^2 + b^2 = 1

|\textrm{Arg}(a + i b)| = \omega

Using \omega, solve a = \cos(\omega) , b = \sin(\omega).

Since the eigen vector of R_z(\alpha) are

\displaystyle p_0 = \hat{e_z}, p_{\pm} = \frac{1}{2}(\hat{e_x}\pm i \hat{e_y})

Since p_0 \to \hat{n}(\theta, \phi), thus,

\displaystyle p_{\pm} \to \frac{1}{2}( \hat{e_x'} \pm i \hat{e_y'} )

such that

\hat{e_i'} = R_z(\phi)\cdot R_y(\theta) \cdot \hat{e_i}

Notice that the corresponding eigen vector for the eigen value a \pm i b is p_{\mp}.

Then the rotational matrix is

R = P\cdot D\cdot P^{-1}

Another to look at this problem is that, an operator, can be “decomposed” into its eigen vectors and eigen-values, using Dirac notation,

\displaystyle R(\omega) = \sum_{i} |v_i \rangle \omega_i \langle v_i |

The rotation round the vector can be transformed use R_z(\omega) from (0,0) \to (\theta, \phi) , Thus, the vector  has to be transform, so the operator

\displaystyle R(\hat{n}, \omega) = \sum_{i} R_z(\phi) R_y(\theta) |v_i \rangle \omega_i \langle v_i | R_y(-\theta) R_z(-\phi)

R(\hat{n}, \omega) = R_z(\phi) \cdot R_y(\theta) \cdot  R_z(\omega) \cdot R_y(-\theta) \cdot R_z(-\phi)

This is a relation between fixed frame rotation to a body rotation! \hat{n} can be the body z-axis, y-axis, or x-axis in particular.

For example, Let \hat{n} be the rotated y-axis, such that

\displaystyle \hat{n} = R_z(\alpha) \cdot \hat{y} , (\theta, \phi) = (\frac{\pi}{2}, \alpha+\frac{\pi}{2})

\displaystyle R(\hat{y'}, \omega) = R_z(\alpha+\frac{\pi}{2}) \cdot R_y(\frac{\pi}{2}) \cdot R_z(\omega) \cdot R_y(-\frac{\pi}{2}) \cdot R_z( -\alpha - \frac{\pi}{2})

Notice that

R_y(\frac{\pi}{2}) \cdot R_z(\omega) \cdot R_y(-\frac{\pi}{2}) = R_x(\omega)

R_z(\frac{\pi}{2}) \cdot R_x(\omega) \cdot R_z(-\frac{\pi}{2}) = R_y(\omega)

The above formula are not difficult to imagine, decompose the middle operator into the eigen-system and use Dirac notation. For example, the rotate of the z-axis around y-axis with 90 degree is the x-axis. Thus,

\displaystyle R(\hat{y'}, \omega) =R_{yB}(\omega) = R_z(\alpha) \cdot R_y(\omega) \cdot R_z(-\alpha)

We recovered the relation of the Lab frame to body frame for y-axis!

Also, given a vector \vec{r} rotated by \omega to \vec{r'} around unit vector \hat{n} is

\vec{r'} = \vec{r} \cos(\omega) + \hat{n} (\hat{n}\cdot \vec{r}) (1-\cos(\omega)) + \hat{n} \times \vec{r} \sin(\omega)