Sequence of rotation matrices I want a rotation matrix $R$ that transforms +x axis to +y, +y to +z, and +z to +x. One way of doing it is by a rotation about +x by 90 deg anti-clockwise, followed by a rotation about +y by 90 deg anti-clockwise. The matrices respectively are:
$$R_1 = \begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & -1 \\
0 & 1 & 0 \\
\end{bmatrix}$$
$$R_2 = \begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
-1 & 0 & 0 \\
\end{bmatrix}$$
Since R1 first operates first followed by R2, the resultant, I think, is R=(R2)(R1). But when I cross-check by applying R to an arbitrary point, say (1,2,3), I don't get the right transform of (3,1,2). Instead, I get it right when I do R=(R1)(R2)  which doesn't make sense to me. Please help
 A: Good attempt Blaze! But seems that you made a common mistake. Before we start, let's review a theorem about the standard matrices for linear transformations:

Let $ \hspace{0.5mm}T: \mathbb R^n \rightarrow \mathbb R^m $ be a linear transformation. 
Then there exist an unique  $m \times n $ matrix $A$ such that $\hspace{0.8mm} T(\textbf{x})=A\textbf{x} \hspace{0.5mm}$ for all $\hspace{0.5mm} \textbf{x}\hspace{0.5mm} $ in $ \mathbb R^n$.
We call this matrix  $A$ the standard matrix of the linear transformation $T$ and
$\hspace{0.3mm}A = [\hspace{1mm} T(\textbf{e}_1) \hspace{3mm} T(\textbf{e}_2)\hspace{3mm}\cdot\cdot\cdot\hspace{3mm} T(\textbf{e}_n)\hspace{1mm} ] \hspace{0.5mm}$, where $\textbf{e}_j$ is the $j$-th column of the identity matrix in $\mathbb R^n$. 

This theorem appears in most texts about linear transformation, say Friedberg, Lay, etc. Indeed your matrix can be easily found with this theorem. First we reformulate the problem in the language of the theorem:
We are dealing with 3-dimensional space. So we want a linear transformation $T: \mathbb R^3 \rightarrow \mathbb R^3 $.
You want to map the x-axis to y-axis. And we have the 1st column of the identity matrix $I_3$, $\textbf{e}_1=(1,0,0)$ pointing in the x-direction. We also have the 2nd column $I_3$ pointing in the y-direction. Then we have  $\hspace{0.5mm}T(\textbf{e}_1) = \textbf{e}_2$. Similarly,  $\hspace{0.5mm}T(\textbf{e}_2) = \textbf{e}_3$ and $\hspace{0.5mm}T(\textbf{e}_3) = \textbf{e}_1$.
Then the standard matrix $A$ of our transformation is $A=[\hspace{1mm} T(\textbf{e}_1) \hspace{3mm} T(\textbf{e}_2)\hspace{3mm} T(\textbf{e}_3)\hspace{1mm} ] = [\hspace{1mm} \textbf{e}_2 \hspace{3mm} \textbf{e}_3\hspace{3mm} \textbf{e}_1\hspace{1mm} ]$= 
 \begin{pmatrix}
  0 & 0 & 1 \\
  1 & 0 &  0 \\
  0 & 1  &  0\\
 \end{pmatrix}
This method shall be cleanest and quickest :) 

However, what's wrong with your attempt then? Your think correctly but you read the matrices wrongly. Let's use the theorem in the box to read your matrices:
For $R_1$ , the linear transformation $T_1:\mathbb R^3 \rightarrow \mathbb R^3 $ defined by $T_1(\textbf{x})=R_1\textbf{x}$ does no change to +x-axis ($\textbf{e}_1$). It maps $\textbf{e}_2$ to $\textbf{e}_3$. And it maps $\textbf{e}_3$ to $-\textbf{e}_2$.
It is a good exercise for you to read $T_2(\textbf{x})=R_2\textbf{x}$ yourself. Then you will discover that if you do $T_1$ then $T_2$, you are mapping the $\textbf{e}_1$ to $-\textbf{e}_3$ which does not make sense. To learn more about this, compute $R=R_2R_1$. Then the first column shall exactly be $\textbf{e}_3=T_2(T_1(\textbf{e}_1))$. Doing matrix multiplication on two standard matrices of linear transformations corresponds to composition of the two linear transformation!
Hope that I, a non-math major undergrad can help! I am trying to type as most things as possible since I am trying to learn Latex:) Good luck!
A: The matrix
$$
            M = \left[\begin{array}{ccc}0 & 0 & 1 \\
                                        1 & 0 & 0 \\
                                        0 & 1 & 0 \end{array}\right]
$$
maps $+x$ to $+y$, maps $+y$ to $+z$ and $+z$ to $+x$. You can see this by direct verification. Because it maps a right-hand triple to a right-hand triple, then $M$ is a rotation matrix. (You can also see that $\mbox{det}(M)=1$.)
A: In general, a transformation matrix is just the transformation with respect to the standard basis vectors, and so your matrix will simply be the set $M={v_1^`,v_2^`,v_3^`}$ making your matrix read $$\begin{matrix}{{0,0,1}\\{1,0,0}\\{0,1,0}}\end{matrix}$$
The proof that this works is that matrices are linear transformations, meaning that $T(av+bu)=aT(v)+bT(u)$, and so since any vector can be represented as a combination of the basis vectors, the transformation on any vector is the same as that transformation on the linear combination of basis vectors, and you already know that the basis vectors end up where you want them.
A: Let $e_1=[1,0,0]$, $e_2=[0,1,0]$, $e_3=[0,0,1]$. The affine plane $P$ containing these points is the plane of equation $(x+y+z=1)$. In this plane, you want to turn around the center of gravity $G$ of the equilateral triangle $e_1e_2e_3$ with angle of $\dfrac{2\pi}{3}$. 
Finally, the axis of your rotation $R$ is the line perpendicular to $P$ passing through $G$ (make a drawing!). 
I let you the computations of the matrix of $R$ (base change, etc.). 
A: your question was perfect for me. I was with the same error and also same wrong conclusion that should be $R = R_1.R_2$ instead the real correct sequence $R = R_2.R_1$.
In the last 3 hours trying to discover my error. I knew how to get the R matrix directly showed in the previous answers. But I was interest also in get the rotation as composition of sequencial rotations.
The math is correct ($R = R_2.R_1$), but you defined the $R_2$ with the wrong basis.
You defined $R_2$ as a rotation of 90º around Y (but note that it is Y after make the rotation $R_1$, so it is a intrinsic rotation). Instead, your $R_2$ should be defined as a 90º around your axis Z of your original basis.
In space, the direction is the same for y (after $R_1$) and z.
So, your should have:
$$
R_2 = 
\begin{bmatrix}
0 & -1  & 0 \\
1 &  0  & 0 \\
0 &  0  & 1 \\
\end{bmatrix}
$$
Then,
$$
R = [R_2].[R_1]= 
\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}
$$
I hope this helps.
