# Extracting transformation between 2 transformation matrices

I have a hierarchy of bones and final transformation matrices for each bone. My question is, is there a way to extract the transformation (rotation in euler angles and translation) between 2 matrices (belonging to parent and child bones)?

I have tried multiplying parent's inverse with child's transformation but decomposed transformation data was incorrect.

Let's say you have torso with transformation $T_0$ (a bend) and a hand with final transformation $T_1$ (raising hand). That implies that a point $v_0=(x,y,z,1)^T$ belonging to torso in reference coordinates will have global coordinates $T_0v_0$ and the same for the hand $T_1v_1$.
Let $M$ be tranformation between torso and hand, then $$T_1 = T_0M,$$ because both transformations are given in local coordinates (our model raises hand first and then bends). Thus, $M=T_0^{-1}T_1$.
Finally, tranformation matrix $M$ consists of rotation matrix part and translation vector. Finding Euler angles from rotation matrix is a well-known problem.