# A 4x4 homogeneous matrix for a 90 degree rotation about Y axis?

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

-

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 ;-)

-
 Thanks , it helps, how about y and z? – Leo Chan Apr 21 '12 at 10:39 Is my try correct ? Thank you........... – Leo Chan Apr 21 '12 at 10:42 Yes, it is, as long you know the difference between $0$ (zero) and $\theta$ (theta). For more information try en.wikipedia.org/wiki/Rotation_matrix and en.wikipedia.org/wiki/Transformation_matrix, actually there is a lot on this on the web, GIYF. – dtldarek Apr 21 '12 at 10:44 Thanks for your help – Leo Chan Apr 21 '12 at 11:06