Ma · Mathematics

Why Do Rotation Matrices About the y-Axis Have Different Signs?

Published By the 9to5Science editorial team

At a glance

  1. 1. Fix the convention

    Use a right-handed coordinate system, column vectors, and an active rotation of the vector.

  2. 2. Write the matrix

    A positive rotation about y leaves the y-coordinate unchanged and rotates the xz-plane.

  3. 3. Check a basis vector

    Rotate the positive x-axis by 90 degrees; it should point in the negative z-direction.

  4. 4. Compare conventions

    A passive coordinate change or row-vector convention uses the inverse, which transposes the matrix.

The signs in a rotation matrix depend on what is being rotated and how vectors are represented. With the usual convention—a right-handed coordinate system, column vectors, and an active rotation of the vector—the rotation by angle θ\theta about the positive yy-axis is

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

The most useful way to check the signs is to apply the matrix to a coordinate-axis vector and use the right-hand rule. If you see the opposite signs in a book or software library, check whether it is describing a passive coordinate transformation or using row vectors.

What the standard matrix does

An active rotation moves a vector while keeping the coordinate axes fixed. For a column vector

v=(xyz),\mathbf v=\begin{pmatrix}x\\y\\z\end{pmatrix},

multiplication gives

Ry(θ)v=(xcos⁡θ+zsin⁡θy−xsin⁡θ+zcos⁡θ).R_y(\theta)\mathbf v= \begin{pmatrix} x\cos\theta+z\sin\theta\\ y\\ -x\sin\theta+z\cos\theta \end{pmatrix}.

The yy-coordinate stays the same because the vector rotates around the yy-axis. The xx and zz coordinates mix, just as the xx and yy coordinates mix in a rotation in the plane.

Why the signs have this order

In a right-handed coordinate system, positive rotation about an axis follows the right-hand rule: point your right thumb along the positive axis, and your curled fingers show the direction of positive rotation. For the positive yy-axis, a vector initially pointing along positive xx turns toward negative zz.

That gives a quick sign check. Set θ=90∘\theta=90^\circ and apply the matrix to the positive xx-direction:

Ry(90∘)(100)=(00−1).R_y(90^\circ) \begin{pmatrix}1\\0\\0\end{pmatrix} = \begin{pmatrix}0\\0\\-1\end{pmatrix}.

So positive xx has moved to negative zz, as the right-hand rule requires. Similarly, the positive zz-direction moves to positive xx:

Ry(90∘)(001)=(100).R_y(90^\circ) \begin{pmatrix}0\\0\\1\end{pmatrix} = \begin{pmatrix}1\\0\\0\end{pmatrix}.

These checks are often clearer than trying to remember which off-diagonal entry gets a plus sign.

Why another source may show the opposite signs

You may also encounter

(cos⁡θ0−sin⁡θ010sin⁡θ0cos⁡θ).\begin{pmatrix} \cos\theta & 0 & -\sin\theta\\ 0 & 1 & 0\\ \sin\theta & 0 & \cos\theta \end{pmatrix}.

This is Ry(−θ)R_y(-\theta), the inverse (or transpose) of the standard active rotation matrix. It commonly appears when the axes or coordinate frame are rotated while the geometric vector is held fixed. That is a passive transformation: the vector’s coordinates change in the opposite direction to the active rotation.

The same transpose appears if a convention represents vectors as rows rather than columns. With row vectors, you multiply on the right, so the matrix used for the same geometric transformation is transposed. Some applications also choose a left-handed coordinate system or define positive angles differently. Always identify the convention before comparing signs.

Common mistakes

  • Using the right-hand rule from the wrong end of the axis. Imagine looking along the positive axis toward the origin, or use the thumb-and-fingers rule consistently; reversing the viewing direction can make the apparent turn look opposite.
  • Mixing active and passive rotations. Rotating the object by θ\theta and rotating the coordinate frame by θ\theta produce inverse coordinate operations.
  • Forgetting the vector convention. A matrix acting on column vectors from the left and a matrix acting on row vectors from the right are transposes for the same transformation.
  • Checking only the cosine entries. The diagonal terms are the same for θ\theta and −θ-\theta; the sine terms reveal the sign convention.

If you are implementing a rotation, test it on a basis vector at 90∘90^\circ. That catches a sign or convention mismatch immediately.

References

  1. Classical Mechanics, Herbert Goldstein, Charles Poole, and John Safko

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.