Answer
$\left[\begin{array}{cccc}
\frac{\sqrt{3}}{2} & \frac{1}{2} & 0 & 5 \\
-\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 & -2 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 1
\end{array}\right]$
Work Step by Step
\[
\left[\begin{array}{ccc}
\frac{\sqrt{3}}{2} & \frac{1}{2} & 0 \\
-\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\
0 & 0 & 1
\end{array}\right]
\]
Get the $3 \times 3$ matrix for the rotation. The
vector $\mathbf{e}_{3}$ on $\mathrm{z}$ axis does not move, vector $\mathbf{e}_{1}$ stop at $\left(\cos \left(-30^{\circ}\right),-\sin \left(-30^{\circ}\right), 0\right)$ and vector $\mathbf{e}_{2}$ stops at
$\left(\sin \left(-30^{\circ}\right), \cos \left(-30^{\circ}\right), 0\right) .$ so the standard
matrix for this rotation is here.
\[
\left[\begin{array}{cccc}
\frac{\sqrt{3}}{2} & \frac{1}{2} & 0 & 0 \\
-\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right]
\]
The required rotation matrix for homogeneous coordinates.
\[
\left[\begin{array}{cccc}
\frac{\sqrt{3}}{2} & \frac{1}{2} & 0 & 5 \\
-\frac{1}{2} & \frac{\sqrt{3}}{2} & 0 & -2 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 1
\end{array}\right]
\]
The required rotation matrix with translated points $P(5,-2,1)$ for homogeneous coordinates.