Rotating vectors onto $xy$ plane

693 Views Asked by At

I'm bad and I've forgotten how to rotate two vectors, say $\vec{u}=\langle 3,-2,-2\rangle$, $\vec{v}=\langle-6,2,1\rangle$ so that they both lie in the $xy$ plane and $u$ is along the positive $x$-axis. There's gotta be a nice rotation matrix for this, right?

1

There are 1 best solutions below

3
On BEST ANSWER

I would derive the formula in two steps. First, rotate $\vec u$ and $\vec v$, so that they line in the $(x,y)$ plane. For that, calculate the normal to the $(u,v)$ plane: $$\vec n= \vec u\times\vec v$$ Then calculate the unit vector along $\vec n$:$$\hat n=\frac{\vec n}{|\vec n|}$$ The angle between $\hat n$ and $\hat z$ is given by $$\cos\alpha=\hat n\cdot\hat z=n_z$$ The axis of rotation is along $\hat n\times\hat z$. Use the formula on wikipedia to give you the rotation matrix $R_1$.

Step 2 is to rotate $\vec u$, such that it lies along the $\hat x$ axis. You have $\vec u'=R_1\vec u$. Calculate $\hat u'=\frac{\vec u'}{|\vec u'|}$. Then this makes an angle $\beta$ with respect to the positive $\hat x$ axis. You can calculate this angle uniquely if you know the sine and cosine: $$\cos\beta=\hat u'\cdot\hat x=\hat u'_x\\\sin\beta=(\hat x\times \hat u')_z=\hat u'_y$$