Straight Lines: Find and Check the Required Equation

A straight-line question often gives conditions rather than an equation. Your task is to build the line that meets all of them. A correct gradient alone is insufficient: many lines have that gradient. A correct point alone is also insufficient: infinitely many lines pass through it.

Start by deciding what fixes the direction and what fixes the location. Two distinct points usually determine both. A parallel or perpendicular condition determines a direction, while a supplied point locates the required line. The exceptions are horizontal and vertical lines, whose equations are especially simple.

Keep the point order consistent

For points (x₁, y₁) and (x₂, y₂), the gradient is m = (y₂ − y₁)/(x₂ − x₁), provided x₂ ≠ x₁. It is vertical change divided by horizontal change. Choose one point order and use it in both differences. Reversing both differences leaves the quotient unchanged; reversing only one changes its sign.

With a known point (a, b) and finite gradient m, write y − b = m(x − a). This point-gradient form contains the point automatically: substituting x = a and y = b gives zero on both sides. Expanding and collecting gives y = mx + c, where c is the y-coordinate at x = 0.

Worked case 1: two points determine the line

Find the line through A(−2, 5) and B(4, −7). Using B minus A, m = [−7 − 5]/[4 − (−2)] = −12/6 = −2. The negative result matches the direction: as x increases from −2 to 4, y decreases.

Using A in point-gradient form gives y − 5 = −2(x + 2). Therefore y − 5 = −2x − 4 and y = −2x + 1. The bracket is x + 2 because x − (−2) equals x + 2. The intercept is 1, not the given y-coordinate 5.

Check both original points: at x = −2, the equation gives y = 4 + 1 = 5; at x = 4, it gives y = −8 + 1 = −7. Repeating the gradient in reverse order gives [5 − (−7)]/(−2 − 4) = 12/(−6) = −2, confirming the sign.

Worked case 2: change direction or preserve it

Let L be y = −2x + 1. Find a line M parallel to L through P(2, 9), and a line N perpendicular to L through Q(6, 2). These are separate conditions through separate points.

Parallel M has gradient −2. Write y − 9 = −2(x − 2), giving M: y = −2x + 13. At x = 2 this gives 9. Comparing intercepts, 13 differs from L’s intercept 1, so these are distinct parallel lines rather than two equations for the same line.

Perpendicular N has gradient 1/2 because (−2)(1/2) = −1. Write y − 2 = (1/2)(x − 6), giving N: y = x/2 − 1. Substituting Q gives 2 = 3 − 1. The point check establishes location; the gradient product establishes the required right-angle relationship.

Three equations on equal-scale Cartesian axesSolid line L is y equals negative two x plus one and contains A negative two five and B four negative seven. Dashed M is y equals negative two x plus thirteen and contains P two nine. Dotted N is y equals x over two minus one and contains Q six two. Horizontal and vertical scales match.-4-20246810-8-6-4-22468101214xyA(−2, 5)B(4, −7)P(2, 9)Q(6, 2)L: y = −2x + 1M: y = −2x + 13N: y = x/2 − 1Each grid interval = 1 unit.Both axes: 20 drawing unitsper coordinate unit.L and M are distinct parallels.N is perpendicular to both.
Three equations on equal-scale Cartesian axes. Original diagram; complete numerical information appears in the accompanying text.

Complete diagram data: L contains A(−2, 5) and B(4, −7); M contains P(2, 9); N contains Q(6, 2). The displayed ranges are −4 ≤ x ≤ 10 and −8 ≤ y ≤ 14. Each grid interval represents one coordinate unit on both axes. Solid, dashed and dotted strokes identify the lines without relying on colour.

Equal drawing scales make right angles appear correctly. Unequal axis scales can visually distort perpendicularity even when the equations are correct. Use the equations to verify the relationship rather than trusting the apparent angle of a compressed graph.

Worked case 3: zero gradient and undefined gradient

Find the line through R(3, −4) and S(3, 7), then the perpendicular through T(−2, 5). Both given points have x-coordinate 3, so the first line is x = 3. The attempted gradient would be 11/0, which is undefined. It is not a gradient of zero.

A line perpendicular to this vertical line is horizontal. Through T, its equation is y = 5. This line has gradient zero because its y-coordinate does not change as x changes. It meets x = 3 at (3, 5), creating a right angle.

Conversely, every line parallel to x = 3 is vertical and has equation x = k. It is a distinct parallel only if k ≠ 3. Every line parallel to y = 5 is horizontal, with a distinct one requiring a different fixed y-value. Do not use the negative-reciprocal calculation when the original line is horizontal or vertical.

Check the whole answer, not just its shape

First substitute each supplied point into your final equation. Next test its direction against the condition. For two finite, nonzero gradients, perpendicularity requires a product of −1. Parallel finite-gradient lines have equal gradients; compare intercepts to distinguish coincidence from distinct parallelism.

Equivalent equations can hide the same line. For instance, 2y = −4x + 2 and y = −2x + 1 coincide. Multiplying every term of an equation by the same nonzero constant changes its appearance but not its points. Rearrange before deciding whether two lines differ.

Three solved practice tasks

Practice 1: repair a mixed subtraction order

A line passes through (−3, 8) and (1, 0). A learner calculates (0 − 8)/(−3 − 1) = 2. Explain and repair the error. The numerator uses second minus first, but the denominator reverses that order. Correctly, m = (0 − 8)/[1 − (−3)] = −2. Through (1, 0), y = −2(x − 1), so y = −2x + 2. At x = −3 it returns 8.

Practice 2: distinguish a parallel from a coincident line

Find the line through (2, 7) with the same gradient as y = 3x + 1. Point-gradient form gives y − 7 = 3(x − 2), hence y = 3x + 1. It coincides with the original. There is no distinct parallel through that point, because the point already lies on the original line.

Practice 3: rearrange before taking a reciprocal

Find the perpendicular to 3x + 2y = 8 through (−2, 4). Rearranging gives y = −3x/2 + 4, so the original gradient is −3/2. The required gradient is 2/3. Hence y − 4 = (2/3)(x + 2), or 3y = 2x + 16. The point gives 12 = −4 + 16, and the gradients multiply to −1.

Frequently asked questions

Must I use the first point in point-gradient form?

No. Either supplied point works if you use its two coordinates consistently. Checking the other point is a useful independent test.

Why can I reverse both gradient differences?

Both numerator and denominator change sign, leaving their quotient unchanged. Reversing only one changes the gradient incorrectly.

Does a negative gradient mean the line lies below the axis?

No. It means y decreases as x increases. A negatively sloped line can pass through points above and below the x-axis.

Is the y-intercept always a given point’s y-coordinate?

Only when that point has x-coordinate zero. Otherwise substitute the point to determine the intercept.

Do equal gradients always mean distinct parallel lines?

No. Equal finite gradients and equal intercepts describe the same line. Distinct parallels need different intercepts.

What is the gradient of x = 4?

It is undefined because horizontal change is zero. The equation describes a vertical line, not a zero-gradient line.

Must the answer be y = mx + c?

Only if requested and the line is not vertical. Point-gradient and equivalent general forms are valid; vertical lines have equations x = a.

Subject references

The original questions, diagrams and solutions above use standard mathematical definitions and methods. These source-authored references support the underlying facts.