# 3D Affine Rotation Matrix from Orthogonal Vectors

How does one define an affine rotation matrix in order to rotate a 3D volume to align with a new coordinate system?

The current coordinate system is $$\mathbf{x}, \mathbf{y}, \mathbf{z}$$ and I want to rotate to the new coordinate system (assuming each vector is orthogonal):

$$\mathbf{\hat{x}} = [a, b, c]$$ $$\mathbf{\hat{y}} = [d, e, f]$$ $$\mathbf{\hat{z}} = [h, i, j]$$

How does one achieve this?

• You probably need something like the Direction Cosine Matrix (DCM). Here is a tutorial about it: starlino.com/dcm_tutorial.html – Mauricio Cele Lopez Belon Apr 9 at 1:15
• I tried following, but I couldn't quite make sense of it! Do you think you could clarify how that might be applied to this case? – Clemson Apr 9 at 3:16