How many degrees of freedom does an $n$-dimensional line have

geometry

I know that for a two dimensional line, there are two degrees of freedom $(\theta, d)$ where $\theta$ is the angle that the normal makes with the $x$ axis, and $d$ is the distance from the line to the origin.

For a three dimensional line, I was reading this question here:
4-dof of a 3d line

The argument for $4$ degrees of freedom for a line in $3$d that I understood the best says that each line is tangent to a unique sphere of radius $r$, intersecting at a point $m = (r, \theta, \phi)$ in spherical coordinates. Then the angle that the line's direction vector makes with the ray from the center of the sphere to the point $m$ is the final degree of freedom.

I'm wondering if there is a generalization to lines of $n$ dimensions. I would be tempted to say it's $n+1$ degrees of freedom, however this isn't true for $n=2$. Any insights appreciated.

Best Answer

To define a line in $\mathbb{R}^n$, we need two points. This gives $2n$ degrees of freedom.
But for one line each point can be any point in the line. This substracts one degree of freedom for each point, so we have $2n-2$ degrees of freedom.

Another way: in $\mathbb{R}^n$ the line direction has as many degrees of freedom as (half of) the unit sphere $S^n$, i.e. $n-1$ because it is an hyper-surface.
Then the set of lines that have a given direction is in bijection with an hyperplane orthogonal to that direction. This adds $n-1$ degrees of freedom, so total is $2n-2$.