Suppose I have two vectors $\vec v_1$ and $\vec v_2$ in $E^3$ space. How can I find a vector $v_3$ such that
- $\vec v_3$ is perpendicular to $\vec v_1$
- the angle between $v_2$ and $v_3$ is minimized
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communitySuppose I have two vectors $\vec v_1$ and $\vec v_2$ in $E^3$ space. How can I find a vector $v_3$ such that
Project $v_2$ onto the orthogonal complement plane orthogonal to $v_1$, and this will give you your vector $v_3$.
The reason this works is that in order to minimize the angle, you want to maximize the dot-product assuming the lengths of the vectors are fixed. Let $v_2 = v_3 + cv_1$ where $v_3$ is orthogonal to $v_1$. Then for any vector $w$ orthogonal to $v_1$, we have $w \cdot v_2 = w \cdot v_3$. If we assume that $w$ has the same length as $v_3$, we see that $w = v_3$ is the unique choice that maximizes the dot-product and hence forms the smallest angle to $v_2$.
To compute $v_3$, normalize $v_1$ so that it has Euclidean length = $1$. Then $v_3 = v_2 - (v_1 \cdot v_2)v_1$. If you get $v_3 = 0$ then that means $v_2$ and $v_1$ are parallel, in which case you can choose any $v_3$ perpendicular to $v_1$ and get minimal angle of $90$ degrees to $v_2$.