How to calculate an unknown vector from a known vector and an angle

5.5k Views Asked by At

Given three vectors in 3D space $\vec{a}$, $\vec{b}$, & $\vec{c}$ lay in the same plane.

Let $\vec{c}$ be unknown. Knowing the vectors $\vec{a}$ & $\vec{b}$ and the angle between angle between $\vec{b}$ & $\vec{c}$ how do you find $\vec{c}$?

enter image description here

I know from the known vectors $\vec{a}$ & $\vec{b}$ the plane the vectors lay on can be determined, additionally I know $\vec{c}$ can be any linear combination of its x,y,z components yielding the proper direction since its magnitude cannon be determined with the known information.

My question is two parts

Primary Question) How would you find $\vec{c}$?

Additional Question)if the components of each vector belong to the field of rational numbers can this be done rationally?

I have tried breaking down $\vec{a}$ into vectors parallel and perpendicular to $\vec{b}$ using vector projection and vector rejection but I was not sure how to carry on.

3

There are 3 best solutions below

5
On BEST ANSWER

An alternative approach is, as you mention, to consider the vector $b$ and an orthogonal vector to $b$ in the same plane as $a, b$ and $c$. You can build one by considering the part of $a$ orthogonal to $b$, say \begin{equation} d = a - \frac{a \cdot b}{b \cdot b}b \, . \end{equation}

Now you can expand $c$ as a linear combination of $b$ and $d$, say \begin{equation} c = \beta \, b + \delta \, d \, . \end{equation}

Then the one additional constraint, namely the fact that $c$ is at an angle $\phi$ with $b$, can be written as \begin{equation} \frac{b \cdot c}{\sqrt{b^2 \, c^2}} = \cos \phi \,. \end{equation}

Out of the two unknowns, $\beta$ and $\delta$, we will be able to fix one of them in terms of the other (up to a sign) with this constraint. The sign arbitrariness is simply due to the fact that there are generically two distinct co-planar rays at an angle $\phi$ with $b$: one on the "right", one on the "left". The clear exceptions are when $\phi$ is an integer multiple of $\pi$, in which case there is only a single distinct ray. We can write the solution in a way that covers these cases as well, \begin{equation} \delta \, |\cos \phi| = \pm \, \lambda \, \beta \,|\sin \phi| \, , \end{equation} with \begin{equation} \lambda = \frac{b^2} {\sqrt{a^2 b^2 - \left( a \cdot b \right)^2}} \, . \end{equation}

EDIT: Let's see how to find this relation. First, remember that $d$ and $b$ are orthogonal. Hence, $b \cdot d = 0$ and then $b \cdot c = \beta \, b^2$. Orthogonality also implies that $c^2 = \beta^2 \, b^2 + \delta^2 \, d^2$. By taking this into account and squaring the constraint for $\cos \phi$, you'll find $\beta^2 \, b^2 \, \sin^2 \phi = \delta^2 \, d^2 \, \cos^2 \phi$. Then if you expand $d^2$, you'll find the relation above.

4
On

The cross product $\vec{b} \times \vec{a}$ gives you a vector perpendicular to $\vec{b}$ and $\vec{a}$ about which you can rotate to get to $\vec{c}$. You can use axis-angle or a rotation matrix to rotate $\vec{b}$ to the direction of $\vec{c}$, however, this gives you a vector in the direction of $\vec{c}$... you still need to determine the proper magnitude.

Let $\vec{r}=\begin{bmatrix}r_x\\ r_y \\r_z\end{bmatrix}=\vec{b}\times\vec{a}$ be the vector around which you rotate. Then given the following rotation matrix $$ \mathbf{R}=\begin{bmatrix} \cos(\theta)+r_x^2(1-\cos(\theta)) & r_xr_y(1-\cos(\theta)-r_z\sin(\theta)) & r_x r_z (1-\cos(\theta)) + r_y \sin(\theta) \\ r_y r_x (1-\cos(\theta)) + r_z \sin(\theta) & \cos(\theta) + r_y^2(1-\cos(\theta)) & r_yr_z(1-\cos(\theta))-r_x \sin(\theta) \\ r_z r_x (1-\cos(\theta)) -r_y \sin(\theta) & r_zr_y (1-\cos(\theta)) + r_x \sin(\theta) & \cos(\theta) + r_z^2(1-\cos(\theta)) \end{bmatrix} $$ rotate $\vec{b}$ by angle $\theta$ with $$ \vec{d}=\mathbf{R}\vec{b} $$ This $\vec{d}$ is in the direction of $\vec{c}$, but again you need more information to determine the magnitude.

0
On

This is a (possibly simpler) solution that reduces the problem to solving a system of equations in two unknowns (and one the equations is linear, so it is not hard to solve.)

If we assume that you are looking for a unit vector $\vec{c}$, then you know $$\cos\theta = \frac{1}{|\vec{b}|}\vec{b}\cdot\vec{c}$$ However, as you have noted, $\vec{c}$ is in the span of $\vec{a}$ and $\vec{b}$, and therefore we may write $\vec{c} = A\vec{a} +B\vec{b}$ for some (unknown) constants $A, B$. The problem is to determine their values. Substituting this into the equation above, we have $$\cos\theta = \frac{1}{|\vec{b}|}\left(A\left(\vec{b}\cdot\vec{a}\right) + B\left(\vec{b}\cdot\vec{b} \right) \right)$$ Since $\cos\theta$, $\vec{a}$ and $\vec{b}$ are all known, this amounts to a linear equation in the two variables $A$, $B$.

In adddition since we are also assuming that $\vec{c}$ is a unit vector, we get the second equation $\vec{c}\cdot\vec{c}=1$, i.e. $$A^2\left(\vec{a}\cdot\vec{a} \right)+ 2AB\left(\vec{a}\cdot\vec{b}\right) + B^2\left(\vec{b}\cdot\vec{b} \right)=1$$

Again, everything here is known except for $A, B$. So we have a system of two equations in two variables; solve that system and you're done.