I am using the æronautical meanings of yaw, pitch and roll (intrinsic rotations, not extrinsic). Say I know the yaw ($=\theta_z$ radians about the intrinsic $z$ axis of an object), pitch ($=\theta_x$ radians about the intrinsic $x$ axis), and roll ($=\theta_y$ radians about the intrinsic $y$ axis) of an object. Is there a simple way to write the matrix for the composition of these three rotations? Is the composition even commutative? If it isn't, then why do æronautical engineers use this system? Should I be converting into quaternions?
Say I have a telescope on a airplane, and I want to convert the azimuth & elevation of a star w.r.t. the earth into the azimuth & elevation of that star w.r.t. the airplane (so that I can point the plane's telescope at it). I could think of this data for the star as a vector in the same three variables as the airplane, with one variable being irrelevant (say roll, if it is done last). If I had a matrix which represented the overall rotation of the plane away from some original position $(\theta_z=0,\theta_x=0,\theta_y=0)$, then I could apply this matrix's inverse to the star's vector, and get the new vector for the star w.r.t. the airplane.