Equation of a Straight Line (HKDSE)

The equation of a straight line with slope m through (x₁, y₁) is y − y₁ = m(x − x₁), or y = mx + c with y-intercept c. HKDSE answers usually use the general form Ax + By + C = 0, whose slope is −A/B. The slope through two points is m = (y₂ − y₁) / (x₂ − x₁).

Solve Equations of Straight Lines questions with AIPractise 100 DSE-style questions
The red line turns about A(2, −1) as its slope m changes. It is perpendicular to the blue line 3x − 4y + 5 = 0 exactly when the product of the two slopes is −1, that is m = −4/3. Try it yourself →

Equation of Straight Line Formulas

Slope formulam = (y₂ − y₁) / (x₂ − x₁)
Point-slope formy − y₁ = m(x − x₁)
Two-point form(y − y₁) / (x − x₁) = (y₂ − y₁) / (x₂ − x₁)
Slope-intercept formy = mx + c
Intercept formx/a + y/b = 1 (x-intercept a, y-intercept b)
General formAx + By + C = 0: slope −A/B, y-intercept −C/B, x-intercept −C/A
Parallel / perpendicularm₁ = m₂ / m₁ × m₂ = −1
Distance from a point to a line|Ax₀ + By₀ + C| / √(A² + B²)

Forms of the Equation of a Straight Line

  • Point-slope form (a point and the slope): y − y₁ = m(x − x₁).
  • Two-point form (two points): find m = (y₂ − y₁) / (x₂ − x₁), then use point-slope form.
  • Slope-intercept form (slope and y-intercept): y = mx + c.
  • Intercept form (both intercepts): x/a + y/b = 1.
  • General form (the usual DSE answer format): Ax + By + C = 0 with integer A, B, C.

Slope of Ax + By + C = 0 (General Form)

Rearrange Ax + By + C = 0 to y = −(A/B)x − C/B. So the slope is −A/B, the y-intercept is −C/B and the x-intercept is −C/A. For example, 2x − 3y + 12 = 0 has slope 2/3, y-intercept 4 and x-intercept −6 (Example 2 below). A vertical line x = h has no slope; a horizontal line y = k has slope 0.

The Core Concept

The DNA of a Line: A straight-line equation represents a geometric path on a coordinate plane. Every line is uniquely defined by two attributes: how steep it is (the slope, m) and where it crosses the axes (the intercepts). In the DSE, you must be comfortable switching between different equation forms depending on the clues given.

DSE Equations of Straight Lines Cheat Sheet — 5 Key Topics

Scan this compact reference table to review every essential concept, step, and shortcut in under 10 seconds.

TopicKey Concept & StepsExam Shortcuts & Tips
1. Slope (Gradient)m = (y₂ − y₁) / (x₂ − x₁) = tan θ
• m > 0: Uphill (0° < θ < 90°)
• m < 0: Downhill (90° < θ < 180°)
• m = 0: Horizontal line
Parallel: m₁ = m₂
Perpendicular: m₁ × m₂ = −1
2. Slope-Intercept Formy = mx + c
• m = slope
• c = y-intercept (where x = 0)
Use this form to instantly sketch a line.
The line passes through (0, c) with steepness m.
3. Point-Slope Formy − y₁ = m(x − x₁)
Passes through (x₁, y₁) with slope m.
Your Go-To Formula:
If given two points, find m first, then plug either point into this formula.
4. General FormAx + By + C = 0
(A, B, C ∈ ℤ and A > 0)
Fast Coefficients Read (Paper 2):
• Slope m = −A/B
• y-intercept = −C/B
• x-intercept = −C/A
5. Line IntersectionsSolve L₁: y = m₁x + c₁ and L₂: y = m₂x + c₂ simultaneously.
• 1 solution: Intersecting (m₁ ≠ m₂)
• 0 solutions: Parallel (m₁ = m₂, c₁ ≠ c₂)
• ∞ solutions: Coincident (m₁ = m₂, c₁ = c₂)
Use substitution or elimination.
Plug solved x back into either equation to find y.

Worked Examples — Equations of Straight Lines

Example 1: Line through a point, perpendicular to a given line

Find the equation of the straight line passing through A(2, −1) and perpendicular to 3x − 4y + 5 = 0. Give the answer in general form.

  1. Slope of the given line = −A/B = −3/(−4) = 3/4.
  2. Perpendicular slope = −1 ÷ (3/4) = −4/3.
  3. Point-slope form: y + 1 = −(4/3)(x − 2).
  4. Multiply by 3: 3y + 3 = −4x + 8, so 4x + 3y − 5 = 0. Check: 4(2) + 3(−1) − 5 = 0 ✓

Answer: 4x + 3y − 5 = 0

Example 2: Slope and intercepts from the general form

Find the slope, x-intercept and y-intercept of the line 2x − 3y + 12 = 0.

  1. Here A = 2, B = −3, C = 12.
  2. Slope = −A/B = −2/(−3) = 2/3.
  3. y-intercept = −C/B = −12/(−3) = 4; x-intercept = −C/A = −12/2 = −6.
  4. Check: (0, 4) and (−6, 0) both satisfy the equation ✓

Answer: Slope 2/3, x-intercept −6, y-intercept 4.

💡 Exam Traps & Secrets

⚠️ The Negative Inclination Angle TrapWhen finding the angle of inclination θ for a line with a negative slope, your calculator returns a negative angle (e.g., m = −1 ⟹ θ = tan⁻¹(−1) = −45°). Rule: The inclination must be measured from the positive x-axis (0° ≤ θ < 180°). You must add 180° to get the correct obtuse angle: θ = −45° + 180° = 135°.
⚠️ The Perpendicular Slope TrickIf given a line 3x + 4y − 12 = 0 (slope m₁ = −3/4), any line perpendicular to it must have the negative reciprocal slope: m₂ = −1/m₁ = +4/3. Use this to write perpendicular slopes instantly without working steps.
⚠️ The "Undefined Slope" Trap (Vertical Lines)Horizontal lines have slope m = 0 (equation: y = k). Vertical lines have an undefined slope (equation: x = h). Never write m = ∞ in your Paper 1 steps; simply state: "Since the line is vertical, its equation is x = h."
⚠️ Point VerificationTo check if a point P(x₁, y₁) lies on a line Ax + By + C = 0, substitute x₁ and y₁ into the LHS. If the resulting value is exactly 0, the point lies on the line. If it is not 0, the point does not lie on the line.

✏️ Self-Test: Quick Interactive Practice

How to study: Click any question below to instantly load it on the coordinate grid and check your steps.

(Two-point slope + Point-Slope conversion)Find the equation of the line passing through A(1, 2) and B(4, 8) in General Form.
(Setting y=0 and x=0 to find intercepts)Find the x-intercept and y-intercept of the line 2x + 5y − 10 = 0.
(Simultaneous equations)Find the point of intersection of the lines y = 2x + 1 and x + y = 4.
(Δ < 0)Find the range of k such that the line y = x + k does not cut the circle x² + y² − 4x = 0.

Equations of Straight Lines Exercises: DSE-Style Practice

DSE-style practice sets from the SketchMath question bank, with solutions for every MC and long question.

Equations of Straight Lines · Form 4
20 MC questions
Distance, Mid-point and Slope (DSE) · Form 4
18 MC questions
Coordinate Geometry of Straight Lines · Form 3
37 MC questions · 25 long questions

Frequently Asked Questions

Related Topics

LocusEquations of CirclesHKDSE Math: all topicsHKDSE Maths Formula SheetDSE Maths Practice by Form
Try a Equations of Straight Lines DSE Practice Question