Skip to content

Chapter 1 — Fundamental Concepts

1.10 — Lines

All the geometry of a line is stored in a single number: how much it rises for each step it advances.


The chapter ends its technical journey with the simplest object of the analytic geometry of §1.8, and for that very reason the most fundamental: the line. All the geometric information of a non-vertical line fits into a single number, its slope. Starting from that number, this section builds the different ways of writing the equation of a line and proves the conditions for parallelism and perpendicularity between two lines. We will follow the same path as with distance in §1.8: we start from Euclidean geometry, translate it into an algebraic definition and, from there on, prove everything with algebra.


§1. Slope

Given two points \(P_1 = (x_1, y_1)\) and \(P_2 = (x_2, y_2)\) with \(x_1 \neq x_2\), their slope is

\[m = \frac{y_2 - y_1}{x_2 - x_1}\]

the quotient of how much \(y\) changes and how much \(x\) changes in going from one point to the other. The condition \(x_1 \neq x_2\) ensures that the denominator is not zero. The order of the points does not matter: swapping them changes the sign of the numerator and the denominator at the same time, and the quotient stays the same. If \(m > 0\), moving to the right means going up; if \(m < 0\), going down; if \(m = 0\), the two points are at the same height.

A line with two points P1 and P2, the horizontal segment (run) and the vertical one (rise) forming a right angle, illustrating m as their quotient

Figure 1.6 — Slope as the quotient of the rise, \(y_2 - y_1\), and the run, \(x_2 - x_1\).

Why is this the number that describes a line? Euclidean geometry answers as follows. If \(P_1\), \(P_2\) and \(P_3\) are three points of the same non-vertical line, we draw horizontal and vertical segments from them, as in the proof in §1.8. Two right triangles are formed, one with hypotenuse \(P_1P_2\) and the other with hypotenuse \(P_1P_3\), which have the same acute angle at \(P_1\) because the three points are aligned. Two right triangles with an equal acute angle are similar, and their legs are proportional, so that \(\frac{|y_2 - y_1|}{|x_2 - x_1|} = \frac{|y_3 - y_1|}{|x_3 - x_1|}\). The signs also agree, because along a line one always goes up, or always goes down, when moving to the right. The slope computed with any two points of a line is the same.

As we did with distance, from here on we adopt the algebraic consequence of this fact as a definition. Let us fix a point \((0, b)\) of the line on the \(y\)-axis. A point \((x, y)\) with \(x \neq 0\) lies on the line exactly when the slope between \((0, b)\) and \((x, y)\) is \(m\), that is, when \(\frac{y - b}{x} = m\), or \(y = mx + b\); and for \(x = 0\) this equation gives \((0, b)\) itself. That is why we call the non-vertical line with slope \(m\) and \(y\)-intercept \(b\) the curve, in the sense of §1.8, formed by the points that satisfy

\[y = mx + b\]

and the vertical line the curve formed by the points that satisfy \(x = c\), for a fixed real number \(c\). With this definition, the geometric fact becomes an algebraic theorem.

Proposition. If \((x_1, y_1)\) and \((x_2, y_2)\) are two distinct points of the line \(y = mx + b\), then \(\dfrac{y_2 - y_1}{x_2 - x_1} = m\).

Proof. If \(x_1 = x_2\), then \(y_1 = mx_1 + b = mx_2 + b = y_2\) and the points would be equal; therefore \(x_1 \neq x_2\). Moreover \(y_2 - y_1 = (mx_2 + b) - (mx_1 + b) = m(x_2 - x_1)\), and dividing by \(x_2 - x_1 \neq 0\) gives the equality. \(\blacksquare\)

This proposition is what authorizes us to speak of "the" slope of a line, and not of a slope that depends on the two points chosen.

Reminder. The slope between two points is \(\dfrac{y_2 - y_1}{x_2 - x_1}\). A non-vertical line is the graph of \(y = mx + b\), and its slope is \(m\) for whatever pair of points is chosen.



§2. Equations of the line

A non-vertical line is determined by its slope and one of its points.

