1
$\begingroup$

Motivation: A Line in $\Bbb R^2$

Any line can be uniquely determined by two points. In $\Bbb R^2$, a point is uniquely determined by two values (its $x$ and $y$ coordinates). Hence, to uniquely determine a line in $\Bbb R^2$ requires at most four values (in this case $x_0$, $y_0$, $x_1$, and $y_1$).

Those aren’t the only four values that can be used; we could also express the line parametrically, as the pair of equations:

$$x=x_0+at\\y=y_0+bt$$

Now the four values are $x_0$, $y_0$, $a$, and $b$. We can rearrange that pair of equations to get the symmetric-form equation of the line, which also determines the line by the same four values:

$$\frac{x-x_0}{a}=\frac{y-y_0}{b}$$

No doubt most of you see where I’m headed, though. We can rearrange this to get the good old slope–intercept form of the line’s equation:

$$y=mx+c$$

This uniquely determines the line with just two values ($m$ and $c$)!

Some lines (namely those parallel to the axes) can be determined with just one value, but two is the minimum information necessary to generally determine a line in $\Bbb R^2$—not four, after all.

The Problem: A Line in $\Bbb R^3$

A line in $\Bbb R^3$ is still able to be determined by two points, although each point now needs three values ($x$, $y$, and $z$). Hence, to uniquely determine a line in $\Bbb R^3$ requires at most six values.

These six values can be $x_0$, $y_0$, $z_0$, $x_1$, $y_1$, and $z_1$; or in parametric form…

$$x=x_0+at\\y=y_0+bt\\z=z_0+ct$$

…or symmetric form…

$$\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}$$

…they could be $x_0$, $y_0$, $z_0$, $a$, $b$, and $c$. But no matter where I’ve looked or what I’ve tried, I can’t do it in less than six. Can it be done?

Worth noting is that a plane in $\Bbb R^3$ can be determined in fewer than the naive nine values (three points): using one point and a normal vector (three values each), we can do it in six. It seems counterintuitive that a plane and a line should both be determined by six values… but then, the same could be said about a line and a point in $\Bbb R^2$.

$\endgroup$
7
  • 1
    $\begingroup$ You're essentially asking for the dimension of the space of lines in three dimensions. $\endgroup$ Commented Mar 30, 2016 at 12:02
  • 2
    $\begingroup$ Note vertical lines are not $y=mx+b$ so two parameters not enough unless one says "at most two parameters" and lists $x=c$ for verticals. $\endgroup$
    – coffeemath
    Commented Mar 30, 2016 at 12:03
  • 1
    $\begingroup$ If you are willing to leave out some exceptional lines (analogous to slope+intercept leaving out vertical lines), then you need four parameters. A point of intersection on a coordinate plane of your choice, and the direction vector. The latter can be written using two parameters. Think: longitude and latitude of a point on the sphere around the point of intersection. $\endgroup$ Commented Mar 30, 2016 at 12:06
  • 1
    $\begingroup$ @JyrkiLahtonen In fact, we may just pick points of intersection with two coordinate planes (for the generic case, of course) $\endgroup$ Commented Mar 30, 2016 at 12:10
  • $\begingroup$ @Hagen A good idea! It works, barring the unfortunate cases when the two points happen to coincide. Given that we are apparently willing to leave out "a measure zero subset of all the line", this is of course, ok. $\endgroup$ Commented Mar 30, 2016 at 12:13

3 Answers 3

7
$\begingroup$

Ignoring lines passing through the origin for the moment, a given line has a unique point nearest to the origin (and this point can be determined using three parameters $x_0,y_0,z_0$). After this, it remains to pick a direction for the line within the plane that is orthogonal to the line through $(0,0,0)$ and $(x_0,y_0,z_0)$. While it is not straightforward to do this in a "uniform" way, such a direction requires only one parameter. So in total, four parameters suffice.

More generally, a line (in general position) in $\Bbb R^n$ is determined by a point in $\Bbb R^n$ and a point on $S^{n-2}$, so by $2n-2$ parameters.


Inspired by Jyrki Lahtonen's comment: We may look at the matter this way: The naive approach is to use two points $(x_1,\ldots, x_n)$ and $(y_1,\ldots, y_n)$ on the line (thus $2n$ parameters). However, the positions of the points within the line are irrelevant (except that they must be distinct). As such we "waste" one parameter per point and should be able to get along with $2n-2$ parameters. To this end, we may pick specific points: There must exist at least one $k$ such that $x_k\ne y_k$. Then the points on the line assume all real values as $k$th coordinate. Hence it is possible to relocate $x$ and $y$ such that $x_k=0$ and $y_k=1$. Thus all it takes is $2n-2$ real-valued parameters together with a finite-valued parameter $k$.

The necessity of such a finite-valued parameter arises already in two dimensions: While we have $y=mx+b$ for "most" lines (with two parameters $m,b$), we need to cover also $x=c$ (with one parameter $c$) and need to specify which of the two forms we refer to in the first place.

