I wish to find non-zero vectors $\mathbf{v} \in \mathbb{R}^3$ perpendicular to a vector $\mathbf{u} \in \mathbb{R}^3$. I know that $\mathbf{u} \perp \mathbf{v} \iff \mathbf{u} \cdot \mathbf{v} = 0$, hence these perpendicular vectors must lie on a plane $u_1v_1 + u_2v_2 +u_3v_3 = 0$.
In "How to find perpendicular vector to another vector?", @Did gave a method:
Choose two coordinates, switch them, add a minus sign, and complete with zeroes. For example: choosing i and j might yield 4i-3j, choosing i and k might yield 2i+3k, and choosing j and k might yield 2j+4k
I can see why this recipe works in $\mathbb{R}^2$ (where the "complete with zeroes" step doesn't exist). For $\mathbf{u},\mathbf{v} \in \mathbb{R}^2$, $u_1v_1 + u_2v_2 = 0 \to v_2=-\frac{u_1}{u_2}v_1$ hence all vectors $\mathbf{v}=(c,-\frac{u_1}{u_2}c), c\in\mathbb{R}$ are perpendicular to $\mathbf{u}$. Then, by setting $c=u_2$ or $c=-u_2$ I get a perpendicular vector $\mathbf{v}=(u_2, -u_1)$ or $\mathbf{v}=(-u_2, u_1)$, respectively. That's precisely the rule described above. The solutions obtained with the rule come from the set of solutions and I'm assured that it should work for any $\mathbf{u} \in \mathbb{R}^2$.
The problem arises when I seek to explain the case of $\mathbb{R}^3$.
The rule seems to work for any $\mathbf{u} \in \mathbb{R}^3$. I can't find any combinations of swaps which would not result in a perpendicular vector. However, I can't verify this rule via the general solution as I did before. Here is my attempt:
$$u_1v_1 + u_2v_2 +u_3v_3 = 0$$
Taking $v_3 = u_3^{-1}(-v_1u_1 - v_2u_2)$ I obtain:
$$\mathbf{v} = \begin{bmatrix}a\\b\\u_3^{-1}(-au_1 - bu_2) \end{bmatrix} \quad | \quad a,b \in \mathbb{R}$$
I could set $a=b=u_3$ which results in a perpendicular vector $\mathbf{v}=(u_3, u_3, -u_1-u_2)$, or $a=b=-u_3$ which gives $\mathbf{v}=(-u_3, -u_3, u_1+u_2)$. I don't see any particular values of $a, b$ which would give me "the rule", as I found previously for $\mathbb{R}^2$.
- How can I verify this rule in $\mathbb{R}^3$? I want to show that for any $\mathbf{u} \in \mathbb{R}^3$, any form of the application of the rule (different swapping) always provides a vector $\mathbf{v} \in \mathbb{R}^3$ perpendicular to $\mathbf{u}$?
- Does it generalize to $\mathbb{R}^n$?
EDIT: I reformulated the question after Shubham Johri corrected a mistake I did previously - Thanks!