# Thread: Difference between two transformation matrices

1. ## Difference between two transformation matrices

Hi all,

I have two 4x4 transformation matrices (rigid transformation) that are applied to the same cylindrical surface-object. Now, what I would like to do is to measure the difference of the objects along the direction of the cylinder (let's call it z'-axis) and also in the xy'-plane. Because the coordination system changes, I find it difficult to figure out how to calculate the difference in the correct direction (i.e. along the axis of the cylinder and xy'-plane).

Help would be appreciated!

2. ## Re: Difference between two transformation matrices

Do you have an example?

3. ## Re: Difference between two transformation matrices

let's say we have a matrix that transforms an object 30 degrees around each axis and 0.2 to each direction:

T1:

0.75000 -0.2165 0.6249 0.2000
0.4330 0.8750 -0.2165 0.2000
-0.4999 0.4330 0.7500 0.2000
0.0000 0.0000 0.0000 1.0000

and the other matrix is transforming the same object 31 degrees and only 0.1 to each direction.

T2:

0.7347 -0.2140 0.6436 0.1000
0.4414 0.8713 -0.2140 0.1000
-0.5150 0.4414 0.7347 0.1000
0.0000 0.0000 0.0000 1.0000

Now, I would like to know the difference along the axis (of either one) of the cylinder as well as its xy-plane.

4. ## Re: Difference between two transformation matrices

Here is information on the change of basis from cartesian to cylindrical coordinates: https://en.wikipedia.org/wiki/List_o...al_coordinates

Extending that to your change of basis in four dimensions is likely:

$$\begin{pmatrix}\tfrac{x}{\sqrt{x^2+y^2}} & \tfrac{y}{\sqrt{x^2+y^2}} & 0 & 0 \\ \tfrac{-y}{\sqrt{x^2+y^2}} & \tfrac{x}{\sqrt{x^2+y^2}} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1\end{pmatrix}$$