# Transform 3D vectors between planes using a matrix

I've got 6 points in 3D space: $A,B,C,D,E,F$, that represent 4 vectors. $AB$ is perpendicular to $AC$ and $DE$ is perpendicular to $DF$.

I need to find a transformation matrix M, that transforms $AB$ to $DE$ and $AC$ to $DF$. In other words: $M\cdot AB = DE$, $M\cdot AC = DF$

I already know how to go from the XYZ coordinate system, to another coordinate system, but can't figure out how to use this knowledge here.

-