Rotation of axes around Z

Decompose rotated basis vector $\hat{x'}$ into unrotated basis vectors $\hat{x}$ and $\hat{y}$:
$$
\hat{x'} = (\hat{x'} \cdot \hat{x})\hat{x} + (\hat{x'} \cdot \hat{y})\hat{y}
$$
where the $\cdot$ denotes the vector dot product.
Decompose rotated basis vector $\hat{y'}$ into unrotated basis vectors $\hat{x}$ and $\hat{y}$:
$$
\hat{y'} = (\hat{y'} \cdot \hat{x})\hat{x} + (\hat{y'} \cdot \hat{y})\hat{y}
$$
thus
$$
T_z(\alpha)=\begin{bmatrix} cos(\alpha) & cos(\pi/2-\alpha) & 0 \\ cos(\pi/2+\alpha) & cos(\alpha) & 0 \\ 0 & 0 & 1 \end{bmatrix}=
\begin{bmatrix} cos(\alpha) & sin(\alpha) & 0 \\ -sin(\alpha) & cos(\alpha) & 0 \\ 0 & 0 & 1 \end{bmatrix}
$$
Rotation of axes around Y

Decompose twice rotated basis vector $\hat{x''}$ into once rotated basis vector $\hat{x'}$ and unrotated basis vector $\hat{z}$:
$$
\hat{x''} = (\hat{x''} \cdot \hat{x'})\hat{x'} + (\hat{x''} \cdot \hat{z})\hat{z}
$$
Decompose rotated basis vector $\hat{z'}$ into once rotated basis vector $\hat{x'}$ and unrotated basis vector $\hat{z}$:
$$
\hat{z'} = (\hat{z'} \cdot \hat{x'})\hat{x'} + (\hat{z'} \cdot \hat{z})\hat{z}
$$
$$
T_y(\beta)=\begin{bmatrix} cos(\beta) & 0 & cos(\pi/2+\beta) \\
0 & 1 & 0 \\ cos(\pi/2-\beta) & 0 & cos(\beta) \end{bmatrix}=
\begin{bmatrix} cos(\beta) & 0 & -sin(\beta) \\
0 & 1 & 0 \\ sin(\beta) & 0 & cos(\beta) \end{bmatrix}
$$
Rotation of axes around X

Decompose twice rotated basis vector $\hat{y''}$ into once rotated basis vectors $\hat{y'}$ and $\hat{z'}$:
$$
\hat{y''} = (\hat{y''} \cdot \hat{y'})\hat{y'} + (\hat{y''} \cdot \hat{z'})\hat{z'}
$$
Decompose twice rotated basis vector $\hat{z''}$ into once rotated basis vectors $\hat{y'}$ and $\hat{z'}$:
$$
\hat{z''} = (\hat{z''} \cdot \hat{y'})\hat{y'} + (\hat{z''} \cdot \hat{z'})\hat{z'}
$$
$$
T_x(\gamma)=\begin{bmatrix} 1 & 0 & 0 \\
0 & cos(\gamma) & cos(\pi/2-\gamma) \\
0 & cos(\pi/2+\gamma) & cos(\gamma) \end{bmatrix}=
\begin{bmatrix} 1 & 0 & 0 \\
0 & cos(\gamma) & sin(\gamma) \\
0 & -sin(\gamma) & cos(\gamma) \end{bmatrix}
$$
Chained change of basis
$$
T=\begin{bmatrix} 1 & 0 & 0 \\
0 & cos(\gamma) & sin(\gamma) \\
0 & -sin(\gamma) & cos(\gamma) \end{bmatrix}*\begin{bmatrix} cos(\beta) & 0 & -sin(\beta) \\
0 & 1 & 0 \\ sin(\beta) & 0 & cos(\beta) \end{bmatrix}*\begin{bmatrix} cos(\alpha) & sin(\alpha) & 0 \\ -sin(\alpha) & cos(\alpha) & 0 \\ 0 & 0 & 1 \end{bmatrix}=R^{-1}
$$
The matrix T is sometimes referred to as the Direct Cosine Matrix (2).
In aerospace the angles are usually denoted: yaw: $\psi$, pitch: $\theta$ and bank (roll): $\phi$ (2).
For readability I will hereafter drop the double apostrophe and instead use a single apostrophe to denote the 3x rotated coordinate system:
$$
\begin{bmatrix} \hat{x'} \\ \hat{y'} \\ \hat{z'} \end{bmatrix}
=T*\begin{bmatrix} \hat{x} \\ \hat{y} \\ \hat{z} \end{bmatrix}
$$
Expanding T into a system of linear equations:
$$
\hat{x'}=T11*\hat{x}+T12*\hat{y}+T13*\hat{z}
$$
$$
\hat{y'}=T21*\hat{x}+T22*\hat{y}+T23*\hat{z}
$$
$$
\hat{z'}=T31*\hat{x}+T32*\hat{y}+T33*\hat{z}
$$
Any vector in the (3x) rotated coordinate system, $\vec{v'}$ may be expressed as a linear combination of the basis vectors of the (3x) rotated coordinate system:
$$
\vec{v'}=v'_x*\hat{x'}+v'_y*\hat{y'}+v'_z*\hat{z'}
$$
Substituting the expressions for the rotated basis vectors into this equation we find:
$$
\vec{v'}=v'_x*(T11*\hat{x}+T12*\hat{y}+T13*\hat{z})+v'_y*(T21*\hat{x}+T22*\hat{y}+T23*\hat{z})+v'_z*(T31*\hat{x}+T32*\hat{y}+T33*\hat{z})
$$
collecting terms:
$$
\vec{v'}=(v'_x*T11+v'_y*T21+v'_z*T31)*\hat{x}+(v'_x*T21+v'_y*T22+v'_z*T32)*\hat{y}+(v'_x*T13+v'_y*T23+v'_z*T33)*\hat{z}+
$$
thus
$$
v_x = v'_x*T11+v'_y*T21+v'_z*T31
$$
$$
v_y = v'_x*T21+v'_y*T22+v'_z*T32
$$
$$
v_z = v'_x*T13+v'_y*T23+v'_z*T33
$$
putting these equations back into matrix form:
$$
\begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix}
=T^T*\begin{bmatrix} v'_x \\v'_y \\ v'_z \end{bmatrix}
$$
since T is orthogonal: $T^T=T^{-1}$ and from before we know that: $T^{-1}=R$:
$$
\begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix}
=R*\begin{bmatrix} v'_x \\v'_y \\ v'_z \end{bmatrix}
$$
thus given a vector in the coordinate system of an airplane $[v'_x,v'_y,v'_z]$ we can find the same vector in the unrotated (NED) coordinate system: $[v_x,v_y,v_z]$ by the equation above.
And
$$
\begin{bmatrix} v_x' \\ v_y' \\ v_z' \end{bmatrix}
=T*\begin{bmatrix} v_x \\v_y \\ v_z \end{bmatrix}
$$
where
$$
T=R^{-1}=R^T
$$
thus given a vector in the in the unrotated (NED) coordinate system: $[v_x,v_y,v_z]$ we can find the same vector in the coordinate system of an airplane $[v'_x,v'_y,v'_z]$ by the equation above.
Example
$\alpha = \gamma = \pi/2$

$\vec{v'}=[1,0,1]$
$$
R=\begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}*
\begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{bmatrix}=
\begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}
$$
$$
\vec{v} = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} * [1,0,1] = [1, 1, 0]
$$
References
(1) Understanding Direct Cosine Matrices, Euler Angles and Quaternions
(2) Euler Angles and the Euler Rotation Sequence