Proposition (point-slope form). The line with slope \(m\) passing through \((x_1, y_1)\) is the graph of

\[y - y_1 = m(x - x_1)\]

Proof. The line \(y = mx + b\) passes through \((x_1, y_1)\) if and only if \(y_1 = mx_1 + b\), that is, if and only if \(b = y_1 - mx_1\). There is, then, exactly one line with slope \(m\) passing through that point, the one with equation \(y = mx + y_1 - mx_1\), and that equation is equivalent to \(y - y_1 = m(x - x_1)\), because one passes from one to the other by adding \(-y_1\) to both sides. \(\blacksquare\)

When the known point is the intersection with the \(y\)-axis, \((0, b)\), the point-slope form gives \(y - b = m(x - 0)\), which is the slope-intercept form \(y = mx + b\). They are the same line, presented from different data; which one is more convenient depends on what information is at hand.

A line is also determined by two of its points.

Proposition (line through two points). Through two points \((x_1, y_1)\) and \((x_2, y_2)\) with \(x_1 \neq x_2\) passes exactly one non-vertical line, the one with slope \(m = \dfrac{y_2 - y_1}{x_2 - x_1}\) passing through \((x_1, y_1)\).

Proof. If a non-vertical line passes through the two points, by the proposition of §1 its slope is necessarily \(m = \frac{y_2 - y_1}{x_2 - x_1}\), and by the previous proposition it is the only line with that slope passing through \((x_1, y_1)\). Conversely, that line passes through \((x_1, y_1)\), and also through \((x_2, y_2)\), because \(y_1 + m(x_2 - x_1) = y_1 + (y_2 - y_1) = y_2\). \(\blacksquare\)

Example. The line through \((1, 3)\) and \((4, -3)\) has slope \(m = \frac{-3 - 3}{4 - 1} = -2\), and its equation is \(y - 3 = -2(x - 1)\), that is, \(y = -2x + 5\). Let us check with the second point: \(-2 \cdot 4 + 5 = -3\).

If \(x_1 = x_2\) and the points are distinct, no non-vertical line passes through both, because an equation \(y = mx + b\) assigns a single value of \(y\) to each \(x\). The only line containing them is the vertical line \(x = x_1\).

Reminder. Point-slope form: \(y - y_1 = m(x - x_1)\). Slope-intercept form: \(y = mx + b\). Through two points with different abscissas passes a single non-vertical line.



§3. Parallel and perpendicular lines

Two distinct lines are parallel when they have no point in common. With the algebraic definition of §1, parallelism can be proved instead of assumed.

Proposition. Two distinct non-vertical lines, \(y = m_1x + b_1\) and \(y = m_2x + b_2\), are parallel if and only if \(m_1 = m_2\). If \(m_1 \neq m_2\), they meet at exactly one point.

Proof. A point \((x, y)\) lies on both lines if and only if \(y = m_1x + b_1\) and \(y = m_2x + b_2\), which happens exactly when \(x\) is a solution of \(m_1x + b_1 = m_2x + b_2\) and \(y = m_1x + b_1\). That equation is equivalent to \((m_1 - m_2)x = b_2 - b_1\), which is linear in the sense of §1.5. If \(m_1 \neq m_2\), it has a unique solution, \(x = \frac{b_2 - b_1}{m_1 - m_2}\), and the lines meet at a single point. If \(m_1 = m_2\), then \(b_1 \neq b_2\), because the lines are distinct, and the equation reduces to \(0 = b_2 - b_1\), which is false: there are no common points. \(\blacksquare\)

Likewise, two distinct vertical lines, \(x = c_1\) and \(x = c_2\), are parallel, and a non-vertical line meets a vertical line \(x = c\) at exactly one point, \((c, mc + b)\).

Perpendicularity again requires a link with Euclidean geometry, the same one as in §1.8: the Pythagorean theorem and its converse, which say that a triangle has a right angle at a vertex if and only if the square of the side opposite that vertex is the sum of the squares of the other two.

Proposition. Two non-vertical lines, with slopes \(m_1\) and \(m_2\), are perpendicular if and only if \(m_1 m_2 = -1\).

