How degree of freedom of lines in 3D space is 4? I asked this question that degree of freedom of lines in 2D plane is 2.
Proof:- Suppose take two points $(x_1,y_1), (x_2,y_2).$ So therefore degree of freedom is 4.But subtract 2 because their position on the line is irrelevant.
My question is what does mean of "subtract 2 because their position on the line is irrelevant "?
And I also read from that question degree of freedom of line in 3D space is 4.
My approach is, we take two arbitrary points to draw line in 3D.It has 6 degrees of freedom.
But why we subtract 2 from 6? Don't understand.
N. B. - I want to understand intuition rather than complex mathematics.
 A: In 2D, you can define a line by an angle $\theta$ and a (signed) distance $d$. The equation of the line is $x\cos\theta + y\sin\theta = d$. The line is normal to the vector $(\cos\theta, \sin\theta)$ and it’s at a distance $d$ from the origin. So a 2D line has two degrees of freedom (as specified by $\theta$ and $d$).
Note that this is an infinite line. You seem to be thinking about a bounded line segment defined by its two end-points. A bounded line segment in 2D does indeed have 4 degrees of freedom.
Suppose you use two points to define an infinite 2D line. So, you’re using four numbers, and maybe this makes you think that the line has 4 degrees of freedom. But you can slide each of the two points along the line, and you’ll still get the same line. The sliding motions of the two points correspond to two degrees of freedom that are doing nothing to help with the definition of the line. So, two degrees of freedom are wasted, and the line really only has two degrees of freedom, not 4.
In 3D, it’s true that an (unbounded) line has 4 degrees of freedom, but finding a line representation that uses only 4 numbers is fairly complicated. One easy but incomplete solution is to use the intersection of the line with two planes, say the $xy$ plane and the $xz$ plane. That gives you a representation using 4 numbers, but it doesn’t work for all lines.
Again, a bounded 3D line segment does have 6 degrees of freedom.
A: To specify a line in $3D$ you need a direction vector and a point $(a,b,c)$.  Direction vectors can be assumed to be unit vectors and thus can be specified by two parameters (when parameterized using spherical coordinates).  Point $(a,b,c)$ is any point on the line, and can be specified by two coordinates on the plane passing through the origin and normal to the direction vector.  Hence, the total number of parameters needed to uniquely determine a line is $4$.
A: I haven't seen mentionned that the set of lines in $\mathbb{R^3}$ can very efficiently be parametrized by Plücker coordinates.
This sytem of redundant coordinates associate to a line:

*

*a directing vector $\vec{V}$ and


*the "torque" vector $\vec{T}=\vec{OM} \times \vec{V}$ where $M$ is any point on the line.
In this way, a line is described by $3 + 3$ coordinates, but this does not mean 6 dof (degrees of freedom).
We must first subtract one dof because  $\vec{V}$ is defined up to a multiplication by a scalar, and another one because
$$\vec{T} \perp \vec{V} \ \iff \ \vec{T}\cdot\vec{V}=0 $$ giving another relationship between the six coordinates.
In this way we remain with 4 dof.
This set of lines constitute a so-called grassmannian manifold (generalized surface), more precisely the Klein Quadric.
Remarks:
For applications of Plücker coordinates, see this PhD thesis.
An interesting application of the Klein quadric can be found in this recent article.
