# How can I find a hyperplane that passes through a point with arbitrary dimensions?

I have a point that contains a known number of arbitrary dimensions. How can I find a hyperplane that passes through that point and the origin?

For what it's worth, for my particular application all the coordinates of the point will be non-negative. If you could phrase your answer in terms of an algorithm, that would be helpful.

• What do you mean by "find a hyperplane"? Do you want to find an equation for the hyperplane? Some sort of parameterization? There are generally infinitely many hyperplanes through the point and the origin, do you just want to choose any such plane? – Omnomnomnom Mar 10 '15 at 23:23
• Yes, the equation of the hyperplane. It can be any arbitrary hyperplane, just so long as it contains those points. – GoatFood Mar 10 '15 at 23:24

Let $P = (a_1,\dots,a_n)$ be the point of interest. The coordinates of $P$ give us a vector $\vec v = P-(0,\dots,0)$ pointing away from the origin to $P$. Our plane should contain the origin, and the vector $\vec v$ should be parallel to the plane. So, the vector $\vec v$ should be perpendicular to the normal vector.
If either $a_1$ or $a_2$ is non-zero, we can make our normal vector $$\vec n = \langle -a_2,a_1, 0,\dots,0\rangle$$ In general, we can make a normal vector by switching any two entries (not both zero), changing the sign of one of the two that we've switched, and setting all other coordinates to $0$.
The equation for the plane with normal vector $n$ through the origin is given by $$\vec n \cdot \vec x = 0$$ Or, for the vector I've given, $$-a_2 x_1 + a_1 x_2 = 0$$ and this is the equation of a hyperplane satisfying the criteria.