IMOClass 11 › Straight Lines

Straight Lines

Slope and Forms of a Line

The slope (or gradient) of a line measures how steeply it rises or falls. If a line passes through two distinct points $(x_1, y_1)$ and $(x_2, y_2)$ with $x_1 \ne x_2$, its slope is the ratio of the change in $y$ to the change in $x$:

$$m=\dfrac{y_2-y_1}{x_2-x_1}$$

This single number captures everything about a line's direction. A positive slope means the line climbs left-to-right; a negative slope means it falls. A horizontal line has slope $0$ (no rise), while a vertical line has $x_1 = x_2$, so the denominator vanishes and the slope is undefined — not infinite, simply not a real number.

Slope as an angle. If a line makes an angle $\theta$ (measured anticlockwise from the positive $x$-axis, with $0^\circ \le \theta < 180^\circ$) of inclination, then:

$$m=\tan\theta$$

So a line inclined at $45^\circ$ has slope $\tan 45^\circ = 1$, and one at $135^\circ$ has slope $\tan 135^\circ = -1$. Because $\tan 90^\circ$ is undefined, this is consistent with a vertical line having no slope.

Parallel and perpendicular lines. Two non-vertical lines with slopes $m_1$ and $m_2$ satisfy clean relationships you will use constantly:

RelationshipCondition on slopesGeometric meaning
Parallel$m_1 = m_2$same inclination, never meet
Perpendicular$m_1 \cdot m_2 = -1$cross at $90^\circ$
Coincident$m_1 = m_2$ and share a pointidentical line
Same line / angle$m_1 = m_2 = \tan\theta$equal inclination $\theta$

The perpendicular rule $m_1 m_2 = -1$ is equivalent to saying each slope is the negative reciprocal of the other: $m_2 = -\dfrac{1}{m_1}$.

Angle between two lines. The acute angle $\theta$ between two non-vertical, non-perpendicular lines of slopes $m_1$ and $m_2$ is given by:

$$\tan\theta=\left|\dfrac{m_2-m_1}{1+m_1 m_2}\right|$$

Taking the absolute value guarantees you get the acute angle. Dropping the modulus gives one of the two supplementary angles the lines actually form. Notice that if $1 + m_1 m_2 = 0$ the formula blows up — which is exactly the perpendicular case, where the angle is $90^\circ$.

Deeper Insight — why slope is the DNA of a line: Slope is the one invariant that survives no matter which two points on the line you pick, and that permanence is what makes it so powerful. Choose any pair of points on the same line and the ratio $\tfrac{y_2-y_1}{x_2-x_1}$ comes out identical — this is the geometric face of the algebraic fact that a straight line has a constant rate of change. That constancy is precisely why $m = \tan\theta$ works: a fixed direction means a fixed inclination angle. The parallel and perpendicular conditions are not arbitrary rules to memorise but direct consequences — equal slopes force equal inclinations, and the $m_1 m_2 = -1$ condition is what you get when two inclinations differ by exactly $90^\circ$. When you reach calculus, this same slope reappears as the derivative: the slope of the tangent line is the instantaneous rate of change, so mastering slope now pays dividends far beyond coordinate geometry.

Slope as rise over run with inclination angle theta Slope = rise ÷ run = tanθ run = x₂−x₁ rise = y₂−y₁ (x₁, y₁)(x₂, y₂) θ Parallel lines have equal slopes and perpendicular lines have product of slopes minus one Parallel vs Perpendicular PARALLEL: m₁ = m₂same direction PERPENDICULAR: m₁·m₂ = −1cross at 90°
Example 1: Find the slope of the line passing through $(2, 3)$ and $(5, 9)$.
  1. Apply the slope formula with $(x_1, y_1) = (2, 3)$ and $(x_2, y_2) = (5, 9)$.
  2. $m = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{9 - 3}{5 - 2} = \dfrac{6}{3}$.
  3. Simplify: $m = 2$.

Answer: $m = 2$ (the line rises $2$ units for every $1$ unit right).

Example 2: A line makes an angle of $120^\circ$ with the positive direction of the $x$-axis. Find its slope.
  1. Slope equals the tangent of the inclination: $m = \tan\theta = \tan 120^\circ$.
  2. $\tan 120^\circ = \tan(180^\circ - 60^\circ) = -\tan 60^\circ$.
  3. Since $\tan 60^\circ = \sqrt{3}$, we get $m = -\sqrt{3}$.

Answer: $m = -\sqrt{3}$.

