Abstract
On this page we will show that a rotation, about any point, is equivalent to a rotation (by the same angles) about the origin combined with a linear translation. We already have lots of methods for calculating a rotation about the origin (such as matrices and quaternions) so to rotate about any point, other than the origin, we do the rotation as if it was around the origin then apply a linear transform to get the same result.
For two dimensional rotations about x,y we can represent it with the following 3x3 matrix:
| r00 | r01 | x - r00*x - r01*y |
| r10 | r11 | y - r10*x - r11*y |
| 0 | 0 | 1 |
This represents the same as rotating round the origin but offset by (- r00*x - r01*y, - r10*x - r11*y).
For three dimensional rotations about x,y we can represent it with the following 4x4 matrix:
| r00 | r01 | r02 | x - r00*x - r01*y - r02*z |
| r10 | r11 | r12 | y - r10*x - r11*y - r12*z |
| r20 | r21 | r22 | z - r20*x - r21*y - r22*z |
| 0 | 0 | 0 | 1 |
This represents the same as rotating round the origin but offset by (- r00*x - r01*y - r02*z,- r10*x - r11*y - r12*z,- r20*x - r21*y - r22*z).
We will then go on to show that, in two dimensions only, that the converse is also true. That is any combination of translation and rotation can be represented by a single rotation provided that we choose the correct point to rotate it around.
Prerequisites
If you are not familiar with this subject you may like to look at the following pages first:
Combined Rotation and Translation
In order to calculate the rotation about any arbitrary point we need to calculate its new rotation and translation. In other words rotation about a point is an 'proper' isometry transformation' which means that it has a linear and a rotational component.
Assume we have a matrix [R0] which defines a rotation about the origin:

We now want to apply this same rotation but about an arbitrary point P:

As we can see its orientation is the same as if it had been rotated about the origin, but it has been translated to a different point on space by the rotation.
In order to prove this and to calculate the amount of linear translation we need to replace:
- translate about arbitrary point P (Px,Py,Pz).
With the following 3 simpler transforms which, when done in order, are equivalent:
- translate the arbitrary point to the origin (subtract P which is translate by -Px,-Py,-Pz)
- rotate about the origin (can use 3x3 matrix R0)
- then translate back. (add P which is translate by +Px,+Py,+Pz)
So if we are using the global frame-of-reference (as explained here)
then,
[resulting transform] = [third transform] * [second transform] * [first rotation]
[resulting transform] = [+Px,+Py,+Pz] * [rotation] * [-Px,-Py,-Pz]
Note for matrix algebra, the order of operations is important, so these translations do not cancel out.
So matrix representing rotation about a given point is:
[R] = [T]-1 * [R0] * [T]
where:
[T]-1 = inverse transform = translation of point to origin
| 1 | 0 | 0 | x |
| 0 | 1 | 0 | y |
| 0 | 0 | 1 | z |
| 0 | 0 | 0 | 1 |
[R0] = rotation about origin (if this is not clear see this discussion)
| r00 | r01 | r02 | 0 |
| r10 | r11 | r12 | 0 |
| r20 | r21 | r22 | 0 |
| 0 | 0 | 0 | 1 |
[T] = translation of origin to point
| 1 | 0 | 0 | -x |
| 0 | 1 | 0 | -y |
| 0 | 0 | 1 | -z |
| 0 | 0 | 0 | 1 |
When these matrices are multiplied this will give the following result for rotation about x,y,z:
(to see all the steps see this page)
| r00 | r01 | r02 | x - r00*x - r01*y - r02*z |
| r10 | r11 | r12 | y - r10*x - r11*y - r12*z |
| r20 | r21 | r22 | z - r20*x - r21*y - r22*z |
| 0 | 0 | 0 | 1 |
So the rotational components are the same but the rotation moves the position of the centre.
Isometry in 2 dimensions SE(2)
We now want to test the converse, that is, any combination of translation and rotation can be represented by a single rotation provided that we choose the correct point to rotate it around.
Imagine that we want to transform the solid body at 'A' into the solid body at 'B'

Then we can define a point on A (such as the centre-of-mass) and the corresponding point on B. We can then combine two transforms:
- Do a linear translation such that the point on 'A' is transformed to the point on 'B'.
- Do a rotation about the point so that the solid body is correctly transformed.
However, there is a second option, we can do the translation all in one rotation:

So, provided that we can find a suitable point to rotate around (in the above example shown as green point) we can do the translation and rotation in one operation. The point that we rotate around must by equidistant to the chosen point on each body, therefore it must lie on a line perpendicular to the line joining the two points. So is there always a point that we can find that will do any combination of translation and rotation? To find out we can take two extremes:
- If the rotation point is exactly in the middle of the two objects then the object will be rotated by 180 degrees.
- If the rotating point is at infinity along the bisecting line then the object is translated only and the rotation will be zero.
By putting the point at some distance between these we can get any rotation between 0 and 180 degrees. We can get negative angles by moving in the opposite direction along the line.
Therefore we can do any rotation, translation combination in one rotation.
Doing the rotation-translation in one operation like this can make some calculations simpler and we don't have to consider whether we do the rotation around its original position first and then the translation, or do the translation first and then the rotation about its final position, or do a translation to the mid point first, then the rotation about the mid position and then the final half translation.
Calculating Rotation Point
Given a translation (specified by a 2D vector) and a rotation (specified by a scalar angle in radians) how do we calculate the rotation point P ?
We know the points A and B and the angle at P which is theta.
sin(theta/2) = v/(2*r)
r = v/(2*sin(theta/2))
where:
- r = scalar distance of P from both A and B
- v = scalar distance of B from A
- theta angle of rotation
We also know by Pythagoras:
(Px - Ax)2 + (Py - Ay)2 = r2
(Px - Bx)2 + (Py - By)2 = r2
This is getting a bit messy! Can we solve for P in vector coordinates?
I think I will have to give up with this approach and instead invert the matrix equations that we started with:
From the matrix derived above:
| r00 | r01 | x - r00*x - r01*y |
| r10 | r11 | y - r10*x - r11*y |
| 0 | 0 | 1 |
we get equations for offset:
Offsetx = x - r00*x - r01*y
Offsety = y - r10*x - r11*y
Where:
- Offset = linear distance that a point on the object has moved.
- x, y = coordinates of the point we are rotating around (relative to initial position of object).
We want to solve for x and y so we take the inverse of:
|
= |
|
|
to give:














