### 2D Rotation

 ${R}_{z}^{2}\left(\theta \right)=\left[\begin{array}{cc}\mathrm{cos}\theta & -\mathrm{sin}\theta \\ \mathrm{sin}\theta & \mathrm{cos}\theta \end{array}\right]$ ${R}_{z}^{2}\left(0\right)=\left[\begin{array}{cc}1& 0\\ 0& 1\end{array}\right]$ ${R}_{z}^{2}\left(90\right)=\left[\begin{array}{cc}0& -1\\ 1& 0\end{array}\right]$ ${R}_{z}^{2}\left(180\right)=\left[\begin{array}{cc}-1& 0\\ 0& -1\end{array}\right]$

### 3D Rotation

 ${R}_{x}^{3}\left(\theta \right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\theta & -\mathrm{sin}\theta \\ 0& \mathrm{sin}\theta & \mathrm{cos}\theta \end{array}\right]$ ${R}_{y}^{3}\left(\theta \right)=\left[\begin{array}{ccc}\mathrm{cos}\theta & 0& -\mathrm{sin}\theta \\ 0& 1& 0\\ \mathrm{sin}\theta & 0& \mathrm{cos}\theta \end{array}\right]$ ${R}_{z}^{3}\left(\theta \right)=\left[\begin{array}{ccc}\mathrm{cos}\theta & -\mathrm{sin}\theta & 0\\ \mathrm{sin}\theta & \mathrm{cos}\theta & 0\\ 0& 0& 1\end{array}\right]$ ${R}_{x}^{3}\left(0\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right]$ ${R}_{y}^{3}\left(0\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right]$ ${R}_{z}^{3}\left(0\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right]$ ${R}_{x}^{3}\left(90\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& 0& -1\\ 0& 1& 0\end{array}\right]$ ${R}_{y}^{3}\left(90\right)=\left[\begin{array}{ccc}0& 0& -1\\ 0& 1& 0\\ 1& 0& 0\end{array}\right]$ ${R}_{z}^{3}\left(90\right)=\left[\begin{array}{ccc}0& -1& 0\\ 1& 0& 0\\ 0& 0& 1\end{array}\right]$ ${R}_{x}^{3}\left(180\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& -1& 0\\ 0& 0& -1\end{array}\right]$ ${R}_{y}^{3}\left(180\right)=\left[\begin{array}{ccc}-1& 0& 0\\ 0& 1& 0\\ 0& 0& -1\end{array}\right]$ ${R}_{z}^{3}\left(180\right)=\left[\begin{array}{ccc}-1& 0& 0\\ 0& -1& 0\\ 0& 0& 1\end{array}\right]$ ${R}_{x}^{3}\left(270\right)=\left[\begin{array}{ccc}1& 0& 0\\ 0& 0& 1\\ 0& -1& 0\end{array}\right]$ ${R}_{y}^{3}\left(270\right)=\left[\begin{array}{ccc}0& 0& 1\\ 0& 1& 0\\ -1& 0& 0\end{array}\right]$ ${R}_{z}^{3}\left(270\right)=\left[\begin{array}{ccc}0& 1& 0\\ -1& 0& 0\\ 0& 0& 1\end{array}\right]$

### 4D Rotation

 ${R}_{\mathrm{zw}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}\mathrm{cos}\theta & -\mathrm{sin}\theta & 0& 0\\ \mathrm{sin}\theta & \mathrm{cos}\theta & 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right]$ ${R}_{\mathrm{yw}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}\mathrm{cos}\theta & 0& -\mathrm{sin}\theta & 0\\ 0& 1& 0& 0\\ \mathrm{sin}\theta & 0& \mathrm{cos}\theta & 0\\ 0& 0& 0& 1\end{array}\right]$ ${R}_{\mathrm{xw}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& \mathrm{cos}\theta & -\mathrm{sin}\theta & 0\\ 0& \mathrm{sin}\theta & \mathrm{cos}\theta & 0\\ 0& 0& 0& 1\end{array}\right]$ ${R}_{\mathrm{xy}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& 0& 0\\ 0& 0& \mathrm{cos}\theta & -\mathrm{sin}\theta \\ 0& 0& \mathrm{sin}\theta & \mathrm{cos}\theta \end{array}\right]$ ${R}_{\mathrm{xz}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& \mathrm{cos}\theta & 0& -\mathrm{sin}\theta \\ 0& 0& 1& 0\\ 0& \mathrm{sin}\theta & 0& \mathrm{cos}\theta \end{array}\right]$ ${R}_{\mathrm{yz}}^{4}\left(\theta \right)=\left[\begin{array}{cccc}\mathrm{cos}\theta & 0& 0& -\mathrm{sin}\theta \\ 0& 1& 0& 0\\ 0& 0& 1& 0\\ \mathrm{sin}\theta & 0& 0& \mathrm{cos}\theta \end{array}\right]$