# Definition: 1.04: Straight Line, Segment and Ray

A straight line is any line which lies evenly with points on itself.

### Modern Definition

Note that Euclid does not distinguish between straight lines and segments.

A line connecting two given points $$A$$ and $$B$$, $A\neq B,$ which is without a curve and infinite in length is called a straight line and denoted by $$AB$$.

The part of a straight line between the two points $$C$$ and $$D$$ it connects is called a line segment (or simply a segment) and denoted by $$\overline{CD}$$.

$$C$$ and $$D$$ are the endpoints of $$\overline{CD}$$.

Given a segment $$\overline{EF}$$, the part of the corresponding straight line $$EF$$, which begins at the endpoint $$E$$, connects it with the other endpoint $$F$$ and is infinite in length is called a ray. We denote the ray with $$\overline EF$$.

Example of a straight line $$AB$$, a segment $$\overline{CD}$$ and a ray $$\overline EF$$:

Given the Cartesian coordinates of two points in the $$n$$-dimensional Euclidean metric space $$R^n$$,

$\begin{array}{rcl} A&=&(x_1,x_2,\ldots,x_n),\\ B&=&(y_1,y_2,\ldots,y_n) \end{array}$

a segment can be described as a total map. $\overline{AB}:=\cases{[0,1]\to\mathbb R^n\\ t\to (x_1+t(y_1-x_1),x_2+t(y_2-x_2)\ldots,x_1+t(y_n-x_n))}$

analogously, a ray can be described by

$\overline AB:=\cases{[0,\infty]\to\mathbb R^n\\ t\to (x_1+t(y_1-x_1),x_2+t(y_2-x_2)\ldots,x_1+t(y_n-x_n))}$

and a straight line by

$AB:=\cases{[-\infty,\infty]\to\mathbb R^n\\ t\to (x_1+t(y_1-x_1),x_2+t(y_2-x_2)\ldots,x_1+t(y_n-x_n)).}$

The length of the segment $$\overline {AB}$$ is given by the Euclidean distance of the two points:

$d(A,B):=\sqrt{(x_1+y_1)^2+(x_2+y_2)^2+\ldots+(x_n+y_n)^2}.$

### Try out an interactive demonstration:

Thank you to the contributors under CC BY-SA 4.0!

Github: