Compute the rotation degrees from transformation matrix in 3D space Assume I have 3 original points in a 3D object (in 3D space) as A1=<xa,ya,za>, A2=<xa,ya,za>, and A3=<xa,ya,za>. The 3D object is moved and rotated in the 3D space, and the destination points in that object become B1=<xb,yb,zb>, B2=<xb,yb,zb>, and B3=<xb,yb,zb>. 
How can I compute the transformation matrix and following that, the degree of rotation in each axis? Basically, I need a matrix that if applied to all points, I get the displaced object.
 A: For there to be a unique solution, the points on the object must not be colinear. Let’s proceed assuming that they are not.  
Working in homogeneous coordinates, the transformation matrix will have the block form $$M=\begin{bmatrix}R&\mid&\mathbf t\end{bmatrix}$$ where $R$ is a $3\times3$ rotation matrix and $\mathbf t$ is a vector that represents the translation to be applied after rotation. The rotation matrix $R$ can itself be decomposed as $$R=\begin{bmatrix}\mathbf u&\mathbf v&\mathbf u\times\mathbf v\end{bmatrix}$$ with $\|\mathbf u\|=\|\mathbf v\|=1$ and $\mathbf u\cdot\mathbf v=0$. Thus, you have nine unknowns in $M$: the coordinates of $\mathbf u$, $\mathbf v$ and $\mathbf t$. The correspondences of the “before” and “after” points can be summarized in the matrix equation $$\begin{bmatrix}R&\mid&\mathbf t\end{bmatrix}\begin{bmatrix}A_1&A_2&A_3\\1&1&1\end{bmatrix}=\begin{bmatrix}B_1&B_2&B_3\end{bmatrix}.$$ This expands into a system of nine equations in the nine unknowns which, together with the constraints on $\mathbf u$ and $\mathbf v$, can in principle be solved to give you $M$. In fact, there’s a lot of redundancy in $M$: the system is overdetermined since there are only six degrees of freedom (three for the rotation and three for the translation), but the three pairs of points provide nine constraints. In practice, you might need to do a least-squares fit or approximate $M$ some other way because of numerical errors.  
However, as Nominal Animal describes in his answer, you don’t really need to solve this system of equations directly. $M$ can be found by breaking it down into a composition of simpler rigid motions, each of which is quite simple to compute. That computation doesn’t involve any inversions and only requires a couple of matrix multiplications, so even if you’re nbot working symbolically, in practice this is likely to give you a pretty good approximation to the true values of the axis and angle.
Once you have this matrix, you can then extract the rotation axis and angle or the Euler angles that correspond to the rotation using well-documented methods. See the Wikipedia articles on rotation matrices and Euler angles for a starting place.  
