1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hyperplanes question

  1. Aug 23, 2010 #1
    Hello Math friends,

    I need some help in hyperplanes.

    Basically, I need to calculate a random hyperplane that divides my search space, which consists of data points in R^n, into two hyperspaces. I know that a hyperplane is n-1 dimensionality, but how do I calculate it.

    Thanks in advance!
  2. jcsd
  3. Aug 23, 2010 #2


    User Avatar
    Science Advisor

    The easiest way would be to select a coordinate and choose a fixed value. Divide your data points according to whether that coordinate is > or < the fixed value.
  4. Aug 24, 2010 #3
    That is what I was thinking also, I could simply take lowest and highest points from my data for each dimension, and randomly pick a point in-between that range, effectively splitting the search space into two half-spaces. But, I was wondering since I am asked to use a hyperplane to do this separation, is there an equation I can use to derive a random hyperplane.
  5. Aug 24, 2010 #4
    What properties you want the two half-spaces to have? For example, you want that half of the points are in one side and the other half in the other side? Or maybe you want the hyperplane to be as close as possible, on average, to the points? Or you just want it completely random?
  6. Aug 24, 2010 #5
    Completely random :)
  7. Aug 24, 2010 #6
    ...and after you have the hyperplane, the only thing you want to wnow is if each point is in one side or the other?
  8. Aug 24, 2010 #7
    Exactly, do you know the equation/formula to derive a hyperplane from an R^n euclidean space?
  9. Aug 24, 2010 #8
    An hyperplane is a surface that passes through a point [tex]x_0\in\mathbb{R}^n[/tex], and that is perpendicular to a certain vector [tex]u\in\mathbb{R}^n[/tex]. The implicit equation is


    Where the dot is the usual euclidean scalar product. So you just have to choose [tex]x_0[/tex] and u randommly. After you have done this, to know if a certain point x lies in one side or the other of the plane, simply calculate [tex]u\cdot(x-x_0)[/tex]. If this is positive, then x is in the side u points to, if it's negative, it's in the opposite side, and if it's zero it's on the plane.
  10. Aug 24, 2010 #9
    This is a great explanation, exactly what I wanted. I am going to deploy it and see how it works.

    Is there a name to this equation that you posted?

    Thank you so much for the help.
  11. Aug 24, 2010 #10
    It is called: "implict equation of the hyperplane passing through x_o and perpendicular to u"!

  12. Aug 25, 2010 #11
    Hello Petr,

    Assume we have a R^3 euclidean space with the following points a = (1, 2, 3), b = (3, 4, 5), and c = (3, 5, 6). if I pick Xo = (2, 2, 2), how do I derive the vector u so that I can use the implicit hyperplane equation you mentioned.

  13. Aug 25, 2010 #12
    You can take whatever U you like (you said you wanted a completely random plane, right?)
    For example, you may choose U = (1, 3, 4). Then the equation of the plane is

    U . (X - Xo) = 1 . (x - 2) + 3. (y - 2) + 4 . (z - 2) = 0

    in other words

    x + 3y + 4z = 16

    That's it. Very simple!
  14. Aug 26, 2010 #13
    Thanks again Petr for the great and simple explanation.

    Now, I did some searching around and I read in some lecture that the implicit equation of a plane doesn't generalize to higher dimensions (higher than 3D), is this true? because my euclidean space will almost always be higher than 3D. If so, how can I generalize it to high dimensions.

    Please advise, thanks.
    Last edited: Aug 26, 2010
  15. Aug 27, 2010 #14
    It applies to any n, as long as you want a n-1 dimensional affine space (linear space with origin translated), which is what we usually mean by "hyperplane". Don't worry, and go ahead with your calculations.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook