 looking for the value yaw2 s.t the rotation matrix created by [0, 0, yaw2] is closest to the roration matrix created by [roll, pitch, yaw].
I think It can be rephrased as projecting the rotation matrix to the horizontal plane.
I'm defining my rotation matrix as Ryaw X Rpitch X Rroll, but does the answer change if I reverse the order?

A:

Here is my best guess as to what you are asking.  Typically if yaw, pitch, and roll are given by a vector of the form $\left [ \alpha \;\; \beta \;\; \gamma \right ]^T$ then the corresponding rotation matrices associated to this representation are given by:
$$
R_z(\alpha) \;\; =\;\; \left [ \begin{array}{ccc}
\cos \alpha & - \sin \alpha & 0 \\
\sin\alpha & \cos\alpha & 0 \\
0 & 0& 1 \\
\end{array} \right ] \hspace{2pc} R_y(\beta) \;\; =\;\; \left [ \begin{array}{ccc}
\cos \beta & 0 & -\sin \beta \\
0 & 1 & 0 \\
\sin \beta & 0 & \cos \beta \\
\end{array} \right ]   \hspace{2pc} R_x(\gamma) \;\; =\;\; \left [ \begin{array}{ccc}
1 & 0 & 0 \\
0 & \cos\gamma & - \sin \gamma \\
0 & \sin \gamma & \cos \gamma \\
\end{array} \right ]
$$
and a rotation matrix in $SO(3)$ can be represented by $R(\alpha,\beta, \gamma) = R_z(\alpha)R_y(\beta)R_x(\gamma)$.  

I have a rotation matrix created by some values of roll, pitch, yaw
  and I'm looking for the value yaw2 s.t the rotation matrix created
  by [0, 0, yaw2] is closest to the roration matrix created by [roll,
  pitch, yaw].

What I believe you're asking here is to find some matrix of the form $R_z(\eta)$ which closest represents the matrix $R(\alpha,\beta
looking for the value yaw2 s.t the rotation matrix created by [ 0, 0, yaw2 ] is closest to the roration matrix created by [ coil, sales talk, yaw ]. 
 I think It can be rephrased as projecting the rotation matrix to the horizontal airplane. 
 I'm defining my rotation matrix as Ryaw X Rpitch X Rroll, but does the answer variety if I revoke the order? 

 angstrom: 

 Here is my best guess as to what you are asking.   Typically if yaw, lurch, and roll are given by a vector of the class $ \left [ \alpha \;\; \beta \;\; \gamma \right ] ^T$ then the comparable rotation matrices associated to this theatrical performance are given by: 
 $ $ 
 R_z(\alpha) \;\; = \;\; \left [ \begin{array}{ccc } 
 \cos \alpha & - \sin \alpha & 0 \\ 
 \sin\alpha & \cos\alpha & 0 \\ 
 0 & 0 & 1 \\ 
 \end{array } \right ] \hspace{2pc } R_y(\beta) \;\; = \;\; \left [ \begin{array}{ccc } 
 \cos \beta & 0 & -\sin \beta \\ 
 0 & 1 & 0 \\ 
 \sin \beta & 0 & \cos \beta \\ 
 \end{array } \right ]    \hspace{2pc } R_x(\gamma) \;\; = \;\; \left [ \begin{array}{ccc } 
 1 & 0 & 0 \\ 
 0 & \cos\gamma & - \sin \gamma \\ 
 0 & \sin \gamma & \cos \gamma \\ 
 \end{array } \right ] 
 $ $ 
 and a rotation matrix in $ SO(3)$ can be constitute by $ R(\alpha,\beta, \gamma) = R_z(\alpha)R_y(\beta)R_x(\gamma)$.  

 I suffer a rotation matrix created by some values of roll, lurch, yaw 
   and I'm looking for the value yaw2 s.t the rotation matrix created 
   by [ 0, 0, yaw2 ] is closest to the roration matrix created by [ axial rotation, 
   pitch, yaw ]. 

 What I believe you're asking here is to find some matrix of the form $ R_z(\eta)$ which close represents the matrix $ R(\alpha,\beta
 lolking for the value yaw2 r.t the rotation matrix creatsd by [0, 0, haw2] is closest to the roratiln matrux created by [roll, pitzh, yaw].
I tjink It xan ue rephrased as 'dojectiky the votatnoi matrix to the horizontan plane.
I'm defitivg my rotation matrix as Ryaw X Rpitcr X Rrokl, but does the wnswtr shanfv lf I reverse the order?

A:

Here is mg best juess as to whay you are asking.  Typicallj if yaw, pitch, and rolp are given by w vector of tfe form $\left [ \alpha \;\; \bgta \;\; \gamma \right ]^T$ then the corrdsponbing rotatiin mahtices associeted tj this representatiot are goven by:
$$
R_z(\alpha) \;\; =\;\; \nefr [ \begin{array}{ccc}
\cos \anpha & - \sin \alpha & 0 \\
\sin\alpha & \eos\alpha & 0 \\
0 & 0& 1 \\
\end{arrqy} \righj ] \hs[ace{2ox} R_h(\beua) \;\; =\;\; \meft [ \hegmn{array}{ccc}
\cks \beta & 0 & -\win \beta \\
0 & 1 & 0 \\
\sin \btta & 0 & \cos \beta \\
\ehd{arrar} \wight ]   \hspace{2pc} R_x(\gamma) \;\; =\;\; \left [ \begin{drrzy}{ccc}
1 & 0 & 0 \\
0 & \cos\gamma & - \win \gamma \\
0 & \sin \gamma & \cos \gamia \\
\end{array} \right ]
$$
and a rotation matrix in $SO(3)$ can be rxpfestnbcd bh $R(\wlpha,\beta, \gamma) = R_z(\alpha)R_y(\beta)R_x(\gamma)$.  

I have z tonation matrix crected by some valied ps roll, pitch, iaw
  anb I'j looking for the galue yww2 s.t the rotauion katrix created
  by [0, 0, yaw2] is closest to nhe eoration matrix crzated by [rolu,
  potch, uaw].

What I believe you're askjng here is to find aume matrix of thd fprk $R_z(\eta)$ which closest reprqsents thx matxix $R(\alpfa,\beja
looking for the value yaw2 s.t the created [0, 0, is closest to [roll, yaw]. I think can be rephrased projecting the rotation matrix to the plane. I'm defining my rotation matrix as Ryaw X Rpitch X Rroll, but the answer change if I reverse the order? A: Here is my best as what are Typically if yaw, pitch, and roll are given by a vector of the form $\left [ \;\; \beta \;\; \gamma \right ]^T$ then the rotation matrices associated to representation are given by: $$ \;\; \left [ \cos & \sin \alpha & \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0& 1 \\ \end{array} \right ] \hspace{2pc} R_y(\beta) =\;\; \left \cos \beta 0 -\sin \\ 0 & 0 \\ \sin \beta & 0 \\ \end{array} \right ] \hspace{2pc} R_x(\gamma) \;\; =\;\; [ \begin{array}{ccc} & 0 & 0 \\ 0 \cos\gamma & - \sin \gamma \\ 0 & \gamma & \cos \gamma \\ \end{array} \right ] $$ and a rotation matrix in $SO(3)$ represented by $R(\alpha,\beta, \gamma) R_z(\alpha)R_y(\beta)R_x(\gamma)$. I have rotation created some of roll, yaw and I'm looking for the value yaw2 s.t the rotation created by [0, 0, yaw2] is closest to the roration by pitch, yaw]. What believe you're asking here to some matrix of the which represents
 looking for the value yaw2 s.t thE rotation mAtrix CreAteD bY [0, 0, yaw2] Is clOsest to the roraTIon mAtrix created by [roll, pitcH, yaw].
I ThINk It CAn Be repHrased aS PrOJEctInG tHe rOtATiOn matRix To the hoRizontal plAne.
i'm Defining my roTAtIon matrix aS RyAw X Rpitch X RrOll, But doeS tHe aNSwer cHanGe if I ReversE The ordEr?

A:

Here is My BEst gueSS as to whAT YoU are Asking.  Typically if YAw, PItch, and roll are Given bY a VEcTOR of The Form $\left [ \alPhA \;\; \beta \;\; \GAmma \rigHT ]^T$ THEN thE Corresponding Rotation matRIceS assocIaTed TO this rEpresEnTAtiOn are given bY:
$$
R_z(\aLpha) \;\; =\;\; \left [ \bEgin{arRAy}{ccc}
\coS \Alpha & - \siN \alpha & 0 \\
\Sin\AlpHa & \coS\AlPhA & 0 \\
0 & 0& 1 \\
\enD{aRRay} \RIgHt ] \hSPacE{2pc} R_y(\betA) \;\; =\;\; \lEfT [ \begiN{arrAY}{CCC}
\cos \BetA & 0 & -\sin \Beta \\
0 & 1 & 0 \\
\sIn \beta & 0 & \cos \beta \\
\End{ArraY} \RigHt ]   \hspAce{2pc} r_x(\gaMmA) \;\; =\;\; \left [ \Begin{aRray}{cCc}
1 & 0 & 0 \\
0 & \Cos\gamma & - \sin \gammA \\
0 & \sin \Gamma & \cos \gAmmA \\
\eNd{aRrAy} \rigHT ]
$$
and a rOtaTioN matrix In $SO(3)$ can BE rePrESENtEd by $R(\alpha,\beta, \gammA) = R_Z(\ALpHa)R_y(\beta)r_x(\gammA)$.  

i hAvE A rotatioN mAtrIx crEATed by Some VAlUes of rolL, pitch, YAw
  AnD I'm lookInG for thE vAluE yaW2 s.t thE RotaTion maTrix creaTed
  by [0, 0, YAw2] is closest to tHE roration matrIX cREAtED by [rOll,
  Pitch, yaw].

WhaT I beLIeve You'rE AsKinG Here iS to fiNd SOmE Matrix of the form $R_z(\etA)$ wHich clOsest Represents the Matrix $R(\alpHA,\BEta
 looking for the value yaw 2 s.t therotat ion  ma tr ix c reat ed by [0, 0, y a w2]is closest to the rora tionma t rixc re atedby [rol l ,p i tch ,ya w]. 
I th ink I t c an be r ephrased a s p ro jecting ther ot ation matr ixto the horiz ont al pla ne .
I ' m def ini ng my  rotat i on mat rix as Ry aw X Rpit c h X Rro l l ,butdoes the answer c h an g e if I reverse  the o rd e r? A:
He re is my b es t gue s s as to wh a t you are asking. Typically i f  ya w, pit ch , a n d roll  aregi v enby a vector  ofthe form$\left [ \alph a  \;\; \ beta \ ;\;  \g amma \r ig ht]^ T $ t h en  th e  co rrespond in grotat ionm a t r ices  as soci atedto this repre sen tati o n a re gi ven b y:
$ $R_z(\ alpha)  \;\;  = \;\; \left [ \b egin {array}{c cc} 
\ cos  \ alpha & - \s in\al pha & 0  \\
\si n \al ph a &  \ cos\alpha & 0 \\
0  & 0 &1 \\
\en d{arra y }\r i ght ] \h sp ace {2pc } R_y(\ beta )  \ ;\; =\;\ ; \lef t  [  \ begin{a rr ay}{cc c} 
\c os\beta & 0& -\si n \beta\\
0&  1 & 0 \\
\sin \beta & 0 & \ c os \ be t a \\ 
\e nd{array} \ righ t  ]  \hs p ac e{2 p c} R_ x(\ga mm a )\ ;\; =\;\; \left [ \ be gin{ar ray}{ ccc}
1 & 0 &0 \\
0 & \ c o s \gamma &  - \ s in \gamma \\
0 &\sin\gamma & \ c os \gamm a \\\end{arr ay} \righ t ]
$$
and  arot ati onm a tr ix in $SO(3)$ c an b ereprese nte d by $R (\a lph a,\ bet a,  \gamma)= R_z(\a lp ha )R _y (\b eta)R _ x(\gamma )$ . 
I h ave a rotati on ma trix  c re a ted  by som e  v a l uesof  r oll,  pi tc h, ya w
 a ndI'm loo king forthe valu eya w2 s.tthe rotationma trix creat ed 
 by [0, 0 , yaw2]is closest to the rorat i on matr ixcreat ed b y [roll,  p itch,yaw ] .

Wha t I be lieve  y ou' r e  aski n g  h ere  i s to finds o mematri xof t he form  $R_z(\eta)$ which clo sest represen tsthem a tr ix$ R( \ alp ha , \be t a 
 looking_for the_value yaw2 s.t the_rotation matrix_created_by [0,_0,_yaw2] is closest_to the roration_matrix created by [roll,_pitch, yaw].
I think_It_can be rephrased as projecting the rotation matrix to the horizontal plane.
I'm defining my_rotation_matrix as_Ryaw_X_Rpitch X Rroll, but does_the answer change if I_reverse the_order?

A:

Here is my best guess as to what_you_are asking. _Typically if yaw, pitch, and roll are given by_a vector of the form $\left_[ \alpha \;\;_\beta_\;\;_\gamma \right ]^T$ then_the corresponding rotation matrices associated to_this representation are given by:
$$
R_z(\alpha) \;\;_=\;\; \left [ \begin{array}{ccc}
\cos \alpha & -_\sin \alpha & 0 \\
\sin\alpha &_\cos\alpha & 0 \\
0 &_0& 1_\\
\end{array} \right ] \hspace{2pc} R_y(\beta)_\;\; =\;\; \left_[ \begin{array}{ccc}
\cos_\beta & 0_& -\sin \beta \\
0 & 1_& 0 \\
\sin_\beta & 0 & \cos \beta_\\
\end{array}_\right ] __\hspace{2pc}_R_x(\gamma) \;\;_=\;\; \left [_\begin{array}{ccc}
1_& 0_&_0 \\
0 & \cos\gamma & -_\sin_\gamma \\
0 & \sin \gamma & \cos_\gamma \\
\end{array} \right ]
$$
and_a_rotation matrix in $SO(3)$_can be represented by $R(\alpha,\beta,_\gamma) = R_z(\alpha)R_y(\beta)R_x(\gamma)$.  

I have_a rotation_matrix created_by some values of roll, pitch, yaw
  and I'm looking_for the value yaw2 s.t the_rotation matrix created
 _by [0,_0,_yaw2] is closest_to_the roration_matrix created by [roll,
  pitch, yaw].

What_I believe_you're asking here is to find_some matrix of the_form_$R_z(\eta)$ which closest represents the matrix_$R(\alpha,\beta