# Given two unit vectors, find a vector perpendicular with additional constraint

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?

• The cross product of two orthogonal unit vectors returns a unit vector. – user137794 May 20 '14 at 23:23
• @user137794 Whoops, I deleted that part. In this problem they are definitely not always orthogonal. The angle between the two given vectors is arbitrary. – Randy Gaul May 20 '14 at 23:24

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}.$$

• I appreciate the answer, though my constraint is to avoid a normalization process. This is the goal of my question. – Randy Gaul May 20 '14 at 23:34
• @Randy Hmm, that really can't be done. Normalized vectors can't be found without a normalization process. – David H May 20 '14 at 23:45
• That's pretty interesting! I figured there may be a way since the input is two normalized vectors. – Randy Gaul May 20 '14 at 23:47
• sqrt(1-cos^2x) is one definition. There is also a series definition: en.wikipedia.org/wiki/Sine#Series_definition – HopDavid May 21 '14 at 15:40
• @HopDavid Yes and no. What you are describing is a definition if the sine function as a function of a real variable $x$. It's true you don't need square roots for that. But that's not the problem at hand. In order to use the series definition of the sine function to define the sine of two vectors, you would need a composite function which first maps the pair of vectors to a real parameter $x$ and then maps $x$ to $\sin x$ using the series. The first map that converts the pair of vectors into a real number $x$ will in general use square roots. – David H May 21 '14 at 16:15

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

then: $|\vec{n}|=sin(\alpha) * |\hat{u}| * |\hat{v}|$ where alpha's the angle between the vectors.

Since they're unit vectors: $sin(\alpha) * |\hat{u}| * |\hat{v}| = sin(\alpha)$

So: $\hat{n}=\vec{n}/sin(\alpha)$

You can find alpha this way: $\alpha = acos(\hat{u} \cdot \hat{v})$

Sin can be calculated without square roots using a Taylor series expansion: • As is alluded to in my comment, you have not actually escaped the usage of roots. You've merely used smoke and mirrors to hide them behind auxiliary functions and definitions. In this case, the square roots are hiding behind the definition of $\alpha=\cos^{-1}(\hat u \cdot \hat v)$. – David H May 21 '14 at 16:26