[Math] A 4×4 homogeneous matrix for a 90 degree rotation about Y axis

matricesrotations

According to my book

Rotations through an angle $\theta$ about the $x$, $y$, and $z$ axes are performed using the following transformation matrices.

For example,
$$ R_x(\theta) = \left[
\begin{matrix}
1& 0 & 0 \\\
0& \cos\theta &-\sin\theta\\\
0& \sin\theta &\cos\theta
\end{matrix}\right]
$$

Ry0= | cos0 0 sin0 0|
     | 0 1 0 0|
     | -sin0 0 cos0 0|
     | 0 0 0 1|


Rz0= | cos0 -sin0 0 0 |
     | sin0 cos0 0  0|
     | 0 0 1 0|
     | 0 0 0 1|

And I just need to put the angle in it no matter which rotate about axis?
After that, how can I get a $4\times 4$ matrix?

Thank you

Best Answer

To express ordinary $\mathbb{R}^n \to \mathbb{R}^n$ linear transformation into homogeneous coordinates just add another row and column where every term is equal to $0$ but the diagonal, which should be $1$.

For example if $A$ is your transformation matrix, then the new matrix would be $$A_H = \left[\begin{matrix}A& 0 \\\ 0& 1 \end{matrix}\right].$$ In your example $$A = \left[\begin{matrix}1& 0 & 0 \\\ 0& \cos\theta &-\sin\theta\\\ 0& \sin\theta &\cos\theta \end{matrix}\right],$$ so $$A_H = \left[\begin{matrix}1& 0 & 0 & 0 \\\ 0& \cos\theta &-\sin\theta & 0 \\\ 0& \sin\theta &\cos\theta & 0 \\\ 0 & 0 & 0 & 1 \end{matrix}\right].$$

Hope that helps ;-)

Related Question