# Difference between two transformation matrices

#### akerer

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!

#### SlipEternal

MHF Helper
Do you have an example?

#### akerer

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.