Correct option is (b) cosθ
For explanation I would say: We first convert ar to Cartesian coordinates. Substituting the values in the formula,
\(\begin{bmatrix}
Px\\
Py\\
Pz\\
\end{bmatrix} \)
\(= \begin{bmatrix}
sin\theta cosφ & cos\theta cosφ & -sinφ\\
sin\theta sinφ & cos\theta sinφ & cosφ\\
cos\theta & -sin\theta & 0\\
\end{bmatrix} \)
\(= \begin{bmatrix}
1\\
0\\
0\\
\end{bmatrix} \), we get cosθ.