Equations of a Straight Line

A straight line is one of the most fundamental objects in mathematics, and expressing it algebraically is a core skill in coordinate geometry. When we place a line on the Cartesian plane, we can describe it with an equation that captures every point lying on that line — and no others. Different forms of the equation emphasize different pieces of information: the slope and y-intercept, a point and the slope, two points, or the x- and y-intercepts. The four main forms — slope-intercept, point-slope, two-point, and intercept form — are all equivalent ways of writing the same relationship. Choosing the right form depends on what information you are given. For example, if a problem gives you the gradient of a line and one point it passes through, the point-slope form is the most direct starting point. If you need to read off the gradient and y-intercept at a glance, slope-intercept form is clearest. Mastering these forms means you can translate geometric descriptions ('a line through (2, 3) with slope 4') into algebraic equations instantly, sketch lines accurately, find intersections of two lines by solving simultaneous equations, and solve real-world problems involving rates of change, cost functions, and motion — all of which are modelled by linear relationships.

Key takeaways
  • Slope-Intercept Form: y = mx + c
  • Point-Slope Form: y − y₁ = m(x − x₁)
  • Two-Point Form
  • Intercept Form: x/a + y/b = 1
  • General (Standard) Form: Ax + By + C = 0

Slope-Intercept Form: y = mx + c

When you know the gradient (slope) m and the y-intercept c (the value of y where the line crosses the y-axis), write y = mx + c. For instance, if m = 3 and c = −2, the equation is y = 3x − 2. Every point (x, y) satisfying this equation lies on the line. This form makes it easy to plot the line: start at (0, c) on the y-axis, then use the slope — rise over run — to find a second point.

Point-Slope Form: y − y₁ = m(x − x₁)

If you know the slope m and one specific point (x₁, y₁) on the line, use point-slope form: y − y₁ = m(x − x₁). This form is derived from the definition of slope: m = (y − y₁)/(x − x₁), rearranged to avoid division. For example, for a line with slope 5 passing through (1, −3): y − (−3) = 5(x − 1), which simplifies to y = 5x − 8. You can always convert to slope-intercept form by expanding and rearranging.

Two-Point Form

Given two distinct points (x₁, y₁) and (x₂, y₂), first calculate the slope: m = (y₂ − y₁)/(x₂ − x₁), provided x₁ ≠ x₂. Then substitute m and either point into the point-slope form. Equivalently, the two-point form is written compactly as (y − y₁)/(y₂ − y₁) = (x − x₁)/(x₂ − x₁). For example, through (2, 1) and (6, 9): m = (9 − 1)/(6 − 2) = 8/4 = 2, giving y − 1 = 2(x − 2), so y = 2x − 3.

Intercept Form: x/a + y/b = 1

When a line crosses the x-axis at (a, 0) and the y-axis at (0, b), the intercept form is x/a + y/b = 1, where a ≠ 0 and b ≠ 0. This form is particularly useful in problems about intercepts. To verify: substituting x = a gives a/a + 0/b = 1 ✓; substituting y = b gives 0/a + b/b = 1 ✓. For example, x-intercept 4 and y-intercept −2: x/4 + y/(−2) = 1, or equivalently x/4 − y/2 = 1, which rearranges to y = (x/2) − 2.

General (Standard) Form: Ax + By + C = 0

All the forms above can be rearranged into the general form Ax + By + C = 0, where A, B, C are integers and A ≥ 0 by convention. This form handles every line including vertical lines (B = 0, giving x = constant). From general form, the slope is −A/B (if B ≠ 0) and the y-intercept is −C/B. Recognising and converting between forms is an essential algebraic skill tested in examinations.

The Key Equation

y−y1=m(x−x1)y - y_1 = m(x - x_1)
  • m — Slope (gradient) (dimensionless): The ratio of the vertical change to the horizontal change between any two points on the line; m = (y₂ − y₁)/(x₂ − x₁).
  • x_1,\, y_1 — Known point coordinates (units): The coordinates of a specific point known to lie on the line.
  • x,\, y — General point coordinates (units): The coordinates of any arbitrary point on the line; they are the variables in the equation.

Worked Example

Problem. A line passes through the points A(−1, 4) and B(3, −4). Find the equation of the line in slope-intercept form and state its x-intercept.

y=−2x+2y = -2x + 2

Answer. Slope-intercept form: y = −2x + 2; x-intercept at (1, 0).

Figure
Diagram
xy01234-112(0, −1) y-int(1, 0) x-intrun = 1rise = 2y = 2x − 1slope m = 2, c = −1
Origins · 1 minRené Descartes and how this was discovered
RD
René Descartes
1596–1650 · French

Descartes invented the Cartesian coordinate system — the x-y plane — published in his 1637 appendix 'La Géométrie'. This breakthrough unified algebra and geometry, making it possible to represent geometric curves (including straight lines) as algebraic equations. The entire framework of analytic geometry, including all forms of the equation of a straight line, rests on Descartes's coordinate system. Descartes reportedly conceived the idea of coordinates while watching a fly crawl across a tiled ceiling and realising he could describe its position exactly using two numbers — its distance from two perpendicular walls.

  • Slope / Gradient of a Line — Slope m is the central parameter in all forms of the equation of a straight line; understanding it is a prerequisite for this topic.
  • Parallel and Perpendicular Lines — Equations of lines are used to determine whether two lines are parallel (equal slopes) or perpendicular (slopes multiply to −1).
  • Distance and Midpoint Formulas — These formulas work alongside line equations to solve problems involving segments and their properties on the coordinate plane.
  • Simultaneous Linear Equations — Finding the intersection of two straight lines requires solving their equations simultaneously, a direct application of this topic.