Proof. If \(m_1 m_2 = -1\), then \(m_1 \neq m_2\), because \(m_1^2 = -1\) is impossible; and if the lines are perpendicular, they meet. In both cases, by the previous proposition, the lines meet at a single point \(P_0 = (x_0, y_0)\). By the point-slope form, the points \(A = (x_0 + 1, y_0 + m_1)\) and \(B = (x_0 + 1, y_0 + m_2)\) lie on the first and the second line, respectively, and are distinct from \(P_0\). The lines are perpendicular if and only if the triangle \(P_0AB\) has a right angle at \(P_0\), that is, by Pythagoras and its converse, if and only if

\[d(A, B)^2 = d(P_0, A)^2 + d(P_0, B)^2\]

By the formula of §1.8, \(d(P_0, A)^2 = 1 + m_1^2\), \(d(P_0, B)^2 = 1 + m_2^2\) and \(d(A, B)^2 = (m_2 - m_1)^2 = m_1^2 - 2m_1m_2 + m_2^2\). The condition becomes

\[m_1^2 - 2m_1m_2 + m_2^2 = 2 + m_1^2 + m_2^2 \quad\Longleftrightarrow\quad -2m_1m_2 = 2 \quad\Longleftrightarrow\quad m_1m_2 = -1\]

where each step is an equivalence, because one passes from one equation to the next by adding the same term or multiplying by a nonzero number (§1.5). \(\blacksquare\)

The condition \(m_1 m_2 = -1\) is also written \(m_2 = -\frac{1}{m_1}\): each slope is the negative of the reciprocal of the other. The case the formula does not cover is that of a horizontal line, with slope \(0\), and a vertical one, which has no slope; those two lines are also perpendicular.

This proof shows, in condensed form, the program of analytic geometry: a geometric condition, that two lines form a right angle, is translated into an algebraic condition on two numbers, that their product be \(-1\).

Panel with two parallel lines of equal slope on the left, and two perpendicular lines whose slopes multiply to -1 on the right, with the right angle marked

Figure 1.7 — Parallel lines (\(m_1=m_2\)) and perpendicular lines (\(m_1m_2=-1\)).

Reminder. Two distinct non-vertical lines are parallel if \(m_1 = m_2\), and perpendicular if \(m_1 m_2 = -1\).



§4. The general form

The forms of §2 do not work for vertical lines, which have no slope. There is a form of equation that covers all lines without exception.

Proposition (general form). Every line in the plane is the graph of an equation

\[Ax + By + C = 0\]

with \(A\) and \(B\) not both zero. Conversely, every equation of that form has a line as its graph.

Proof. The line \(y = mx + b\) is the graph of \(mx - y + b = 0\), which has that form with \(A = m\), \(B = -1\) and \(C = b\); the vertical line \(x = c\) is the graph of \(x - c = 0\), with \(A = 1\), \(B = 0\) and \(C = -c\). Conversely, suppose \(Ax + By + C = 0\) with \(A\) and \(B\) not both zero. If \(B \neq 0\), the equation is equivalent to \(y = -\frac{A}{B}x - \frac{C}{B}\), the line with slope \(-\frac{A}{B}\) and \(y\)-intercept \(-\frac{C}{B}\). If \(B = 0\), then \(A \neq 0\), and the equation is equivalent to \(x = -\frac{C}{A}\), a vertical line. \(\blacksquare\)

The general form is not unique: multiplying the equation by a nonzero number gives another equivalent equation, with the same graph. Thus \(2x - y + 3 = 0\) and \(-4x + 2y - 6 = 0\) describe the same line, \(y = 2x + 3\).

Reminder. \(Ax + By + C = 0\), with \(A\) and \(B\) not both zero, describes any line in the plane, vertical ones included: if \(B \neq 0\), the slope is \(-\frac{A}{B}\); if \(B = 0\), the line is vertical.



With the line, the technical journey of the chapter is complete: the real numbers, their powers and roots, algebraic and fractional expressions, equations and inequalities, and the analytic geometry that carries them into the plane. The next section closes the chapter with an overall view.