In Euclidean geometry, a line is a straight curve. When geometry is used to model the real world, lines are used to represent straight objects with negligible width and height. Lines are an idealisation of such objects and have no width or height at all and are usually considered to be infinitely long. Lines are a fundamental concept in some approaches to geometry such as Euclid's, but in others such as analytic geometry and Tarski's axioms they enter as derived notions defined in terms of more fundamental primitives such as points.
A line segment is a part of a line that is bounded by two distinct end points and contains every point on the line between its end points. Depending on how the line segment is defined, either of the two end points may or may not be part of the line segment. Two or more line segments may have some of the same relationships as lines, such as being parallel, intersecting, or skew.
Contents 
When geometry was first formalised by Euclid in Elements, he defined lines to be "breadthless length" with a straight line being a line "which lies evenly with the points on itself".^{[1]} These definitions serve little purpose since they use terms which are not, themselves, defined. In fact, Euclid did not use these definitions in work and probably included them just to make it clear to the reader what was being discussed. In modern geometry, a line is simply taken as an undefined object with properties given by postulates.^{[2]}
In an axiomatic formulation of Euclidean geometry, such as that of Hilbert (Euclid's original axioms contained various flaws which have been corrected by modern mathematicians),^{[3]} 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 at most one point.^{[4]} In two dimensions, ie. the Euclidean plane, two lines which do not intersect are called parallel. In higher dimensions, two lines that do not intersect may be parallel if they are contained in a plane, or skew if they are not.
Any collection of lines partitions the plane into convex polygons; this partition is known as an arrangement of lines.
If concept of "order" of points of a line is defined, a ray, or halfline, may be defined as well. A ray is part of a line which is finite in one direction, but infinite in the other. It can be defined by two points, the initial point, A, and one other, B. The ray is all the points in the line segment between A and B together with all points, C, on the line through A and B such that the points appear on the line in the order A, B, C.^{[5]}
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.
In coordinate geometry, lines in a Cartesian plane can be described algebraically by linear equations and linear functions. In two dimensions, the characteristic equation is often given by the slopeintercept form:
where:
In three dimensions, a line is described by parametric equations:
where:
In R^{2}, every line L is described by a linear equation of the form
with fixed real coefficients a, b and c such that a and b are not both zero (see Linear equation for other forms). Important properties of these lines are their slope, xintercept and yintercept. The eccentricity of a straight line is infinity.
In Euclidean space R^{n} (and analogously in all other vector spaces), we define a line L as a subset of the form
where a and b are given vectors in R^{n} with b nonzero. The vector b describes the direction of the line, and a is a point on the line. Different choices of a and b can yield the same line.
In projective geometry, a line is similar to that in Euclidean geometry but has slightly different properties. In many models of projective geometry, the idea of the line rarely conforms to the notion of the "straight curve" as it is visualised in Euclidean geometry. The Poincaré halfplane model is a typical example of this.
The "straightness" of a line, interpreted as the property that it minimizes distances between its points, can be generalized and leads to the concept of geodesics on differentiable manifolds.
