Form a new base with two vectors

60 Views Asked by At

I need to make a new orthonormal base in $\mathbb{R^3}$ given $(2,7,5)$ and $(4,1,3)$ so that it makes $(\widehat{e_1}, \widehat{e_2}, \widehat{e_3} )$. But $ \widehat{e_1} $ has the same direction of $(2,7,5)$ and $\widehat{e_2}$ is in the plane formed by $(2,7,5)$ and $(4,1,3)$.

I got $ \widehat{e_1}$ by just obtaining the normal vector $\widehat{e_1} = \frac{(2,7,5)}{|(2,7,5)|}$ and $\widehat{e_3}$ would be easy by just making cross product between $\widehat{e_1}$ and $\widehat{e_2}$. My main problem is obtaining $\widehat{e_2}$ since I'm stuck obtaing a vector orthoga¡onal inside the plane.

Thanks.

3

There are 3 best solutions below

2
On

Your choice for $\widehat{e_1}$ is fine. Then consider $v=(4,1,3)-\left\langle(4,1,3),\widehat{e_1}\right\rangle\widehat{e_1}$ and take $\widehat{e_2}=v/\|v\|$. And then, as you wrote, take $\widehat{e_3}=\widehat{e_1}\times\widehat{e_2}$.

0
On

To expand on José Carlos Santos' answer, and explain why that answer works.

Let $\hat{e}_1$ be the first unit vector.

To obtain vector $\hat{e}_2$ that is in the plane spanned by $\hat{e}_1$ and $\vec{q}$, apply one step of Gram–Schmidt process to get the part of $\vec{q}$ that is perpendicular to $\hat{e}_1$, and normalize the result to unit length.

This entire process is commonly in many 3D problems, including in computer graphics where the two basis vectors are e.g. "towards" and "up", but may not be perpendicular to each other.

If we call the two vectors to be used for the base $\vec{p}$ and $\vec{q}$, then the entire process is $$\begin{aligned} \hat{e}_1 &= \displaystyle \frac{ \vec{p} }{ \left\lVert \vec{p} \right\rVert } \\ \vec{t} &= \vec{q} - \hat{e}_1 \left( \hat{e}_1 \cdot \vec{q} \right) \\ \hat{e}_2 &= \displaystyle \frac{\vec{t}}{\left\lVert\vec{t}\right\rVert} \\ \hat{e}_3 &= \hat{e}_1 \times \hat{e}_2 \\ \end{aligned}$$ where $\cdot$ is the dot product, $\times$ is the cross product, and $\lVert~\rVert$ Eucidean length. To remind those not familiar with basic vector algebra, given $$\vec{a} = \left[ \begin{matrix} a_x \\ a_y \\ a_z \end{matrix} \right], \vec{b} = \left[ \begin{matrix} b_x \\ b_y \\ b_z \end{matrix} \right]$$ the operations are $$\vec{a}\cdot\vec{b} = a_x b_x + a_y b_y + a_z b_z , \quad \vec{a}\times\vec{b} = \left[ \begin{matrix} a_y b_z - a_z b_y \\ a_z b_x - a_x b_z \\ a_x b_y - a_y b_x \\ \end{matrix} \right], \quad \left\lVert\vec{a}\right\rVert = \sqrt{a_x^2 + a_y^2 + a_z^2}$$

0
On

Since you’ve already used a cross product to generate $\hat e_3$, just keep going with $\hat e_2=\hat e_3\times\hat e_1$ (or $\hat e_1\times\hat e_3$, since nothing in your question said that the basis had to be right-handed). Don’t forget to normalize all of these vectors.