Help with Calculating Hyperplanes in R^n

  • Thread starter kouma
  • Start date
In summary, the conversation discusses the calculation of a random hyperplane to divide a search space into two hyperspaces. The equations and formula for deriving a hyperplane in an R^n euclidean space are explained, including the implicit equation and the method for determining which side of the plane a point lies on. It is also mentioned that this equation can be applied to higher dimensions.
  • #1
kouma
9
0
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!
 
Mathematics news on Phys.org
  • #2
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.
 
  • #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.
 
  • #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?
 
  • #5
Completely random :)
 
  • #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?
 
  • #7
Exactly, do you know the equation/formula to derive a hyperplane from an R^n euclidean space?
 
  • #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

[tex]u\cdot(x-x_0)=0[/tex]

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.
 
  • #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.
 
  • #10
kouma said:
Is there a name to this equation that you posted?

It is called: "implict equation of the hyperplane passing through x_o and perpendicular to u"!

:biggrin:
 
  • #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.

Thanks!
 
  • #12
kouma said:
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.

Thanks!

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!
 
  • #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:
  • #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.
 

What is a hyperplane?

A hyperplane is a mathematical concept that refers to a flat subspace of a higher-dimensional space. In a two-dimensional space, a hyperplane is a straight line, in a three-dimensional space it is a flat plane, and in higher dimensions, it is a flat subspace that divides the space into two parts.

What is the purpose of calculating hyperplanes in R^n?

The purpose of calculating hyperplanes in R^n is to find a linear decision boundary that separates a given dataset into two distinct classes. This is often used in machine learning and pattern recognition to classify data points into different categories.

How do you calculate a hyperplane in R^n?

To calculate a hyperplane in R^n, you first need to determine the number of dimensions in your dataset (n). Then, you need to find the equation of a hyperplane, which can be represented as a linear combination of the variables in the dataset. This equation can be solved using methods such as least squares regression or support vector machines.

What is the difference between a hyperplane and a line/plane in R^n?

A hyperplane in R^n is a flat subspace that divides the space into two parts, whereas a line or plane is a flat subspace of a lower dimension (one or two dimensions, respectively). Additionally, a hyperplane in R^n can have more than two dimensions, making it a more complex concept than a line or plane.

What are some applications of calculating hyperplanes in R^n?

Calculating hyperplanes in R^n has many applications in various fields, including machine learning, data mining, and pattern recognition. It is commonly used for classification tasks, such as separating spam emails from legitimate ones, predicting stock market trends, and identifying disease patterns in medical data.

Similar threads

  • General Math
Replies
2
Views
691
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
6
Views
923
Replies
3
Views
6K
  • General Math
Replies
5
Views
1K
Replies
7
Views
1K
Replies
1
Views
732
Back
Top