I wish to find the rotation matrix which rotates a general 3d vector (x,y,z) into a z-axis vector (0,0,z'). z' can of course be computed easily, but I'm interested in the rotation matrix. If possible, I'd like to avoid solving a set of 9 algebraic equations to find it.
Can anyone help with this?
Thanks in advance!