
On the Cartesian plane, if we walk along the x-direction (1, 0) for a distance of 4 units, then turn left 90 degrees (perpendicular) and walk a distance of 3 units, we arrive at the point (4, 3), which is a distance of 5 units from the origin (42 + 32 = 52), great. Well, what happens if we do the same, but start off walking in any direction (Dx, Dy) 4 units and then turn left 90 degrees (-Dy, Dx) and walk 3 units; we are still 5 units from the origin. We have just “rotated” the whole path to a new direction. Where would we end up (x, y)? We use our orienteering skills:
(x, y) = (Dx, Dy)*4 + (-Dy, Dx)*3
(x, y) = [(Dx, Dy), (-Dy, Dx)].(4, 3) – using the dot product
Now notice that the matrix [(Dx, Dy), (-Dy, Dx)] when dotted with the cartesian point (4, 3) rotates it to another point on the circle (radius 5). See the diagram. This matrix is called the “rotation matrix”.
Now that we are getting a bit more comfortable with the dot product, let’s play around and see what happens when we dot direction vectors with each other? We’ll start off by dotting a direction with itself:
(Dx, Dy).(Dx, Dy) = Dx2 + Dy2 = 1
Any direction dotted with itself is just “1”. What about dotting a direction with its perpendicular direction?
(Dx, Dy).(-Dy, Dx) = Dx*(-Dy) + Dy*Dx = 0
It turns out that any direction dotted with its perpendicular direction is “0”. Now how about dotting the position (x, y) above with the direction vector?
(Dx, Dy).(x, y) = (Dx, Dy).((Dx, Dy)*4 + (-Dy, Dx)*3)
= (Dx, Dy).(Dx, Dy)*4 + (Dx, Dy).(-Dy, Dx)*3
= 1*4 + 0*3
= 4
And so, dotting a direction vector (Dx, Dy) with any position vector (x, y) gives you the distance (Sx) you would have to travel in that direction before making a 90 turn and traveling the distance (Sy) that would bring you to the position (x, y). Now let’s dot the perpendicular direction with the position vector:
(-Dy, Dx).(x, y) = (-Dy, Dx).((Dx, Dy)*4 + (-Dy, Dx)*3)
= (-Dy, Dx).(Dx, Dy)*4 + (-Dy, Dx).(-Dy, Dx)*3
= 0*4 + 1*3
= 3
You can see that dotting the perpendicular direction with a position also gives you the distance (Sy) you would have to travel in the perpendicular direction (-Dy, Dx) to get to the position (x, y).
And so can you see that in this case:
[(Dx, Dy), (-Dy, Dx)].(x, y) = (4, 3)
So in general if
(x, y) = [(Dx, Dy), (-Dy, Dx)].(Sx, Sy)
then
[(Dx, Dy), (-Dy, Dx)].(x, y) = (Sx, Sy)
What does this mean? The rotation matrix […] when it “operates” on (is dotted with) any point (x, y), gives you the coordinates of the point relative to a new set of “x-y” axis that is pointing in a direction (Dx, Dy) relative to the old axis. Or you can say that it rotates the point around the origin. Either vantage point is valid, you can rotate the point around the origin or rotate the reference frame in the opposite way around the origin; either way, it is describing the same thing.
Remember the concept of “rotational symmetry”, that we can pick the direction of the x-y axis to be in any direction we want. Now we have the tools to convert the cartesian coordinates of a set of points from any reference frame to a reference frame pointing in any direction we choose.
THIS IS A FUNDAMENTAL CONCEPT of the MATH Language: ROTATIONAL SYMMETRY means that the universe is the same no matter the direction of your frame of reference. The Rotation matrix gives you a way of describing the same universe from any prospective of direction. It is pure magic.
One more point, remember that
(Dx, Dy) = (Cos(A), Sin(A))
Where “A” is the angle of the direction off x-axis. Thus, the rotation matrix “R(A)” can be written as:
R(A) = [(Cos(A), Sin(A)), (-Sin(A), Cos(A))]
And there you have it.