user
What is the expression of a rotation matrix around Y axis?
alphonsio

Rotation matrix around y axis

The rotation matrix around the Y-axis by an angle θ\theta is given by:

Ry(β)=(cos⁡(β)0sin⁡(β)010−sin⁡(β)0cos⁡(β))R_y(\beta) = \begin{pmatrix} \cos(\beta) & 0 & \sin(\beta) \\ 0 & 1 & 0 \\ -\sin(\beta) & 0 & \cos(\beta) \end{pmatrix}


The general expression of the transformation matrix is :

Ry(β)=(cos(β)0sin(β)00100−sin(β)0cos(β)00001)R_y(\beta) = \begin{pmatrix} cos(\beta) && 0 && sin(\beta) && 0 \\ 0 && 1 && 0 && 0 \\ -sin(\beta) && 0 && cos(\beta) && 0 \\ 0 && 0 && 0 && 1 \end{pmatrix}

This matrix is used to rotate a point or a vector in three-dimensional space around the Y-axis.

Example

Example of a rotation around y of 90°

Suppose we want to rotate the point P(1,0,0)P(1, 0, 0) by an angle of 90∘90^\circ (or π2\frac{\pi}{2} radians) around the Y-axis.

  1. Define the rotation angle:
    θ=90∘=π2\theta = 90^\circ = \frac{\pi}{2}

  2. Calculate the rotation matrix:

Ry(π2)=(cos⁡(π2)0sin⁡(π2)010−sin⁡(π2)0cos(π2))=(001010−100)R_y\left(\frac{\pi}{2}\right) = \begin{pmatrix} \cos\left(\frac{\pi}{2}\right) & 0 & \sin\left(\frac{\pi}{2}\right) \\ 0 & 1 & 0 \\ -\sin\left(\frac{\pi}{2}\right) & 0 & cos\left(\frac{\pi}{2}\right) \end{pmatrix} = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{pmatrix}

  1. Apply the rotation matrix to the point: Let P=(100)P = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}.

    Multiply the rotation matrix by the point:

P′=Ry(π2)⋅P=(001010−100)(100)=(00−1)P' = R_y\left(\frac{\pi}{2}\right) \cdot P = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ -1 \end{pmatrix}

Result

After rotating the point P(1,0,0)P(1, 0, 0) by 90∘90^\circ around the Y-axis, the new coordinates of the point become P′(0,0,−1)P'(0, 0, -1).