# Rotation matrix

by dirk_mec1
Tags: matrix, rotation
 Math Emeritus Sci Advisor Thanks PF Gold P: 39,497 Rotation about the x-axis through angle $\alpha$ is given by the matrix $$\begin{bmatrix}1 & 0 & 0 \\ 0 & cos(\alpha) & -sin(\alpha) \\ 0 & sin(\alpha) & cos(\alpha)\end{bmatrix}$$ Rotation about the y-axis through angle $\beta$ is given by the matrix $$\begin{bmatrix}cos(\beta) & 0 & -sin(\beta) \\ 0 & 1 & 0 \\ sin(\beta) & 0 & cos(\beta)\end{bmatrix}$$ Rotation about the z-axis through angle $\gamma$ is given by the matrix $$\begin{bmatrix} cos(\gamma) & -sin(\gamma) & 0 \\ sin(\gamma) & cos(\gamma) & 0 \\ 0 & 0 & 1\end{bmatrix}$$ The result of all those rotations is the product of those matrices. Be sure to multiply in the correct order.
 P: 677 I suspect that there's a minus sign somewhere wrongly placed in your matrices Halls, am I correct? I moved the minus sign in your second matrix to the lower sine but there's still something wrong for this is my result: [ cos(a)cos(b), -sin(b), cos(b)sin(a) ] [ sin(a)sin(c) + cos(a)cos(c)sin(b) cos(b)cos(c) cos(c)*sin(a)sin(b) - cos(a)sin(c) ] [ cos(a)sin(b)sin(c) - cos(c)sin(a) cos(b)*sin(c) cos(a)cos(c) + sin(a)sin(b)sin(c) ]