In simple terms
A friendly intro before the formal notes — no formulas yet.
Straight Lines: The Blueprint of Functions
A linear function describes a relationship that changes at a constant rate, and on a graph it is a perfectly straight line. Two numbers fix that line completely: how steep it is (the gradient) and where it sits (one point it passes through, often the y-intercept).
Imagine filling a swimming pool with a hose. The water was already m deep before you started, and the hose raises the level by m every hour. Plot depth against time and you get a straight line. The starting m is the y-intercept — where the line begins — and the steady m per hour is the gradient — the constant rate of change. Every straight-line problem is really just asking for these same two pieces of information in some disguise.
- 1
Find the gradient. From two points and use ; or read it straight off an equation once it is in the form .
- 2
Choose a starting form. Point-slope is usually quickest — it needs only the gradient and one point, and it is in the formula booklet.
- 3
Rearrange to what the question asks for — slope-intercept or general form with integer coefficients.
- 4
Check. Substitute a known point back in; check the gradient against any parallel or perpendicular line mentioned.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Key formulas
Tap any symbol to reveal exactly what it means and its units.
Full topic notes
Formal explanation with the rigour you need for the exam.
The gradient of a line
The gradient, denoted , measures both the steepness and the direction of a line. It is the ratio of the vertical change ('rise') to the horizontal change ('run') between any two distinct points on the line — and because the line is straight, that ratio is the same wherever you measure it. A positive gradient rises from left to right; a negative gradient falls from left to right. The key habit is to subtract the coordinates in the same order top and bottom.
Gradient
Positive gradient (): the line slopes upwards from left to right.
Negative gradient (): the line slopes downwards from left to right.
Zero gradient (): a horizontal line, equation .
Undefined gradient: a vertical line, equation — the run is zero, so the fraction is undefined.
The three forms of the equation of a line
The same straight line can be written in several forms, each convenient for a different job. The IB often specifies the form your final answer must take, so you must be able to convert freely between them. All three describe identical lines — moving between them is pure rearrangement.
Slope-intercept form — instantly shows the gradient and -intercept . Best for sketching and for reading a gradient off a given equation.
Point-slope form — the most direct start when you know the gradient and any one point . It is in the formula booklet.
General form — here , , are integers. Often demanded for final answers; clear any fractions by multiplying the whole equation through.
In Paper 1, when you have a gradient and a point, default to the point-slope form . It is in the formula booklet, it needs no rearranging to set up, and you can convert it to or afterwards. Reaching for it first saves time and avoids sign errors.
Parallel and perpendicular lines
You can tell how two lines are related just by comparing their gradients. Parallel lines have the same steepness, so they never meet. Perpendicular lines cross at a right angle, and turning a line through both flips its rise-over-run and reverses its direction — which is why the two gradients multiply to .
For two non-vertical lines with gradients and :
Parallel:
Perpendicular:
Finding the point of intersection
Two lines cross at the single pair that satisfies both equations at once, so finding the intersection means solving the two equations simultaneously. Substitution is quickest when one equation is already in the form ; elimination is neat when the equations are both in general form. If the lines are parallel their gradients are equal and there is no solution — no intersection.
Substitution: rearrange one equation to (or ) and substitute into the other, leaving one equation in one unknown.
Elimination: scale the equations so a variable has matching coefficients, then add or subtract to remove it.
The solution is the coordinate of the intersection and must satisfy BOTH original equations — a quick way to check your answer.
Equal gradients but different intercepts ⇒ parallel ⇒ no point of intersection.
Distance and midpoint of a segment
Two more formula-booklet tools finish the toolkit. The midpoint of a segment is simply the average of its endpoints' coordinates, and the distance between two points is the Pythagorean length of the segment joining them. The midpoint is exactly what you need for a perpendicular bisector — the line at right angles to a segment through its middle.
For points and :
Midpoint
Distance
Common mistakes examiners penalise
Confusing the parallel and perpendicular conditions — parallel means EQUAL gradients (); perpendicular means the product is . Do not use a perpendicular gradient where the question says parallel, or vice versa.
Taking a reciprocal without the negative sign (or a negative without reciprocating) — the perpendicular gradient is the NEGATIVE reciprocal. For it is , never or . Confirm by checking .
Misreading the gradient from general form — in the gradient is , not . Rearrange to before reading it off.
Inconsistent coordinate order in the gradient formula — subtract the 's and the 's in the SAME order. Mixing them, e.g. , flips the sign of the gradient.
Leaving fractions in a general-form answer — needs integer coefficients. Multiply the whole equation through to clear denominators.
Not simplifying the gradient — reduce to before finding a perpendicular gradient, or the negative reciprocal step gets needlessly messy.
Forgetting a vertical line has no form — a vertical line is with undefined gradient; the perpendicular to it is horizontal, .
Model answer — marked the way our engine marks it
In Paper 1 the marks are analytic: each is tied to a specific line of working. A method mark (M) is awarded for a correct approach even if the arithmetic later slips; an accuracy mark (A) is awarded for a correct result and is dependent on the relevant method mark being earned. Follow-through (FT) means that once you have a value, a later part done correctly on THAT value still scores, even if the value itself was wrong. And the engine applies 'accept equivalent forms' — any algebraically correct rearrangement earns the mark. All of this protection exists only if your method is written down. Study how each mark below is pinned to one line of working.
Where this leads
The straight line is the seed of the whole course. Its gradient — a constant rate of change — becomes the derivative, the instantaneous gradient of any curve, so the tangent to a curve is a straight line found by exactly the methods here. The point-slope form reappears every time you write a tangent or normal in calculus (a normal is just a perpendicular line, negative reciprocal and all). Simultaneous solving extends to where curves meet, and the midpoint and distance formulas underpin coordinate geometry throughout. Master the habit — find the gradient, pick a form, substitute a point, show every line — and the geometry and calculus that follow become variations on a method you already own.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A straight line passes through the points and .
(a) Find the gradient of . [2]
(b) Hence find the equation of in the form . [2]
- 1
(a) Gradient. Take and and substitute into the gradient formula. [M1: correct substitution into the gradient formula] . [A1: simplified gradient]
Line has equation . Line is perpendicular to and passes through the point . Find the equation of , giving your answer in the form where . [5]
- 1
Gradient of . Rearrange into : , so . [M1: rearrange to read off the gradient] [A1: ]
Find the coordinates of the point of intersection of the lines and . [4]
- 1
Substitute. The first line gives ; put this into : . [M1: substitute one equation into the other] . [A1: value of ] Back-substitute. . [M1: substitute back to find ] The point of intersection is . [A1: coordinates] Check: ✓ — it satisfies both equations.
The line passes through and . Find the equation of the perpendicular bisector of . [6]
- 1
Model answer — full working.
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
Gradient from two points
. Keep the coordinate order consistent between numerator and denominator.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Positive gradient (): the line slopes upwards from left to right.
- ✓
Negative gradient (): the line slopes downwards from left to right.
- ✓
Zero gradient (): a horizontal line, equation .
- ✓
Undefined gradient: a vertical line, equation — the run is zero, so the fraction is undefined.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Get a Paper 1 straight-line question marked: find an equation or intersection with full working.
Get a Paper 1 straight-line question marked: find an equation or intersection with full working.
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Get a Paper 1 straight-line question marked: find an equation or intersection with full working. on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.