Skip to content

Mathematics · Ch 4 — Straight Lines

Two-point Form

4.3.3

Two-point Form

The Two-Point Form of a Line

When you know two distinct points that lie on a line, you can write its equation directly. This is one of the most practical forms because you don't need to calculate the slope separately — the formula builds it in.

Suppose a line LL passes through two fixed points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2). Let P(x,y)P(x, y) be any other point on the same line. Since all three points lie on the same straight line, they are collinear. For collinear points, the slope between any two of them must be the same.

Take the slope of segment P1PP_1P and the slope of segment P1P2P_1P_2. They must be equal:

slope of P1P=slope of P1P2\text{slope of } P_1P = \text{slope of } P_1P_2

Writing each slope as rise over run gives:

y−y1x−x1=y2−y1x2−x1\frac{y - y_1}{x - x_1} = \frac{y_2 - y_1}{x_2 - x_1}

This is the core relation. To get the equation of the line, multiply both sides by (x−x1)(x - x_1):

y−y1=y2−y1x2−x1(x−x1)y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1)

This is the two-point form of the equation of a straight line.

y−y1=y2−y1x2−x1(x−x1)y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1)

The formula works provided x1≠x2x_1 \neq x_2. If x1=x2x_1 = x_2, the line is vertical and its equation is simply x=x1x = x_1 — the two-point form is not needed in that case.

Watch out

A common mistake is to swap the coordinates in the slope fraction. Keep the order consistent: the numerator uses y2−y1y_2 - y_1 and the denominator uses x2−x1x_2 - x_1. If you swap either pair, the sign of the slope flips and the equation becomes wrong.


Worked Example

Example 6: Write the equation of the line through the points (1,−1)(1, -1) and (3,5)(3, 5).

Here x1=1x_1 = 1, y1=−1y_1 = -1, x2=3x_2 = 3, y2=5y_2 = 5. Substitute directly into the two-point form:

y−(−1)=5−(−1)3−1(x−1)y - (-1) = \frac{5 - (-1)}{3 - 1} (x - 1)

Simplify the numerator and denominator:

y+1=5+12(x−1)=62(x−1)=3(x−1)y + 1 = \frac{5 + 1}{2} (x - 1) = \frac{6}{2} (x - 1) = 3(x - 1)

Now expand and rearrange to get the equation in a standard form:

y+1=3x−3y + 1 = 3x - 3

−3x+y+4=0-3x + y + 4 = 0 …

Figure 9.11Two-point form
Fig. 9.11 — Two-point form

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

The figure shows a straight line drawn in the first quadrant of the xyxy-plane. Three distinct points are marked on this line: P1(x1,y1)P_1(x_1, y_1), P(x,y)P(x, y), and P2(x2,y2)P_2(x_2, y_2). The point P1P_1 is the leftmost of the three, P2P_2 is the rightmost, and PP lies somewhere between them. The axes are the standard xx-axis (horizontal) and yy-axis (vertical). No grid, no shading, no extra curves — just a single line with three labelled points on it.

The physical idea is simple: if you know two points on a line, you can find the equation of that line. The figure makes this concrete by showing a general point PP sliding along the line between the two fixed points P1P_1 and P2P_2. Because all three points are collinear, the slope between P1P_1 and PP must equal the slope between P1P_1 and P2P_2. That single equality is the entire geometric content of the diagram.

From that equality, the textbook derives the two-point form. The slope of P1PP_1P is y−y1x−x1\frac{y - y_1}{x - x_1}, and the slope of P1P2P_1P_2 is y2−y1x2−x1\frac{y_2 - y_1}{x_2 - x_1}. Setting them equal gives:

y−y1x−x1=y2−y1x2−x1\frac{y - y_1}{x - x_1} = \frac{y_2 - y_1}{x_2 - x_1}

Rearranging this into the standard two-point form:

y−y1=y2−y1x2−x1(x−x1)y - y_1 = \frac{y_2 - y_1}{x_2 - x_1} (x - x_1)

Here, (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) are the coordinates of the two given points, and (x,y)(x, y) is any point on the line. The fraction y2−y1x2−x1\frac{y_2 - y_1}{x_2 - x_1} is the slope mm of the line. The formula works for any two distinct points — it does not matter which one you call P1P_1 and which P2P_2, as long as you are consistent.

Watch out

If x1=x2x_1 = x_2, the denominator x2−x1x_2 - x_1 becomes zero and the formula breaks. That case is a vertical line, handled separately as x=x1x = x_1. …