[Math] Given two unit vectors, find a vector perpendicular with additional constraint

cross productlinear algebra

Given two unit length vectors find a perpendicular vector of unit length. I want to know if there's a way to do this without using a square root operation (avoid a normalization operation).

Since the cross product of two unit vectors can have a vector of length 0 to 1 this would make a normalization necessary to come up with a vector of unit length in many cases. In my particular case I can guarantee that the given vectors are not parallel.

Is this possible?

Best Answer

Given two unit vectors $\hat{u}$ and $\hat{v}$, we can construct a vector perpendicular to both by their cross product:

$$\vec{n}=\hat{u}\times\hat{v}.$$

To obtain a perpendicular vector of unit length, just normalize $\vec{n}$:

$$\hat{n}=\frac{\vec{n}}{\|\vec{n}\|}=\frac{\hat{u}\times\hat{v}}{\|\hat{u}\times\hat{v}\|}.$$

Normalizing $\vec{n}$ requires the computation of $\|\hat{u}\times\hat{v}\|$. Since the norm of a vector is defined as the square root of the dot product of the vector with itself, it is impossible to normalize a vector without using square roots.

However, there is a way to look like you're avoiding square roots. If you can find the angle $\theta$ between the unit vectors $\hat{u}$ and $\hat{v}$ geometrically, you can employ the theorem that gives the norm of their cross product as:

$$\|\hat{u}\times\hat{v}\|=\sin{\theta}\\ \implies \hat{n}=\csc{\theta}\,(\hat{u}\times\hat{v}).$$

Of course, this method doesn't truly avoid square roots, since $\sin\theta$ is defined as a square root:

$$|\sin\theta| = \sqrt{1-\cos^2{\theta}}=\sqrt{1-(\hat{u}\cdot\hat{v})^2}.$$