IB Maths AA SL Paper 1 & 2 14 min read

Equations of a Straight Line

Every straight line has a constant steepness called its gradient. Once you know the gradient and one point on the line, you can write its equation in three different forms โ€” and each form is useful in different situations.

๐Ÿ“˜

What you need to know

  • How to find the gradient between two points using the formula
  • The three forms of a straight line equation: y = mx + c, the point-gradient form, and the general form
  • How to find the equation of a line given a gradient and a point, or two points
  • How to read the x-intercept and y-intercept from each form
  • How to rearrange between forms โ€” especially clearing fractions for the form ax + by + d = 0

Finding the Gradient

The gradient tells you how steep the line is. To find it, pick any two points on the line โ€” call them (x1, y1) and (x2, y2).

m = y2 โˆ’ y1x2 โˆ’ x1

(given in the formula booklet)

Gradient = rise รท run
x y O xโ‚‚ โˆ’ xโ‚ yโ‚‚ โˆ’ yโ‚ (xโ‚, yโ‚) (xโ‚‚, yโ‚‚)
The line goes up by yโ‚‚ โˆ’ yโ‚ across a horizontal distance of xโ‚‚ โˆ’ xโ‚

What the gradient tells you

The number you get from the formula tells you how the line behaves:

Positive
m > 0 โ€” going up
Negative
m < 0 โ€” going down
Zero
m = 0 โ€” horizontal
Undefined
vertical line

Quick read: a gradient of 1 means up 1, right 1. A gradient of โˆ’2 means down 2, right 1. The bigger the absolute value, the steeper the line.

The Three Forms of a Straight Line

A straight line can be written in three equivalent forms. Each one is best for a different situation.

Gradient-Intercept
y = mx + c

Best when you can read the gradient m and the y-intercept (0, c) directly.

Point-Gradient
y โˆ’ y1 = m(x โˆ’ x1)

Best when you have a gradient and a known point (x1, y1).

General Form
ax + by + d = 0

Used when answers must be in integer form. Both intercepts are easy to find.

From the general form, the x-intercept is โˆ’da and the y-intercept is โˆ’db. Set the other variable to 0 and solve.

Finding the Equation of a Line

Whatever information you’re given, follow this strategy:

  1. If you have two points, find the gradient first using the formula.
  2. Plug the gradient and any one point into the point-gradient form: y โˆ’ y1 = m(x โˆ’ x1).
  3. Rearrange into the form the question asks for โ€” usually y = mx + c or ax + by + d = 0.
  4. For general form, multiply through to clear fractions and ensure a, b, d are integers.

GDC shortcut: on Paper 2, enter both points in statistics mode and run a linear regression. The calculator gives you y = ax + b directly.

Worked Examples

โœŽ

Example 1 โ€” Find the gradient between two points

Find the gradient of the line passing through the points (1, โˆ’3) and (5, 9).

Answer:

Step 1: label the points and apply the formula. (xโ‚, yโ‚) = (1, โˆ’3), (xโ‚‚, yโ‚‚) = (5, 9) m = (9 โˆ’ (โˆ’3)) / (5 โˆ’ 1) m = 12 / 4 m = 3 Positive gradient โ€” the line goes up from left to right.
โœŽ

Example 2 โ€” Find the equation given gradient and a point

A line has gradient 4 and passes through the point (2, โˆ’3). Find its equation in the form y = mx + c.

Answer:

Step 1: use the point-gradient form. y โˆ’ (โˆ’3) = 4(x โˆ’ 2) y + 3 = 4(x โˆ’ 2) Step 2: expand and simplify. y + 3 = 4x โˆ’ 8 y = 4x โˆ’ 8 โˆ’ 3 y = 4x โˆ’ 11
โœŽ

Example 3 โ€” Find the equation given two points

Find the equation of the line passing through (โˆ’1, 4) and (3, 12). Give your answer in the form y = mx + c.

Answer:

Step 1: find the gradient. m = (12 โˆ’ 4) / (3 โˆ’ (โˆ’1)) m = 8 / 4 = 2 Step 2: use point-gradient form with (โˆ’1, 4). y โˆ’ 4 = 2(x โˆ’ (โˆ’1)) y โˆ’ 4 = 2(x + 1) y โˆ’ 4 = 2x + 2 y = 2x + 6 Check: at x = 3, y = 2(3) + 6 = 12 โœ“
โœŽ

Example 4 โ€” Equation in general form (integer coefficients)

The line l passes through the points (โˆ’2, 5) and (6, โˆ’7). Find the equation of l in the form ax + by + d = 0, where a, b, and d are integers.

Answer:

Step 1: find the gradient. m = (โˆ’7 โˆ’ 5) / (6 โˆ’ (โˆ’2)) m = โˆ’12 / 8 = โˆ’3/2 Step 2: use point-gradient form with (โˆ’2, 5). y โˆ’ 5 = โˆ’3/2 (x โˆ’ (โˆ’2)) y โˆ’ 5 = โˆ’3/2 (x + 2) Step 3: multiply both sides by 2 to clear the fraction. 2(y โˆ’ 5) = โˆ’3(x + 2) 2y โˆ’ 10 = โˆ’3x โˆ’ 6 Step 4: rearrange so right side is 0. 3x + 2y โˆ’ 10 + 6 = 0 3x + 2y โˆ’ 4 = 0 a = 3, b = 2, d = โˆ’4 โ€” all integers โœ“
โœŽ

Example 5 โ€” Find the x-intercept and y-intercept

The line l has equation 3x + 4y โˆ’ 12 = 0. Find the coordinates of the x-intercept and the y-intercept.

Answer:

Step 1: x-intercept โ€” set y = 0. 3x + 4(0) โˆ’ 12 = 0 3x = 12 โ†’ x = 4 x-intercept: (4, 0) Step 2: y-intercept โ€” set x = 0. 3(0) + 4y โˆ’ 12 = 0 4y = 12 โ†’ y = 3 y-intercept: (0, 3)
๐Ÿ’ก

Tips

  • Always start with point-gradient form. It works for every situation โ€” just plug in and rearrange.
  • Pick the easier point. If you have two points, pick the one with smaller or simpler numbers to avoid sign errors.
  • Check your answer: plug a known point back into your final equation. Both sides should match.
  • For general form, if your gradient has a denominator, multiply both sides by it to clear the fraction.
  • On Paper 2, use your GDC’s linear regression mode for instant equations from two points.
โš 

Common mistakes

  • Mixing up the order in the gradient formula. The y-difference goes on TOP, the x-difference on the bottom. yโ‚‚ โˆ’ yโ‚xโ‚‚ โˆ’ xโ‚ โ€” never the other way around.
  • Sign errors with negative coordinates. Subtracting a negative becomes adding: y โˆ’ (โˆ’3) = y + 3, not y โˆ’ 3.
  • Wrong order of subtraction. Keep the same order on top and bottom โ€” if you do (y2 โˆ’ y1) on top, it must be (x2 โˆ’ x1) on the bottom โ€” same direction.
  • Forgetting to clear fractions when the question asks for integer form ax + by + d = 0. If your gradient is a fraction, you must multiply through.
  • Stopping too early. If the question wants y = mx + c, you must finish the rearrangement โ€” don’t leave it as y โˆ’ 5 = 2(x + 1).
  • Confusing the y-intercept with the gradient. In y = 3x + 7, the gradient is 3 and the y-intercept is (0, 7) โ€” not the other way round.

Final word: Master the gradient formula and the point-gradient form, and you can answer any straight-line question. Everything else is just rearranging.

Need help with Linear Functions?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session โ†’