How can I represent a straight line (between two points) in a N-dimensional space?
-
4mind that a "line" is always $1$-dimensional, even if it sits in a $N$-dimensional space – Andrea Mori Mar 07 '14 at 23:03
3 Answers
If $x,y$ are in $n$-dimensional space the line between them can be represented by $t(x-y)+y$ where $t$ runs over the real numbers. For a sanity check, observe that we get $y$ when $t=0$ and $x$ when $t=1$. You can't write a line as the solutions to a single equation in $n$ dimensions, unfortunately-you need $n-1$ equations, which is why you do get $y=mx+b$ etc in $2$ dimensions.
- 52,457
- 4
- 59
- 113
-
1
-
2Sure it does. It's the set of points given by each possible choice of $t$. – Kevin Carlson Mar 07 '14 at 23:15
-
-
5Nope, that's a set of infinitely many equations since $t$ varies. I mean exactly the set ${1(x-y)+y,0(x-y)+y,1/2(x-y)+y,\pi(x-y)+y,...}.$ – Kevin Carlson Mar 07 '14 at 23:19
-
1
-
You can take n-1 linearly independent hyperplanes which go through these two points and solve the system formed by those equations. The result will be the equation of the line.
I suppose that the form of the equation of the line could be: $$\frac{x_1-x^0_1}{a_1}=\frac{x_2-x^0_2}{a_2}=...\frac{x_n-x^0_1}{a_n}$$ where $(x^0_1,x^0_2,...x^0_n)$ is a given point of the line and $(a_1,a_2,...,a_n)$ a vector colinear to the line.
- 3,446
Similar to the first answer, we can represent a line in n-dimensions using vectors. An expression such as tv+u where v and u are n-dimensional vectors and t is a scalar. The vector v essential gives the inclination of the plane within n-space, and the vector u selects one out of an infinite number of planes that have the same inclination.