The notion of line or straight line was introduced by ancient mathematicians to represent straight objects (i.e., having no curvature) with negligible width and depth. Lines are an idealization of such objects. Until the 17th century, lines were defined in this manner: "The straight line is the first species of quantity, which has only one dimension, namely length, without any width nor depth, and is nothing else than the flow or run of the point which … will leave from its imaginary moving some vestige in length, exempt of any width. … The straight line is that which is equally extended between its points."In (rather old) French: "La ligne est la première espece de quantité, laquelle a tant seulement une dimension à sçavoir longitude, sans aucune latitude ni profondité, & n'est autre chose que le flux ou coulement du poinct, lequel … laissera de son mouvement imaginaire quelque vestige en long, exempt de toute latitude. … La ligne droicte est celle qui est également estenduë entre ses poincts." Pages 7 and 8 of Les quinze livres des éléments géométriques d'Euclide Megarien, traduits de Grec en François, & augmentez de plusieurs figures & demonstrations, avec la corrections des erreurs commises és autres traductions, by Pierre Mardele, Lyon, MDCXLV (1645).
Euclid described a line as "breadthless length" which "lies equally with respect to the points on itself"; he introduced several as basic unprovable properties from which he constructed all of geometry, which is now called Euclidean geometry to avoid confusion with other geometries which have been introduced since the end of the 19th century (such as nonEuclidean, projective and affine geometry).
In modern mathematics, given the multitude of geometries, the concept of a line is closely tied to the way the geometry is described. For instance, in analytic geometry, a line in the plane is often defined as the set of points whose coordinates satisfy a given linear equation, but in a more abstract setting, such as incidence geometry, a line may be an independent object, distinct from the set of points which lie on it.
When a geometry is described by a set of , the notion of a line is usually left undefined (a socalled primitive notion object). The properties of lines are then determined by the axioms which refer to them. One advantage to this approach is the flexibility it gives to users of the geometry. Thus in differential geometry a line may be interpreted as a geodesic (shortest path between points), while in some projective geometries a line is a 2dimensional vector space (all linear combinations of two independent vectors). This flexibility also extends beyond mathematics and, for example, permits physicists to think of the path of a light ray as being a line.
In a nonaxiomatic or simplified axiomatic treatment of geometry, the concept of a primitive notion may be too abstract to be dealt with. In this circumstance it is possible that a description or mental image of a primitive notion is provided to give a foundation to build the notion on which would formally be based on the (unstated) axioms. Descriptions of this type may be referred to, by some authors, as definitions in this informal style of presentation. These are not true definitions and could not be used in formal proofs of statements. The "definition" of line in Euclid's Elements falls into this category. Even in the case where a specific geometry is being considered (for example, Euclidean geometry), there is no generally accepted agreement among authors as to what an informal description of a line should be when the subject is not being treated formally.
In an formulation of Euclidean geometry, such as that of Hilbert (Euclid's original axioms contained various flaws which have been corrected by modern mathematicians),Faber, Part III, p. 108. a line is stated to have certain properties which relate it to other lines and points. For example, for any two distinct points, there is a unique line containing them, and any two distinct lines intersect in at most one point.Faber, Appendix B, p. 300. In two , i.e., the Euclidean plane, two lines which do not intersect are called parallel. In higher dimensions, two lines that do not intersect are parallel if they are contained in a plane, or Skew lines if they are not.
Any collection of finitely many lines partitions the plane into (possibly unbounded); this partition is known as an arrangement of lines.
In two dimensions, the equation for nonvertical lines is often given in the slopeintercept form:
The slope of the line through points $A(x\_a,\; y\_a)$ and $B(x\_b,\; y\_b)$, when $x\_a\; \backslash neq\; x\_b$, is given by $m\; =\; (y\_b\; \; y\_a)/(x\_b\; \; x\_a)$ and the equation of this line can be written $y\; =\; m\; (x\; \; x\_a)\; +\; y\_a$.
In $\backslash mathbb\{R^2\}$, every line $L$ (including vertical lines) is described by a linear equation of the form
with fixed real a, b and c such that a and b are not both zero. Using this form, vertical lines correspond to the equations with b = 0.
There are many variant ways to write the equation of a line which can all be converted from one to another by algebraic manipulation. These forms (see Linear equation for other forms) are generally named by the type of information (data) about the line that is needed to write down the form. Some of the important data of a line is its slope, xintercept, known points on the line and yintercept.
The equation of the line passing through two different points $P\_0(\; x\_0,\; y\_0\; )$ and $P\_1(x\_1,\; y\_1)$ may be written as
In three dimensions, lines can not be described by a single linear equation, so they are frequently described by parametric equations:
They may also be described as the simultaneous solutions of two
Unlike the slopeintercept and intercept forms, this form can represent any line but also requires only two finite parameters, θ and p, to be specified. If p > 0, then θ is uniquely defined modulo 2. On the other hand, if the line is through the origin ( c = 0, p = 0), one drops the term to compute sin θ and cos θ, and θ is only defined modulo .
If a is vector OA and b is vector OB, then the equation of the line can be written: $\backslash mathbf\{r\}\; =\; \backslash mathbf\{a\}\; +\; \backslash lambda\; (\backslash mathbf\{b\}\; \; \backslash mathbf\{a\})$.
A ray starting at point A is described by limiting λ. One ray is obtained if λ ≥ 0, and the opposite ray comes from λ ≤ 0.
In more general Euclidean space, R^{ n} (and analogously in every other affine space), the line L passing through two different points a and b (considered as vectors) is the subset
In affine coordinates, in ndimensional space the points X=( x_{1}, x_{2}, ..., x_{n}), Y=( y_{1}, y_{2}, ..., y_{n}), and Z=( z_{1}, z_{2}, ..., z_{n}) are collinear if the matrix
1 & x_1 & x_2 & \dots & x_n \\ 1 & y_1 & y_2 & \dots & y_n \\ 1 & z_1 & z_2 & \dots & z_n\end{bmatrix} has a rank less than 3. In particular, for three points in the plane ( n = 2), the above matrix is square and the points are collinear if and only if its determinant is zero.
Equivalently for three points in a plane, the points are collinear if and only if the slope between one pair of points equals the slope between any other pair of points (in which case the slope between the remaining pair of points will equal the other slopes). By extension, k points in a plane are collinear if and only if any ( k–1) pairs of points have the same pairwise slopes.
In Euclidean geometry, the Euclidean distance d( a, b) between two points a and b may be used to express the collinearity between three points by:Alessandro Padoa, Un nouveau système de définitions pour la géométrie euclidienne, International Congress of Mathematicians, 1900Bertrand Russell, The Principles of Mathematics, p.410
In the geometries where the concept of a line is a primitive notion, as may be the case in some synthetic geometries, other methods of determining collinearity are needed.
In the context of determining parallelism in Euclidean geometry, a transversal is a line that intersects two other lines that may or not be parallel to each other.
For more general , lines could also be:
For a convex polygon quadrilateral with at most two parallel sides, the Newton line is the line that connects the midpoints of the two .
For a hexagon with vertices lying on a conic we have the Pascal line and, in the special case where the conic is a pair of lines, we have the Pappus line.
Parallel lines are lines in the same plane that never cross. Intersecting lines share a single point in common. Coincidental lines coincide with each other—every point that is on either one of them is also on the other.
Perpendicular lines are lines that intersect at .
In threedimensional space, skew lines are lines that are not in the same plane and thus do not intersect each other.
Given distinct points A and B, they determine a unique ray with initial point A. As two points define a unique line, this ray consists of all the points between A and B (including A and B) and all the points C on the line through A and B such that B is between A and C. This is, at times, also expressed as the set of all points C such that A is not between B and C. A point D, on the line determined by A and B but not in the ray with initial point A determined by B, will determine another ray with initial point A. With respect to the AB ray, the AD ray is called the opposite ray.
Thus, we would say that two different points, A and B, define a line and a decomposition of this line into the disjoint union of an open segment and two rays, BC and AD (the point D is not drawn in the diagram, but is to the left of A on the line AB). These are not opposite rays since they have different initial points.
In Euclidean geometry two rays with a common endpoint form an angle.
The definition of a ray depends upon the notion of betweenness for points on a line. It follows that rays exist only for geometries for which this notion exists, typically Euclidean geometry or affine geometry over an ordered field. On the other hand, rays do not exist in projective geometry nor in a geometry over a nonordered field, like the or any finite field.
In topology, a ray in a space X is a continuous embedding R^{+} → X. It is used to define the important concept of end of the space.

