Skip to content

Mathematics · Ch 9 — Straight Lines

Distance Between Two Parallel Lines

9.4.1

Distance Between Two Parallel Lines

Distance Between Two Parallel Lines

The idea is simple: two parallel lines never meet, so the distance between them is constant — the length of the perpendicular segment joining them. Because they have the same slope, we can write both lines in a form that makes this distance easy to compute.

Deriving the Formula for Slope-Intercept Form

Take two parallel lines in slope-intercept form:

y=mx+c1andy=mx+c2y = mx + c_1 \quad \text{and} \quad y = mx + c_2

The first line meets the x-axis where y=0y = 0, giving 0=mx+c10 = mx + c_1, so x=−c1mx = -\frac{c_1}{m}. That point is A(−c1m,0)A\left(-\frac{c_1}{m}, 0\right).

The distance between the two parallel lines is the perpendicular distance from point AA to the second line y=mx+c2y = mx + c_2. Rewrite the second line in general form: mx−y+c2=0mx - y + c_2 = 0.

Using the perpendicular distance formula from a point (x1,y1)(x_1, y_1) to a line Ax+By+C=0Ax + By + C = 0:

d=∣Ax1+By1+C∣A2+B2d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}

Here A=mA = m, B=−1B = -1, C=c2C = c_2, and (x1,y1)=(−c1m,0)(x_1, y_1) = \left(-\frac{c_1}{m}, 0\right). Substituting:

d=∣m(−c1m)+(−1)(0)+c2∣m2+(−1)2=∣−c1+c2∣m2+1=∣c2−c1∣m2+1d = \frac{\left| m\left(-\frac{c_1}{m}\right) + (-1)(0) + c_2 \right|}{\sqrt{m^2 + (-1)^2}} = \frac{|-c_1 + c_2|}{\sqrt{m^2 + 1}} = \frac{|c_2 - c_1|}{\sqrt{m^2 + 1}}

Since distance is always positive, we take the absolute value. This gives the distance between the two parallel lines.

d=∣c2−c1∣1+m2d = \frac{|c_2 - c_1|}{\sqrt{1 + m^2}}

The General Form Formula

If the lines are given in general form:

Ax+By+C1=0andAx+By+C2=0Ax + By + C_1 = 0 \quad \text{and} \quad Ax + By + C_2 = 0

Notice the coefficients AA and BB are the same — that's what makes them parallel. The slope of each line is −AB-\frac{A}{B}, so m=−ABm = -\frac{A}{B}. Substituting this into the slope-intercept formula:

d=∣c2−c1∣1+m2=∣c2−c1∣1+A2B2=∣c2−c1∣B2+A2B2=∣c2−c1∣⋅∣B∣A2+B2d = \frac{|c_2 - c_1|}{\sqrt{1 + m^2}} = \frac{|c_2 - c_1|}{\sqrt{1 + \frac{A^2}{B^2}}} = \frac{|c_2 - c_1|}{\sqrt{\frac{B^2 + A^2}{B^2}}} = \frac{|c_2 - c_1| \cdot |B|}{\sqrt{A^2 + B^2}}

Now, the y-intercept cc in slope-intercept form relates to the general form. From y=−ABx−CBy = -\frac{A}{B}x - \frac{C}{B}, we have c=−CBc = -\frac{C}{B}. So c1=−C1Bc_1 = -\frac{C_1}{B} and c2=−C2Bc_2 = -\frac{C_2}{B}. Then: …

Figure 9.15Distance between two parallel lines
Fig. 9.15 — Distance between two parallel lines

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

What Fig. 9.15 Shows

The figure is a simple coordinate-plane sketch that builds the distance formula for parallel lines. Two parallel lines are drawn: one in indigo labelled y=mx+c1y = mx + c_1, the other in blue labelled y=mx+c2y = mx + c_2. Both have the same slope mm, so they never meet. The lower line (indigo) crosses the x-axis at point A, whose coordinates are given as A(−c1m,0)A\left(-\frac{c_1}{m}, 0\right). This is obtained by setting y=0y = 0 in y=mx+c1y = mx + c_1 and solving for xx.

A dashed perpendicular segment connects point A on the lower line to the upper line. A small right-angle mark at the foot of this dashed segment confirms it is truly perpendicular. The length of this dashed segment is labelled dd — the distance between the two parallel lines.

The key idea: the distance between two parallel lines is the length of the perpendicular from any point on one line to the other line. The figure chooses the x-intercept of the lower line as that convenient point.

The Formula Derived

From the figure, the distance dd is the perpendicular distance from point A(−c1m,0)A\left(-\frac{c_1}{m}, 0\right) to the line y=mx+c2y = mx + c_2. Using the point-to-line distance formula:

d=∣m(−c1m)−0+c2∣m2+1=∣−c1+c2∣m2+1=∣c2−c1∣m2+1d = \frac{|m(-\frac{c_1}{m}) - 0 + c_2|}{\sqrt{m^2 + 1}} = \frac{|-c_1 + c_2|}{\sqrt{m^2 + 1}} = \frac{|c_2 - c_1|}{\sqrt{m^2 + 1}}

d=∣c2−c1∣1+m2d = \frac{|c_2 - c_1|}{\sqrt{1 + m^2}}

Here c1c_1 and c2c_2 are the y-intercepts of the two parallel lines, and mm is their common slope. The absolute value ensures the distance is positive regardless of which line is above the other.

The General Form

When the lines are given in general form Ax+By+C1=0Ax + By + C_1 = 0 and Ax+By+C2=0Ax + By + C_2 = 0, the formula becomes:

d=∣C2−C1∣A2+B2d = \frac{|C_2 - C_1|}{\sqrt{A^2 + B^2}}

This follows directly from the slope-intercept version because m=−ABm = -\frac{A}{B} and c=−CBc = -\frac{C}{B} (when B≠0B \neq 0). Substituting these into the first formula and simplifying gives the general form.

Watch out

The general-form formula uses C1C_1 and C2C_2 as the constant terms in Ax+By+C=0Ax + By + C = 0. Students often mistakenly use the coefficients of xx or yy — only the constants change between the two parallel lines.

Why This Figure Matters …

Figure 9.16Distance measured along a 135° line
Fig. 9.16 — Distance measured along a 135° line

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

Fig. 9.16 is a coordinate-plane diagram that illustrates a specific kind of distance problem: finding how far a given point is from a line, but measured along a second line (not along the perpendicular). This is a different idea from the perpendicular distance formula you use in most problems.

The plot shows two lines. The first is the line 4x−y=04x - y = 0, which passes through the origin and has slope 44 — it is quite steep. The second line passes through the point P(4,1)P(4, 1) and has slope −1-1 (because tan⁡135∘=−1\tan 135^\circ = -1). Its equation is x+y−5=0x + y - 5 = 0. These two lines intersect at the point Q(1,4)Q(1, 4). At point PP, the 135∘135^\circ angle that the second line makes with the positive xx-axis is marked.

The physical idea is this: you are standing at point PP and you walk along the line of slope −1-1 until you hit the line 4x−y=04x - y = 0. The distance you travel is the straight-line distance from PP to the intersection point QQ. That distance is what the problem calls "the distance of the line 4x−y=04x - y = 0 from the point P(4,1)P(4,1) measured along the line making an angle of 135∘135^\circ with the positive xx-axis."

The textbook uses this figure to develop the method for such problems. The key steps are:

  1. Find the equation of the line along which you measure. Here, slope m=tan⁡135∘=−1m = \tan 135^\circ = -1, passing through P(4,1)P(4,1), giving y−1=−1(x−4)y - 1 = -1(x - 4), i.e. x+y−5=0x + y - 5 = 0.

  2. Find the intersection QQ of this line with the given line 4x−y=04x - y = 0. Solving the system:

4x−y=0andx+y−5=04x - y = 0 \quad \text{and} \quad x + y - 5 = 0

gives x=1x = 1, y=4y = 4, so Q=(1,4)Q = (1, 4).

  1. The required distance is simply the distance between PP and QQ:

d=(1−4)2+(4−1)2=9+9=18=32 units.d = \sqrt{(1 - 4)^2 + (4 - 1)^2} = \sqrt{9 + 9} = \sqrt{18} = 3\sqrt{2} \text{ units}.

d=(xQ−xP)2+(yQ−yP)2d = \sqrt{(x_Q - x_P)^2 + (y_Q - y_P)^2} …