Finding perpendicular vector to an arbitrary n-dimensional vector

1.1k Views Asked by At

Let's say I had a vector $u$ that lies in an n-dimensional Euclidean space. Is there a method which allows me to construct another vector $v$ such that it is orthogonal to my original vector?

I had the idea to use another arbitrary vector $w$ and use a cross product to find $v$ but upon further research discovered that the cross product I knew of only worked in 3 and 7 dimensions. That being the case is it possible to construct a 'cross product' like thing or is there a generalized method?

2

There are 2 best solutions below

2
On

Let's assume that we are working with $\mathbb{R}^n$ and the standard scalar product; all other finite dimensional Euclidean spaces can be transformed to this one by properly identifying bases.

Now let $u = (u_1,u_2,\ldots, u_n)$. If there is an index $i$ such that $u_i = 0$, then the standard vector $e_i$ will be orthogonal to $u$. If there isn't such an index, take $$u_2 e_1 - u_1 e_2.$$

As a remark, the cross product's main task isn't computing an orthogonal vector. The cross product of two vectors $v,w \in \mathbb{R}^3$ is a vector that is orthogonal to both at the same time. As long as you only want a vector that is orthogonal to a single other given vector, things are a lot easier.

0
On

Choose arbitrarily another vector $v$ not parallel to $u$.
Then $u^Tu\cdot v-v^Tu\cdot u$ is perpendicular to $u$.