Find normal vector of hyperplane in $n$-dimensional space

linear algebravectors

Let $p$ be a hyperplane in $n$-dimensional space. (So, $p$ is $\mathbf r \cdot \mathbf n = d$ for some $d \in \mathbb R$.)

In the case where $n=3$, we can pick any two non-parallel vectors $\mathbf u$ and $\mathbf v$ on $p$ and we have $\mathbf n = k(\mathbf u \times \mathbf v)$ (for some $k\neq 0$).

But in higher dimensions ($n>3$), given linearly independent vectors $\mathbf v_1$, $\mathbf v_2$, $\dots$, $\mathbf v_{n-1}$ on $p$, how might we similarly find $\mathbf n$?

Best Answer

Create a parametrised vector of the hyperplane. In $n$ dimensions you have: $$p=\mathbf v_0+\lambda_1 \mathbf {v_1}+\lambda_2\mathbf {v_2} +\cdots+\lambda_{n-1}\mathbf{v_{n-1}}$$

Where $\lambda_k$ are $n-1$ scalars of the field the space is over.

Then all normal vectors $\vec n$ have the property that

$$(p-\mathbf {v_0})\cdot \vec n=0$$

Thus, $$\begin{align}0 &=(\lambda_1 \mathbf {v_1}+\lambda_2\mathbf {v_2} +\cdots+\lambda_{n-1}\mathbf{v_{n-1}})\cdot\vec n\\ &=\left(\begin{pmatrix}\mathbf {v_1} & \mathbf {v_2} &\cdots &\mathbf {v_{n-1}}\end{pmatrix}\vec \lambda \right)^T\vec n\\ &=(\vec\lambda)^T\begin{pmatrix}\mathbf {v_1}^T\\ \mathbf {v_2}^T\\ \vdots \\ \mathbf {v_{n-1}}^T\end{pmatrix}\vec n \end{align}$$

And since this must be true for any $\vec \lambda$

$$\begin{pmatrix}\mathbf {v_1}^T\\ \mathbf {v_2}^T\\ \vdots \\ \mathbf {v_{n-1}}^T\end{pmatrix}\vec n=\mathbf 0$$

So $\vec n$ is exactly the kernel (nullspace)

$$\operatorname{ker} \begin{pmatrix}\mathbf {v_1}^T\\ \mathbf {v_2}^T\\ \vdots \\ \mathbf {v_{n-1}}^T\end{pmatrix}$$

or the cokernel (left nullspace) of the matrix of any set of vectors that form a basis for the direction of the affine-subspace $p$

$$\operatorname{coker}\big(\begin{matrix}\mathbf {v_1}& \mathbf {v_2}&\cdots&\mathbf {v_{n-1}}\end{matrix}\big)$$