Example 3: Show that the line through $(1, 2)$ and $(4, 8)$ is parallel to the line through $(0, -1)$ and $(2, 3)$.
  1. Slope of the first line: $m_1 = \dfrac{8 - 2}{4 - 1} = \dfrac{6}{3} = 2$.
  2. Slope of the second line: $m_2 = \dfrac{3 - (-1)}{2 - 0} = \dfrac{4}{2} = 2$.
  3. Since $m_1 = m_2 = 2$, the lines have equal slopes.

Answer: The lines are parallel ($m_1 = m_2 = 2$).

Example 4: Find the value of $k$ so that the line through $(3, k)$ and $(2, 7)$ is perpendicular to a line of slope $-\dfrac{1}{2}$.
  1. For perpendicularity, the slope of our line must be the negative reciprocal of $-\dfrac{1}{2}$, namely $2$.
  2. Slope through $(3, k)$ and $(2, 7)$: $m = \dfrac{7 - k}{2 - 3} = \dfrac{7 - k}{-1} = k - 7$.
  3. Set $k - 7 = 2$, so $k = 9$.

Answer: $k = 9$.

Example 5: Find the acute angle between the lines with slopes $m_1 = 1$ and $m_2 = \dfrac{1}{2}$.
  1. Use $\tan\theta = \left|\dfrac{m_2 - m_1}{1 + m_1 m_2}\right|$.
  2. Substitute: $\tan\theta = \left|\dfrac{\tfrac{1}{2} - 1}{1 + (1)(\tfrac{1}{2})}\right| = \left|\dfrac{-\tfrac{1}{2}}{\tfrac{3}{2}}\right| = \dfrac{1}{3}$.
  3. Therefore $\theta = \tan^{-1}\dfrac{1}{3} \approx 18.43^\circ$.

Answer: $\theta = \tan^{-1}\dfrac{1}{3} \approx 18.43^\circ$.

Example 6: Without finding the angle, decide whether the lines through $(0, 0),(2, 4)$ and through $(1, 5),(3, 4)$ are perpendicular.
  1. Slope of the first line: $m_1 = \dfrac{4 - 0}{2 - 0} = 2$.
  2. Slope of the second line: $m_2 = \dfrac{4 - 5}{3 - 1} = \dfrac{-1}{2}$.
  3. Product of slopes: $m_1 m_2 = 2 \times \left(-\dfrac{1}{2}\right) = -1$.

Answer: Yes — since $m_1 m_2 = -1$, the lines are perpendicular.

Quick recap
  • Slope $m = \dfrac{y_2 - y_1}{x_2 - x_1}$ is constant for any two points on the line; it is undefined for a vertical line.
  • Slope equals the tangent of the inclination: $m = \tan\theta$, with $0^\circ \le \theta < 180^\circ$.
  • Parallel lines have equal slopes; perpendicular lines satisfy $m_1 m_2 = -1$ (negative reciprocals).
  • Acute angle between lines: $\tan\theta = \left|\dfrac{m_2 - m_1}{1 + m_1 m_2}\right|$.
  • A vanishing denominator $1 + m_1 m_2 = 0$ signals the perpendicular case, where $\theta = 90^\circ$.
✓ Quick check
The x-intercept of the line 3x + y = 12 is:
Put y = 0. Then 3x = 12, so x = 4.
Find the distance between the parallel lines 3x + 4y − 9 = 0 and 6x + 8y − 15 = 0.
Rewriting first line as 6x + 8y − 18 = 0. Distance d = |c1 − c2| / √(a² + b²) = |−18 − (−15)| / √(36 + 64) = 3 / 10.

Distance and Angle

A straight line can be described algebraically in several equivalent ways. Each form is tailored to the information you happen to have — a point and a slope, two points, intercepts, or a perpendicular from the origin. Knowing which form to reach for is half the battle.

Point-slope form. If a line has slope $m$ and passes through a known point $(x_1, y_1)$, every other point $(x, y)$ on it satisfies:

$$y-y_1=m(x-x_1)$$

This is the most fundamental form, because it is just the slope definition rearranged. Nearly every other form can be derived from it.

Two-point form. When two points $(x_1, y_1)$ and $(x_2, y_2)$ are given, compute the slope and substitute:

$$y-y_1=\dfrac{y_2-y_1}{x_2-x_1}(x-x_1)$$

Slope-intercept form. If a line has slope $m$ and cuts the $y$-axis at $(0, c)$, then $c$ is the $y$-intercept and:

$$y=mx+c$$

Intercept form. If a line cuts the $x$-axis at $(a, 0)$ and the $y$-axis at $(0, b)$, with $a, b \ne 0$:

$$\dfrac{x}{a}+\dfrac{y}{b}=1$$

Normal (perpendicular) form. If the perpendicular from the origin to the line has length $p > 0$ and makes angle $\omega$ with the positive $x$-axis:

$$x\cos\omega+y\sin\omega=p$$

General form. Every straight line can be written as a single linear equation:

$$Ax+By+C=0,\quad (A,B)\ne(0,0)$$

From the general form you can read off the slope as $-\dfrac{A}{B}$ (when $B \ne 0$), the $x$-intercept as $-\dfrac{C}{A}$, and the $y$-intercept as $-\dfrac{C}{B}$. The table below summarises when each form is most convenient:

FormEquationUse when you know
Point-slope$y - y_1 = m(x - x_1)$one point and the slope
Two-point$y - y_1 = \dfrac{y_2 - y_1}{x_2 - x_1}(x - x_1)$two points
Slope-intercept$y = mx + c$slope and $y$-intercept
Intercept$\dfrac{x}{a} + \dfrac{y}{b} = 1$both axis intercepts
Normal$x\cos\omega + y\sin\omega = p$perpendicular distance from origin
General$Ax + By + C = 0$any line (standard form)

Deeper Insight — one line, many disguises: All six forms describe exactly the same kind of object, and any one can be algebraically rearranged into any other — they are disguises of a single linear relationship, not different lines. The general form $Ax + By + C = 0$ is the great unifier: it has no restrictions (it even handles vertical lines, where $B = 0$ and the slope-intercept form fails), which is why it is the standard you convert to when comparing or combining lines. The other forms are conveniences that let you skip arithmetic when you already have the right data — reaching for intercept form when you know where a line crosses the axes saves you from solving simultaneous equations. The normal form is the odd one out and the most geometric: it encodes the shortest distance $p$ from the origin and the direction $\omega$ of that shortest path, which is precisely why it leads naturally into the distance formula of the next topic. Fluency here is really fluency in translation — recognising the same line no matter which costume it wears.

Slope-intercept form showing y-intercept c and slope m Slope-Intercept Form: y = mx + c yx (0, c) runrise slope m = rise/run Intercept form showing x-intercept a and y-intercept b Intercept Form: x/a + y/b = 1 (a, 0) (0, b) cuts both axes
Example 1: Find the equation of the line through $(2, 3)$ with slope $4$.
  1. Use point-slope form $y - y_1 = m(x - x_1)$ with $m = 4$, $(x_1, y_1) = (2, 3)$.
  2. $y - 3 = 4(x - 2)$.
  3. Expand: $y - 3 = 4x - 8 \Rightarrow y = 4x - 5$.

Answer: $y = 4x - 5$, or in general form $4x - y - 5 = 0$.

Example 2: Find the equation of the line passing through $(1, 2)$ and $(3, 8)$.
  1. Slope $m = \dfrac{8 - 2}{3 - 1} = \dfrac{6}{2} = 3$.
  2. Two-point (via point-slope): $y - 2 = 3(x - 1)$.
  3. Expand: $y - 2 = 3x - 3 \Rightarrow y = 3x - 1$.

Answer: $y = 3x - 1$, i.e. $3x - y - 1 = 0$.

Example 3: A line cuts the $x$-axis at $4$ and the $y$-axis at $-2$. Find its equation.
  1. Here $a = 4$ and $b = -2$, so use intercept form $\dfrac{x}{a} + \dfrac{y}{b} = 1$.
  2. $\dfrac{x}{4} + \dfrac{y}{-2} = 1$.
  3. Multiply through by $4$: $x - 2y = 4$.

Answer: $x - 2y = 4$, i.e. $x - 2y - 4 = 0$.

Example 4: Find the slope and $y$-intercept of the line $3x + 4y - 12 = 0$.
  1. Rearrange into slope-intercept form: $4y = -3x + 12$.
  2. Divide by $4$: $y = -\dfrac{3}{4}x + 3$.
  3. Compare with $y = mx + c$.

Answer: Slope $m = -\dfrac{3}{4}$ and $y$-intercept $c = 3$.

Example 5: Write the line $x + y - 4 = 0$ in normal form and state the perpendicular distance from the origin.
  1. Move the constant: $x + y = 4$. Here $A = 1$, $B = 1$, so $\sqrt{A^2 + B^2} = \sqrt{2}$.
  2. Divide both sides by $\sqrt{2}$: $\dfrac{x}{\sqrt{2}} + \dfrac{y}{\sqrt{2}} = \dfrac{4}{\sqrt{2}} = 2\sqrt{2}$.
  3. Compare with $x\cos\omega + y\sin\omega = p$: $\cos\omega = \sin\omega = \dfrac{1}{\sqrt{2}}$, so $\omega = 45^\circ$ and $p = 2\sqrt{2}$.

Answer: Normal form $x\cos 45^\circ + y\sin 45^\circ = 2\sqrt{2}$; distance $p = 2\sqrt{2}$.

Example 6: Find the equation of the line through $(0, 5)$ parallel to the line $2x - 3y + 7 = 0$.
  1. Slope of the given line: $-\dfrac{A}{B} = -\dfrac{2}{-3} = \dfrac{2}{3}$.
  2. A parallel line has the same slope $m = \dfrac{2}{3}$ and passes through $(0, 5)$.
  3. Slope-intercept form: $y = \dfrac{2}{3}x + 5$.

Answer: $y = \dfrac{2}{3}x + 5$, i.e. $2x - 3y + 15 = 0$.

Quick recap
  • Point-slope: $y - y_1 = m(x - x_1)$ — the parent form from which the others follow.
  • Slope-intercept $y = mx + c$ and intercept $\dfrac{x}{a} + \dfrac{y}{b} = 1$ are read directly from a graph.
  • Normal form $x\cos\omega + y\sin\omega = p$ encodes the perpendicular distance $p$ from the origin.
  • General form $Ax + By + C = 0$ describes every line; slope $= -\dfrac{A}{B}$ when $B \ne 0$.
  • Any form can be rearranged into any other — they are the same line in different dress.
✓ Quick check
The line joining (0,0) and (4,4) has equation:
Slope =1 and passes through origin.
A line cuts x-axis at 6 and y-axis at 3. Its equation is:
x/6 + y/3 =1 ⇒ x+2y=6.

General Equation and Families

The distance from a point to a line always means the perpendicular distance — the length of the shortest segment from the point to the line. Any other segment from the point meets the line at an angle and is therefore longer.

For a line written in general form $Ax + By + C = 0$ and a point $(x_1, y_1)$, this shortest distance is:

$$d=\dfrac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$$

The recipe is mechanical and reliable: substitute the point's coordinates into the left-hand side of the line's equation, take the absolute value of the result (distance is never negative), and divide by $\sqrt{A^2 + B^2}$, the magnitude of the coefficient pair. The line must be in the form $Ax + By + C = 0$ before you read off $A$, $B$, $C$ — a common slip is to forget to move all terms to one side first.

A neat special case: the distance from the origin $(0, 0)$ collapses to:

$$d=\dfrac{|C|}{\sqrt{A^2+B^2}}$$

Distance between two parallel lines. Parallel lines never meet, so the gap between them is constant. If they are written with identical coefficients of $x$ and $y$:

$$Ax+By+C_1=0\quad\text{and}\quad Ax+By+C_2=0$$

then the perpendicular distance between them is:

$$d=\dfrac{|C_1-C_2|}{\sqrt{A^2+B^2}}$$

The crucial precondition is highlighted in the table below — the $x$- and $y$-coefficients must be made identical before subtracting the constants.

SituationFormulaWatch out for
Point $(x_1, y_1)$ to line$d = \dfrac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}$line must be $Ax + By + C = 0$
Origin to line$d = \dfrac{|C|}{\sqrt{A^2 + B^2}}$just set $x_1 = y_1 = 0$
Two parallel lines$d = \dfrac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}$make $A, B$ identical first

Deeper Insight — why the sign tells you which side: The absolute value in the distance formula hides a useful secret. Before you take the modulus, the signed quantity $\dfrac{Ax_1 + By_1 + C}{\sqrt{A^2 + B^2}}$ tells you not only how far the point is from the line but on which side of it the point lies — points on opposite sides give opposite signs, while points on the line give exactly zero. This is the foundation of how a line splits the plane into two half-planes, an idea you will rely on heavily in Linear Programming when shading feasible regions. The denominator $\sqrt{A^2 + B^2}$ is no accident either: it is the length of the normal vector $(A, B)$ to the line, and dividing by it converts the raw value $Ax_1 + By_1 + C$ into a true geometric distance measured along that perpendicular direction. The parallel-line formula is then just the same idea applied twice — both lines share the same normal direction, so their separation is simply the difference in their constant terms, scaled by that same length. Seen this way, all three formulas in this topic are really one formula wearing different hats.

Perpendicular distance from a point to a line Perpendicular Distance from a Point Ax + By + C = 0 (x₁, y₁) d Constant distance between two parallel lines Distance Between Parallel Lines Ax+By+C₁=0 Ax+By+C₂=0 d
Example 1: Find the distance of the point $(3, -5)$ from the line $4x - 3y - 26 = 0$.
  1. Here $A = 4$, $B = -3$, $C = -26$, and $(x_1, y_1) = (3, -5)$.
  2. Numerator: $|4(3) - 3(-5) - 26| = |12 + 15 - 26| = |1| = 1$.
  3. Denominator: $\sqrt{4^2 + (-3)^2} = \sqrt{16 + 9} = \sqrt{25} = 5$.
  4. $d = \dfrac{1}{5}$.

Answer: $d = \dfrac{1}{5}$ units.

Example 2: Find the perpendicular distance from the origin to the line $3x + 4y - 10 = 0$.
  1. For the origin, use $d = \dfrac{|C|}{\sqrt{A^2 + B^2}}$ with $C = -10$.
  2. Denominator: $\sqrt{3^2 + 4^2} = \sqrt{25} = 5$.
  3. $d = \dfrac{|-10|}{5} = \dfrac{10}{5} = 2$.

Answer: $d = 2$ units.

Example 3: Find the distance between the parallel lines $3x + 4y + 5 = 0$ and $3x + 4y - 15 = 0$.
  1. The coefficients of $x$ and $y$ already match, so $A = 3$, $B = 4$, $C_1 = 5$, $C_2 = -15$.
  2. Use $d = \dfrac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} = \dfrac{|5 - (-15)|}{\sqrt{9 + 16}}$.
  3. $d = \dfrac{20}{5} = 4$.

Answer: $d = 4$ units.

Example 4: Find the distance between the lines $2x + 3y = 4$ and $4x + 6y = 7$.
  1. Make the coefficients identical. Multiply the first by $2$: $4x + 6y = 8$, i.e. $4x + 6y - 8 = 0$.
  2. The second is $4x + 6y - 7 = 0$. Now $A = 4$, $B = 6$, $C_1 = -8$, $C_2 = -7$.
  3. $d = \dfrac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} = \dfrac{|-8 - (-7)|}{\sqrt{16 + 36}} = \dfrac{1}{\sqrt{52}} = \dfrac{1}{2\sqrt{13}}$.

Answer: $d = \dfrac{1}{2\sqrt{13}}$ units.

Example 5: Find the value of $p$ if the distance of the point $(1, 2)$ from the line $3x + 4y - p = 0$ is $4$ units.
  1. Distance: $\dfrac{|3(1) + 4(2) - p|}{\sqrt{3^2 + 4^2}} = \dfrac{|11 - p|}{5} = 4$.
  2. So $|11 - p| = 20$, giving $11 - p = 20$ or $11 - p = -20$.
  3. Solve: $p = -9$ or $p = 31$.

Answer: $p = -9$ or $p = 31$.

Example 6: Find the length of the perpendicular from $(-2, 3)$ to the line $5x - 12y + 13 = 0$.
  1. Here $A = 5$, $B = -12$, $C = 13$, and $(x_1, y_1) = (-2, 3)$.
  2. Numerator: $|5(-2) - 12(3) + 13| = |-10 - 36 + 13| = |-33| = 33$.
  3. Denominator: $\sqrt{5^2 + (-12)^2} = \sqrt{25 + 144} = \sqrt{169} = 13$.
  4. $d = \dfrac{33}{13}$.

Answer: $d = \dfrac{33}{13}$ units.

Quick recap
  • Distance from a point to a line is always the perpendicular (shortest) distance.
  • $d = \dfrac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}$ — put the line in $Ax + By + C = 0$ form first.
  • From the origin this simplifies to $d = \dfrac{|C|}{\sqrt{A^2 + B^2}}$.
  • Parallel lines: $d = \dfrac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}$ — make the $x, y$ coefficients identical before subtracting.
  • The sign of $Ax_1 + By_1 + C$ (before the modulus) reveals which side of the line the point lies on.
✓ Quick check
Rohit's house is mapped at (2, 3) and his school at (8, 11) on a city grid where 1 unit = 1 km. A straight road connects them directly. What is its length?
Distance formula: d = √((8−2)² + (11−3)²) = √(36 + 64) = √100 = 10 km.
Distance of point (2,−3) from y-axis is:
Distance from y-axis equals |x|.
Ready to test this chapter?
Take the Chapter Test →