# Rotations with sin(-theta) & -sin(theta)

Hello!

so glRotate(theta, 0, 0, 1), would create the matrix:
(simplified)

cos(theta) -sin(theta)
sin(theta) cos(theta)

correct?

So would glRotate(-theta, 0, 0, 1) create the matrix:

cos(theta) -sin(-theta)
sin(theta) cos(theta)

?

And if I somehow end up with the transpose I.E :

cos(theta) sin(theta)
-sin(theta) cos(theta)

How would that affect the rotation?

You are wrong on the second matrix, it should be:

cos(theta) -sin(-theta)
sin(-theta) cos(theta)

remember that sin is an odd function, ie
for all x in R, sin(-x)=-sin(x)

so you can rewrite it as:

cos(theta) sin(theta)
-sin(theta) cos(theta)

which is the transpose.

In general, for an orthonormal matrix M, the inverse of M is
the transpose of M. A rotation matrix is a special case of orthonormal matrix: its determinant is equal to 1. So you can
apply this rule to any rotation matrix. Geometrically, if you
rotate theta one way, the inverse transform is to rotate theta
the other way, ie to rotate -theta the same way.

In general, the inverse of an invertible square matrix is not its transpose. This is just for orthonormal matrices.

Actually, you are also wrong on the second matrix it should be:

cos(-theta) -sin(-theta)
sin(-theta) cos(-theta)

although, cos(theta) is the same as cos(-theta)…so that is ok.

ok I think I’ve got it