$\endgroup$
6
  • $\begingroup$ Outstanding. And given that the original motivation was a programming problem, the idea of $2n-2$ real-valued parameters and another parameter $k$ makes complete sense to me. Any idea what the upper bound on $k$ would be? $\endgroup$ Commented Apr 1, 2016 at 14:47
  • $\begingroup$ @TimPederick That is an interesting question by itself - I think it amounts to asking for the genus of the manifold of lines and that suggests that my solution ($k\in\{1,\ldots,n\}$) is optimal. $\endgroup$ Commented Apr 1, 2016 at 15:36
  • $\begingroup$ See my answer for a uniform encoding! I'm not sure what you mean by the necessity of a finite-valued parameter. You surely know that there is a bijection between the line and the plane, so of course you want some more precise criteria for "need". The most obvious criterion is continuity in some suitable sense. In my answer some parameters are from a circle rather than a line, so I can even get continuity. The problem is that if you want the parameters to form a vector in Euclidean space, then it's simply impossible to have continuity. $\endgroup$
    – user21820
    Commented May 29, 2016 at 7:57
  • $\begingroup$ If I didn't make a mistake, this impossibility result can be proven as follows. If there is such a continuous map from the space of lines (with open sets being defined by rigid perturbations) into Euclidean space of the same dimension, then restricting it to the spaces of lines through the origin yields a continuous map $f$ from the unit ball surface into the plane. Consider any plane sweeping across the ball, producing a smooth deformation between two poles on the surface via circles. $f$ maps each of these circles to a simple closed curve in the plane. [continued] $\endgroup$
    – user21820
    Commented May 29, 2016 at 8:11
  • $\begingroup$ [continued] Let $p,q$ be the poles. The winding number $w$ of each of these curves around $f(p)$ is constant since the deformation is continuous, but the curve shrinks to $f(q)$ as the circle tends to $q$, and hence $w = 0$. By symmetry the winding number of the curves around $f(q)$ is zero, but this is impossible because each curve divides $Im(f)$ into two regions and its winding number around points inside is nonzero. $\endgroup$
    – user21820
    Commented May 29, 2016 at 8:19
1
$\begingroup$

It can be done with 5 values, 1. A point, that takes 3 values 2.one angle on the xy plane, 3.one angle on the yz plane

pretty much it is spherical coordinates with centre given at a point,

$\endgroup$
1
  • $\begingroup$ It may not have been the optimal solution, but this was helpful. Thanks! $\endgroup$ Commented Apr 1, 2016 at 14:46
0
$\begingroup$

Here's a uniform way using $4$ parameters that is not only more intuitive but has a nice continuity property in the sense that two lines that differ by a small rigid perturbation will have only slightly different encodings.

Take any line $L$ in $3$-dimensional Euclidean space. We shall encode $L$ as a $4$-tuple $(p,q,r,s)$ where $p,q$ are angles and $r,s$ are positions. Let $(p,q)$ encode the rotation $R$ needed to orientate the $z$-axis to be parallel to $L$, where $R$ is the tilt in the direction of $p$ of angle $q$ when looking at the $xy$-plane. (More precisely, $p$ specifies a line in the $xy$-plane around which $R$ is a rotation of angle $q$. Note that this is not the same as polar coordinates.) Let $P$ be the image of the $xy$-plane under $R$. Let $(c,d)$ be the point where $L$ intersects $P$ from the perspective of $P$. (More precisely, let $(c,d)$ be the inverse image of $L \cap P$ under $R$.)

This encoding is continuous in the sense that a slight rigid perturbation (translation and rotation) only changes the encoding slightly. This is not normally possible if you want to encode a ray due to its direction, but for lines the above encoding is continuous. For rays, the only discontinuity is for rays that point in directly opposite direction to the $z$-axis, since slight perturbation of these rays would result in rays with all possible $p$.

Anyway, this construction generalizes to lines in higher dimensional spaces. You use the encoding for the direction in $n$ dimensions to specify the axis of the tilt in $(n+1)$ dimensions.

Incidentally, this encoding of direction that I have described is exactly what GLMol uses when one mouse-drags to rotate the diagram. The benefit is that a single mouse-drag will not be able to cause rotation around the axis pointing out of the screen, which is a major annoyance in many other 3d viewers such as JSMol (see this website where you can try both GLMol and JSMol).

$\endgroup$
5
  • $\begingroup$ You don't describe what r and s are. Is r=c and s=d? $\endgroup$ Commented Jun 21, 2020 at 10:35
  • $\begingroup$ @PedroGimeno: Thanks for your comment. It is now 4 years and I no longer recall what I was doing, and it seems to me that whatever it was I had in mind does not yield a continuous encoding in the usual sense. For example, you can start with the $z$-axis and use polar coordinates $(r,t)$ to denote that you tilt it an angle of $r$ in the direction given by angle $t$. This decoding is continuous, but it is not injective so we don't have a continuous encoding. $\endgroup$
    – user21820
    Commented Jun 21, 2020 at 12:55
  • $\begingroup$ So you are probably correct that I meant $c,d$ instead of $r,s$ (the idea being that if we rotate the $x,y$-plane then we always have some point on it that corresponds to the translation of the tilted line), but I think I shall delete this post once you have seen these comments because I am too lazy to fix the mistakes and edit it into clearer shape. $\endgroup$
    – user21820
    Commented Jun 21, 2020 at 12:56
  • $\begingroup$ You do mention a discontinuity at the south pole. It might be slightly confusing but it would be a loss if you delete it. I liked the plane rotation idea. At the south pole, it can be taken as canonical that when r=180, q=0. $\endgroup$ Commented Jun 21, 2020 at 22:05
  • $\begingroup$ @PedroGimeno: Incidentally, if we want a truly continuous map it's easy to get one by simply using a point on a surface that is homeomorphic to the unit sphere for the direction. For example one could use the intersection of the direction ray with the unit cube surface. $\endgroup$
    – user21820
    Commented Jun 22, 2020 at 6:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .