I have two points $\mathbf{x_1}$ and $\mathbf{x_2}$, where $\mathbf{x_i}=\{x^i_1, x^i_2, \ldots, x^i_n\}$. I need to find a normal hyperplane $P$ that goes through the midpoint of $\mathbf{x_1}$ and $\mathbf{x_2}$, and I need to do it numerically.
My take --
Find the direction vector from $\mathbf{x_1}$ to $\mathbf{x_2}$: $$\mathbf{V} = \mathbf{x_2} - \mathbf{x_1}$$
Find the unit vector: $$\vec{v} = \frac{\mathbf{V}}{||\mathbf{v}||}$$
Find the mid-point: $$\mathbf{x_{mid}} = \left[\frac{x^1_1 + x^1_2}{2},\frac{x^2_1 + x^2_2}{2}, \ldots, \frac{x^n_1 + x^n_2}{2}\right]$$
Now suppose the plane $P$ goes through some arbitrary $\mathbf x$, therefore --
$${\vec v} \cdot (\mathbf{x} - \mathbf{x_{mid}}) = 0 \quad\Rightarrow\quad \vec{v} \cdot \mathbf{x} = \vec{v} \cdot \mathbf{x_{mid}}$$
or --
\begin{align} \Rightarrow [v_1, v_2, \ldots, v_n][x_1, x_2, \ldots, x_n]^T = [v_1, v_2, \ldots, v_3]\left[\frac{x^1_1 + x^1_2}{2},\frac{x^2_1 + x^2_2}{2}, \ldots, \frac{x^n_1 + x^n_2}{2}\right]^T\\ \Rightarrow [x_1, x_2, \ldots, x_n]^T = [v_1, v_2, \ldots, v_3]\left[\frac{x^1_1 + x^1_2}{2},\frac{x^2_1 + x^2_2}{2}, \ldots, \frac{x^n_1 + x^n_2}{2}\right]^T [v_1, v_2, \ldots, v_n]^{-1}\\ \Rightarrow[x_1, x_2, \ldots, x_n]^T = \left[\frac{x^1_1 + x^1_2}{2},\frac{x^2_1 + x^2_2}{2}, \ldots, \frac{x^n_1 + x^n_2}{2}\right]^T \Leftarrow ?? \end{align}
I lost all my clues with this computation, what I am missing here?