A rotation matrix is like a magic tool in the world of linear algebra, designed to rotate vectors in space with precision and ease. Imagine you have a vector, a small arrow pointing somewhere in space, and you want to rotate it around a certain point, like spinning a key around a keychain. That’s exactly what a rotation matrix helps you do.
To see how the rotation matrix emerges, let’s start with a vector in R² and try to rotate it along the horizontal axis.
The following figure shows a vector v in R² which forms the angle to with horizontal axis. Let’s say we want to rotate it ‘b degrees’ counterclockwise along the horizontal axis, which is denoted by v’.
As we can see, rotation simply changes the direction of v and keeps the length (aka ‘magnitude’) the same.
In R², we can represent the vector v as the ordered tuple (m, n) with the first element on the horizontal axis and the second element on the vertical axis. From trigonometry we know that the coordinates of v=(m, n) can be represented as (||v||.cos(a), ||v||.sin(a)):
Similarly, v’ can be represented as (||v||.cos(a+b), ||v||.sin(a+b)):
So our problem is to find an application of va v’. Any vector can be transformed into another vector through matrix multiplication, especially when rotations are involved. If you have a vector v and you want to transform it to another vector v′ through rotation, then there exists a rotation matrix TO which can perform this task:
From the above equation, it seems to be a good idea to represent v and v’ as vectors to do some calculations with them. The vector representation of v is the following (the first…