How can I calculate a $4\times 4$ rotation matrix to match a 4d direction vector? I have two 4d vectors, and need to calculate a $4\times 4$ rotation matrix to point from one to the other.
edit - I'm getting an idea of how to do it conceptually: find the plane in which the vectors lie, calculate the angle between the vectors using the dot product, then construct the rotation matrix based on the two. The trouble is I don't know how to mechanically do the first or last of those three steps. I'm trying to program objects in 4space, so an ideal solution would be computationally efficient too, but that is secondary.

Consider the plane $P\subset \mathbf{R}^4$ containing the two  vectors given to you. Calculate the inner product and get the angle between them. Call the angle $x$. 
Now there is a 2-d rotation $A$  by angle $x$ inside $P$.  And consider identity $I$  on the orthogonal complement of $P$ in $\mathbf{R}^4$.
 Now $A\oplus I$ is the required 4d matrix
