Mathwizurd.com is created by David Witten, a mathematics and computer science student at Stanford University. For more information, see the "About" page.

Find a Normal Vector to a Hyperplane

MathJax TeX Test Page Let's say you have $n-1$ vectors in $\mathbb{R}^n$. Your goal is to find a vector to the hyperplane created by the span of the vectors. The vector $\vec{x}$ has to satisfy these equations $$v_1 \cdot x = 0 , v_2 \cdot x = 0, \dots , v_{n-1} \cdot x = 0$$ Now, let's rewrite these equations $$v_1^Tx = 0, v_2^Tx = 0, v_3^Tx = 0, \dots , v_{n-1}^Tx = 0$$ We can rewrite this into a matrix $$\begin{bmatrix}v_1^Tx\\v_2^Tx\\v_3^Tx\\...\\v_{n-1}^Tx\end{bmatrix} = \vec{0}_{n-1}$$ Recall that this is also the row definition of matrix multiplication. $$\begin{bmatrix}v_1^T\\v_2^T\\\dots\\v_{n-1}^T\end{bmatrix}x = \vec{0}$$ Our goal is to find the null space of the tranpose of the vectors.

Example 1: Two 3D vectors

MathJax TeX Test Page Find a normal vector to the hyperplane that spans $$\begin{bmatrix}-2\\1\\3\end{bmatrix}, \begin{bmatrix}1\\0\\3\end{bmatrix}$$ Looking at what we did before, we write $$\begin{bmatrix}1&0&3\\-2&1&3\end{bmatrix}x = \vec{0}$$ We row-reduce to $$\begin{bmatrix}1&0&3\\0&1&9\end{bmatrix}x = \vec{0}$$ We thus know that $x_1 + 3x_3 = 0$, $x_2 + 9x_3 = 0$. We have this vector $$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} = \begin{bmatrix}-3x_3\\-9x_3\\x_3\end{bmatrix} = x_3\begin{bmatrix}-3\\-9\\1\end{bmatrix}$$ The normal vector is any non-zero multiple of $$\begin{bmatrix}-3\\-9\\1\end{bmatrix}$$.

Example 2: Three vectors in R^4

MathJax TeX Test Page Given these vectors, find an orthogonal vector to all 3. $$\begin{bmatrix}-2\\1\\3\\5\end{bmatrix},\begin{bmatrix}1\\0\\3\\8\end{bmatrix},\begin{bmatrix}0\\1\\1\\5\end{bmatrix}$$ Now, we create $A^T$. $$\begin{bmatrix}-2&1&3&5\\1&0&3&8\\0&1&1&5\end{bmatrix} \to \begin{bmatrix}1&0&0&2\\0&1&0&3\\0&0&1&2\end{bmatrix}$$ So, we have this $$\begin{cases}x_1 = -2x_4\\x_2 = -3x_4\\x_3 = -2x_4\end{cases}$$ $$=x_4\begin{bmatrix}-2\\-3\\-2\\1\end{bmatrix}$$ To check that it works, calculate the dot product with all three.

Orthogonal Complement

Column Space