# find vector a that at 90 degree with another vector

I have the following scenario:

problem ilustration

I would like to find an equation to find vector $$\vec{v}_2$$ from $$\vec{n}$$ and $$\vec{v}_1$$. $$\vec{2}$$ is supposed to be at 90º with $$\vec{n}$$.

$$\vec{n}$$ is a normal vector.

I found the following relationship:

$$\vec{v}_2 = (\mathbf{I} - (\vec{n} \otimes \vec{n})) \cdot \vec{v}_1$$

Where $$\mathbf{I}$$ is the second order identity tensor.

Is this relationship correct? How can I prove it? Any way to visualize this?

• Feb 9, 2023 at 20:22

How about we drop the high-dollar mathematical language and reduce it to high school analytic geometry: $$\vec v_2 = \vec v_1 - (\vec n\cdot \vec v_1)\vec n$$

Since $$\vec n$$ is normal (i.e., $$\|\vec n\| = 1$$), the expression $$(\vec n\cdot \vec v_1)\vec n$$ is the orthogonal projection of $$\vec v_1$$ onto the line of $$\vec n$$. Then you subtract this projection from $$\vec v_1$$ to find the vector $$\vec v_2$$.

Does this work? Well, this does assure that $$\vec v_2$$ is orthogonal to $$\vec n$$. It also assures that $$\vec v_2$$ runs from the line of $$\vec n$$ to end at $$\vec v_1$$.

But unless $$\vec v_1 \cdot \vec n = 1$$, it will not produce the picture you show.

Your picture requires that $$\vec v_1 = \vec v_2 + \vec n$$. When vectors are defined geometrically, this is exactly how addition of vectors is defined. You draw one vector based at the point of the other, and the sum vector runs from the base of the second vector to the point of the first. So rearranging, $$\vec v_2 = \vec v_1 - \vec n$$. Given vectors $$\vec n, \vec v_1$$, this uniquely identifies $$\vec v_2$$.

Yet you also claim that $$\vec v_2$$ has to be orthogonal to $$\vec n$$. Since $$\vec v_2$$ is already fully defined, this can only hold when $$\vec v_1$$ and $$\vec n$$ are in just the right relationship. In particular, when $$\vec v_1 \cdot \vec n = 1$$.

$$\vec v_2 = \vec v_1 - (\vec n\cdot \vec v_1)\vec n$$ gives the solution for a more general problem, where $$\vec v_2$$ just needs to be orthogonal to $$\vec n$$, but does not have to be $$\vec v_1 - \vec n$$.