How to check that these points formulate flat plane(on the same plane)?

In hyperplanes (4d and more),How to check that these points formulate flat plane(on the same plane)?
for example these points (6d plane)?
P1 =[396326796.725069,-205153846.153846,0,0,0,0];
P2 =[-205153846.153846,396326796.725069,-205153846.153846,0,0,0];
P3= [0,-205153846.153846,396326796.725069,-205153846.153846,0,0];
P4 = [0 0 -205153846.153846 396326796.725069 -205153846.153846 0];
P5=[0 0 0 -205153846.153846 396326796.725069 -205153846.153846];
P6=[0 0 0 0 -205153846.153846 198163398.362534];

Answers (1)

P1 = [396326796.725069,-205153846.153846,0,0,0,0];
P2 = [-205153846.153846,396326796.725069,-205153846.153846,0,0,0];
P3 = [0,-205153846.153846,396326796.725069,-205153846.153846,0,0];
P4 = [0 0 -205153846.153846 396326796.725069 -205153846.153846 0];
P5 = [0 0 0 -205153846.153846 396326796.725069 -205153846.153846];
P6 = [0 0 0 0 -205153846.153846 198163398.362534];
P = [P1; P2; P3; P4; P5; P6];
RankP = rank(P - P(1, :))
RankP = 5
isHyperplane = RankP < 6 % [EDITED] "coplanar" was a clumsy term
isCoplanar = logical
1

19 Comments

The rank of the matrix is equivalent to the number of dimensions of the subspace. If the vectors do not belong to a subspace, they span the complete space, such that the rank is the number of dimensions. For your example: The 6 points build a 5D space.
@Jan Then what is the relation between rank and plane flatness? Does when the rank is less than the number of points dimension, mean the points are coplanar?
First define "flat plane".
Do you mean you want to check whether the points form a 5d hyperplane in IR^6 ?
@Torsten I mean if all the points are on the same plane
What is a "plane" in 6d space ? A 5d object ?
If you had said: "hyperplane", we would have known you mean a 5d object.
@M: You can fit a M dimensional subspace to P points in N dimensions. Then you can determine the longest distance between the P points and the subspace. Does this characterize the flatness?
I meant by flatness that these points formulate one hyperplane( Are these points on the same plane)? or Is there a hyperplane contains these points? or are these point coplaner? @Jan@Torsten
First look up the definitions of the terms you use.
A plane is an expression that is only used in three-dimensional affine space and it denotes a 2-dimensional affine subspace.
An affine hyperplane in n-dimensional affine space is an (n-1)-dimensional affine subspace.
If you want to know whether six points P1,...,P6 span an affine hyperplane,
rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1])
must be 5.
@Torsten Ok I got it, but when we can know that these six points P1,...,P6 dont span an affine hyperplane?
when we can know that these six points P1,...,P6 dont span an affine hyperplane?
If rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) < 5.
@Torsten, so this is not correct "isCoplanar = RankP < 6" ??? because if it is 4 it will gives that they are span an affine hyperplane
P1,...,P6 span an affine hyperplane if rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) = 5.
If rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) < 5, they span a lower-dimensional affine subspace.
@Torsten, so this is not correct "isCoplanar = RankP < 6" ???
It is not incorrect if the idea is to test whether the points are contained in a hyperplane. If the idea is to determine whether they span a hyperplane, i.e., if their affine hull is a hyperplane, then the test would be,
spansHyperplane = (RankP == 5)
It may help to think about 3D examples to understand the difference. If you have 3 points in R^3 which are colinear, they are indeed coplanar (in fact there is an infinite selection of planes that they lie in), but their affine hull is the line all 3 points lie on, not a plane.
A set of 3 non-colinear points however do have a complete plane as their affine hull. The 3 points are therefore coplanar and the plane containing them is unique.
@Matt J , in 3d we say that the points are coplanar, in affine space what would we say?
and in general what is the number that should be put here? "isCoplanar = RankP < "
is the n dimension of the points, to test that the points are contained in a hyperplane. ?
6 points are always contained in an affine hyperplane in 6d affine space.
The question is interesting only for more than 6 points.
The question is interesting only for more than 6 points.
And, when you do have more than 6 points, Jan's test in his original post is still the correct one.
Yes, but it's superfluous to test it for the example given because the rank could not come out to be >= 6.
The first row of P - P(1, :) is a zero row.
The term "isCoplanar" in my answer was a bad choice. Then rank tells us the dimensions of the spanned subspace (or "affine hyperplane"). "Planar" and in consequence "coplanar" are less useful in 6D.
I'm not sure if the meaning of the original question has been defined clearly yet: What do you call a "flat plane"?

Sign in to comment.

Asked:

M
M
on 8 Feb 2023

Edited:

Jan
on 9 Feb 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!