Straight lines AI SL
A straight line has a constant gradient, so it describes anything that changes at a steady rate, and the same few ideas let you find its equation, test whether two lines are parallel or perpendicular, find where they meet and measure a segment between two points. Start with the equation of a line and what its gradient and intercept mean in a context, then move on to parallel and perpendicular lines and intersections, and finish with distance, midpoint and gradient between two points.
Formulas at a glance
The formula booklet gives the three forms of the equation of a straight line, the gradient formula, and the formulas for the distance between two points and for the midpoint of a segment. It does not give the conditions for parallel and perpendicular lines, so learn that parallel lines have equal gradients and that the gradients of perpendicular lines multiply to give .
Gradient-intercept form of a line
In the bookletGradient from two points
In the bookletCondition for parallel lines
Not in the bookletCondition for perpendicular lines
Not in the bookletWhich method to use
Decide what you are given about the line, then choose the form of the equation that uses exactly that information. Most questions need only a gradient and a point.
| The question has | Use | Notes |
|---|---|---|
| Two points on a line, or two values of a linear model | Find the gradient , then substitute one point into | Check the equation with the other point |
| A rate and a starting value in a context | Rate of change is the gradient and the starting value is the intercept | Say what each means, with units |
| A gradient and one point | The point-gradient form , then rearrange if is asked for | Substitute the coordinates the right way round |
| An equation such as and a gradient or intercept is needed | Rearrange to , or set or for the intercepts | The gradient is , not |
| A line parallel or perpendicular to a given line | Parallel: the same gradient. Perpendicular: the gradient | Then use the point given, not the point on the original line |
| The point where two lines meet | Graph both and use the intersection tool, or solve the two equations together | Give both coordinates |
| The length of a segment, or the point halfway along it | The distance formula, and the midpoint as the average of the coordinates | Subtract in the same order for and ; squaring removes any sign |
| A perpendicular bisector of a segment | The midpoint, then the negative reciprocal of the gradient of the segment | Then use the point-gradient form through the midpoint |
Equation of a straight line
A straight line has the equation , where is the gradient and is the -intercept. To find an equation, calculate the gradient from two points or use a given gradient, then substitute a point to find . Gradients also decide whether two lines are parallel or perpendicular.
Forms and gradient rules
The three forms of the equation of a line and the gradient formula are in the formula booklet, but you still need to know which form suits the information you are given. The conditions for parallel and perpendicular lines are not in the booklet, so learn those.
Finding the equation from two points: calculate the gradient from the two points, then substitute either point into to solve for .
Key terms
What is the gradient of a line?
The gradient measures how steep a line is: the change in for each increase of one unit in . In a model it is the rate of change.
e.g. The line through and has gradient .
What is the intercept of a line?
The -intercept is the value of where the line crosses the -axis, that is when . In a model it is the starting value.
e.g. In , the intercept is the fixed charge before any distance is travelled.
What is the point-gradient form?
The point-gradient form is , where is the gradient and is a point on the line. It gives the equation without finding separately.
e.g. A gradient of through gives , which rearranges to .
What is the general form of a line?
The general form is , where , and are constants. Rearrange it into to read off the gradient and the intercept.
e.g. rearranges to , so the gradient is and the -intercept is .
Worked example, step by step
The question Calculator may be used to check [6 marks]
The daily profit, dollars, of a food truck is modelled by a linear function of the number of meals sold, . When 40 meals are sold the profit is $15, and when 100 meals are sold the profit is $135.
(a) Find in the form .
(b) Find the least number of meals that must be sold for a profit of at least $200.
Worked solution: worked example
Answer: (a) (b) meals
Step 1 - Find the gradient.
M1 - Substitute the two points into the gradient formula A1 -
Why? The gradient is the change in profit for each extra meal. Subtract the two values of and the two values of in the same order, so the signs cannot disagree.
Step 2 - Find the intercept.
Substitute the point into : So . M1 - Substitute a given point and the gradient into A1 -
Why? A line is fixed by its gradient and one point. Either given point works, and the other one makes a good check.
Step 3 - Check and interpret.
Enter in the function editor and open the table: gives and gives , so both values agree. The gradient means each extra meal adds $2 to the profit. The intercept means a loss of $65 on a day with no sales, which is the fixed cost.
Why? A model is only useful if you can say what its numbers mean. The table check catches a slip in before you use the model.
Step 4 - Set up the inequality.
The profit must be at least $200, so You can also solve with the equation solver and get . M1 - Set equal to 200, or at least 200, and attempt to solve
Why? Solving the equation finds where the profit is exactly $200. The word "at least" then decides which side of that value you need.
Step 5 - Round for the context.
The number of meals must be a whole number and is not enough, so round up to . Check: , which is less than , and . A1 - 133 meals, rounded up to a whole number
Why? A minimum must be rounded up, never down, because the smaller whole number falls short of the target. Testing the two neighbouring whole numbers shows which one works.
M1 Substitute the two points into the gradient formula
A1
M1 Substitute a given point and the gradient into
A1
M1 Set equal to 200, or at least 200, and attempt to solve
A1 133 meals, rounded up to a whole number
Now you try: enter your answers to be marked
These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.
How far did they travel?
Worked solution: practice question 1
Use it to estimate the value at
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 10 marks
Calculator steps: Solve an equation numerically (including multiple solutions)
Common mistakes
- Swapping the coordinates in the gradient formula. needs the -difference and -difference taken in the same order - mixing the order flips the sign of the gradient.
- Confusing the perpendicular condition with the parallel one. Parallel lines share a gradient (); perpendicular lines have gradients that multiply to (), which means taking the negative reciprocal, not just changing the sign.
- Forgetting to substitute back for the intercept. Finding the gradient is only half the job - you still need to plug in a known point to solve for before the model is complete.
Section 2 of 3 SL2.1 SL2.4 SL3.5
Parallel and perpendicular lines
Two lines are parallel when their gradients are equal, and perpendicular when their gradients multiply to give . Use these conditions to find the equation of a line through a given point, then find where two lines meet with your calculator. For a perpendicular bisector, use the midpoint of the segment and the negative reciprocal of its gradient.
The key formulas
The point-gradient form is in the formula booklet. The condition for perpendicular lines, , is not, so learn it. A perpendicular bisector passes through the midpoint of the two points and has the perpendicular gradient.
Key terms
What are parallel lines?
Parallel lines have equal gradients, so they never meet. To find a line parallel to a given line, keep the same gradient and use the new point.
e.g. The lines and both have gradient , so they are parallel. The line parallel to them through is , which gives .
What is the gradient of a perpendicular line?
Two lines are perpendicular when their gradients multiply to give . The perpendicular gradient is the negative reciprocal, .
e.g. A line with gradient has a perpendicular gradient of , because .
What is a perpendicular bisector?
A perpendicular bisector passes through the midpoint of a segment at right angles to it. Every point on it is the same distance from both ends of the segment.
e.g. For the segment from to , the midpoint is and the gradient is , so the bisector has gradient : , which gives .
Worked example, step by step
The question Calculator needed for the intersection [6 marks]
On a plan of a park, with coordinates in metres, a straight fence lies along the line . A gate is at . A path is to run from the gate to the fence, perpendicular to the fence.
(a) Find the equation of the path, in the form .
(b) Find the coordinates of the point where the path meets the fence.
Worked solution: worked example
Answer: (a) (b)
Step 1 - Find the gradient of the fence.
Rearrange to make the subject: The gradient of the fence is . M1 - Rearrange to find the gradient of the fence
Why? The gradient of a line is only visible when the equation is written as . In the number in front of is not the gradient.
Step 2 - Find the perpendicular gradient.
Perpendicular gradients multiply to give , so the path has gradient A1 - Perpendicular gradient
Why? Turn the gradient upside down and change its sign. Check: .
Step 3 - Write the equation through the gate.
Use with : M1 - Substitute the gate and the gradient into a line equation A1 -
Why? The path must pass through the gate, so the point to use is the gate, not any point on the fence. The point-gradient form needs no separate step to find .
Step 4 - Find the intersection.
Graph and on the calculator and use the intersection tool, or enter and in the simultaneous equation solver. The calculator gives and , so the path meets the fence at . M1 - Attempt to find the intersection with technology (implied by a correct answer) A1 -
Why? The point where two lines meet lies on both of them, so it solves both equations at once. Either calculator route gives the same point.
Step 5 - Check the point on both lines.
Fence: . Path: . Both agree. The distance from the gate is m, the shortest way from the gate to the fence.
Why? Putting the point into both equations is the only check that tells you the intersection is right. A perpendicular path is the shortest route to a straight fence.
M1 Rearrange to find the gradient of the fence
A1 Perpendicular gradient
M1 Substitute the gate and the gradient into a line equation
A1
M1 Attempt to find the intersection with technology (implied by a correct answer)
A1
Now you try: enter your answers to be marked
Worked solution: practice question 1
Worked solution: practice question 2
Find
Worked solution: practice question 3
Your score so far: 0 out of 11 marks
Calculator steps: Find where two graphs meet (intersection), Solve a system of equations
Common mistakes
- Taking the reciprocal without changing the sign. The perpendicular gradient is the negative reciprocal - if the original gradient is , the perpendicular gradient is , not .
- Substituting the point the wrong way round. In , and come from the given point - swapping which coordinate goes where produces an equation that doesn't actually pass through it.
- Solving the wrong equation for an intersection. Setting one line's expression equal to a constant, rather than equal to the other line's expression, finds a point on only one line, not the point they share.
Section 3 of 3 SL3.1
Distance, midpoint and gradient
For two points and , the distance is , the midpoint is the average of the coordinates, and the gradient is the change in divided by the change in . Use them to measure a segment, find its centre, or find the gradient needed for a perpendicular bisector.
Distance and midpoint
The distance and midpoint formulas are both in the formula booklet, as is the gradient formula.
Distance
Pythagoras' theorem applied to the horizontal and vertical gaps between the two points.
In the bookletMidpoint
Average the x-coordinates and average the y-coordinates separately.
In the bookletKey terms
What is a line segment?
A line segment is the part of a line between two end points. It has a length, a midpoint and a gradient.
e.g. The segment from to has length .
What is the gradient of a segment?
The gradient is the vertical change divided by the horizontal change from one end to the other. A positive gradient rises from left to right, and a negative gradient falls.
e.g. From to , the gradient is .
How do you find the point halfway along a segment?
Average the -coordinates and average the -coordinates of the two end points. The result is the midpoint.
e.g. The midpoint of and is .
How is the distance formula linked to a right-angled triangle?
The horizontal and vertical differences are the two shorter sides of a right-angled triangle, and the distance between the points is the hypotenuse.
e.g. Between and the differences are and , so the distance is .
Worked example, step by step
The question Calculator needed for the square root [6 marks]
On a map, with units of kilometres, a ferry route runs in a straight line from the harbour to an island .
(a) Find the length of the route.
(b) A buoy is placed halfway along the route. Find its coordinates.
(c) Find the gradient of the route.
Worked solution: worked example
Answer: (a) km (b) (c)
Step 1 - Find the differences.
Going from to :
Why? All three parts use these two differences. Take care with the minus sign when the coordinate you subtract is negative: , not .
Step 2 - Use the distance formula.
Enter on the home screen of the calculator: km. M1 - Substitute into the distance formula A1 - km
Why? The distance is the longest side of a right-angled triangle with sides 11 and 5, so Pythagoras' theorem applies. Squaring removes the minus sign.
Step 3 - Find the midpoint.
Average the coordinates: M1 - Average the -coordinates and the -coordinates A1 -
Why? The point halfway along a segment has the mean of the two -values and the mean of the two -values. It is a point, so give both coordinates.
Step 4 - Find the gradient.
The exact value is also correct. M1 - Substitute into the gradient formula A1 - or
Why? The gradient is the second difference divided by the first, in that order. It is negative because the route falls as it goes east, from the harbour to the island.
Step 5 - Check the answers.
From to the buoy the differences are and , which are exactly half of and . The distance from to the buoy is km, which is half of km, and the gradient from to the buoy is , the same as the route.
Why? The midpoint must be half way in both directions, so its differences from the ends are half the full differences. Getting the same gradient and half the length confirms the buoy is on the route.
M1 Substitute into the distance formula
A1 km
M1 Average the -coordinates and the -coordinates
A1
M1 Substitute into the gradient formula
A1 or
Now you try: enter your answers to be marked
Worked solution: practice question 1
Worked solution: practice question 2
State its coordinates.
Worked solution: practice question 3
Your score so far: 0 out of 10 marks
Calculator steps: Enter a calculation on the home screen
Common mistakes
- Averaging the midpoint coordinates incorrectly. The midpoint formula adds the two x-values (and the two y-values) and halves the result - subtracting them, or halving only one coordinate, gives a point nowhere near the segment.
- Forgetting to take the negative reciprocal for a perpendicular gradient. A perpendicular line does not share the segment's gradient - flip it and change its sign, or the line you find won't actually be perpendicular.
- Dropping a negative sign when subtracting coordinates. with a negative becomes an addition, e.g. - treating it as understates every distance and gradient calculation that follows.
Using your GDC
The exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, with what the screen shows. Pick your calculator.
Solve an equation numerically (including multiple solutions)
Used in: Equation of a straight line
How to solve an equation numerically on a TI-84 Plus CE
Numeric Solver (one solution per starting value) | |
Press math, then ▲ to jump to the bottom of the menu, and choose C:Numeric Solver. |
|
Enter the equation as E1 = E2. Type X,T,θ,n ^ 3 − 3 X,T,θ,n for E1 and 1 for E2, then choose OK. The equation does not need rearranging to equal zero. |
E1=X^3-3X E2=1 |
Put the cursor on X and type a number close to the solution you want, for example 2. Leave the bounds as they are ({-1E99,1E99}) unless you want to search only a smaller interval. |
X=2 bound={-1E99,1E99} |
Press alpha enter (SOLVE). The solution is marked with a small square, and E1-E2 shows how far the two sides are apart: it should be 0 or a very small number. to 3 decimal places, which is to 3 significant figures. |
X=1.879385 E1-E2=0 |
The solver finds the solution nearest your starting value. For the others, start again with another value: (−) 1 finds and 0 finds . |
X=-1.532089 X=-0.347296 |
Another way: from the graph | |
Graph the left side as Y1 and the right side as Y2, then use 2nd trace 5:intersect at each crossing. The graph also shows how many solutions there are, which tells you how many starting values to try. The steps are in find where two graphs meet. | |
A starting value near the solution you want is what matters. If the solver gives a different solution from the one you expected, look at the graph and start closer.
The full guide: Solve an equation numerically (including multiple solutions)
Find where two graphs meet (intersection)
Used in: Parallel and perpendicular lines
How to find where two graphs meet on a TI-84 Plus CE
Graph both and use intersect | |
Press Y=, clear any old functions with clear, then type X,T,θ,n x² − 3 next to Y1=. Press ▼ and type 2 X,T,θ,n + 1 next to Y2=. |
Plot1 Plot2 Plot3 \Y1=X²-3 \Y2=2X+1 \Y3= |
Press window and set Xmin = −3, Xmax = 5, Ymin = −4, Ymax = 10. For a negative number use the (−) key, not the subtraction key. Press graph. Both curves should show, with two crossing points on the screen. |
WINDOW Xmin=-3 Xmax=5 Xscl=1 Ymin=-4 Ymax=10 Yscl=1 |
Press 2nd trace (CALC) and choose 5:intersect. First curve? appears with the cursor on one graph: press enter. Second curve? appears: press enter again. If more than two graphs are drawn, use ▲ or ▼ to put the cursor on the right graph before pressing enter. |
|
Guess? appears. Use ◀ or ▶ to move the cursor close to the right-hand crossing, then press enter. The screen shows Intersection with and . |
|
For the other crossing, repeat 2nd trace 5:intersect, enter, enter, and this time move the guess close to the left-hand crossing before pressing enter. and . |
|
The guess decides which crossing the calculator finds, so give a guess near the point you want. A crossing outside the window cannot be found, so check WINDOW first.
The full guide: Find where two graphs meet (intersection)
Enter a calculation on the home screen
Used in: Distance, midpoint and gradient
How to enter a calculation on a TI-84 Plus CE
Type a calculation and press enter | |
Go to the home screen: press 2nd mode (QUIT) from any menu or app. Press clear if the entry line is not empty. |
|
Type the calculation as you would write it, then press enter. For press 3 ( 2 . 4 ) x² − 5 × 1 . 8 enter. The calculator understands a number next to a bracket as a multiplication, so × is not needed in . If a fraction, square root or power template is on the screen, press ▶ to move out of it before you carry on typing. |
3(2.4)²-5*1.8 8.28 |
Use the last answer in the next calculation | |
To increase the answer by 15%, press × 1 . 1 5 enter on a blank line. The calculator puts Ans, the last answer, in front of the operator for you. You can also type Ans yourself, anywhere in a calculation: press 2nd (−) (ANS), for example 2nd (−) (ANS) × 1 . 1 5 enter. , which is to 3 significant figures. |
Ans*1.15 9.522 |
To use an earlier entry or answer, press ▲ to move up through the history, then enter to paste the highlighted one on the entry line. Press 2nd enter (ENTRY) to bring back your last entry and change it. |
|
Ans always holds the last answer that was worked out, so if you do a different calculation in between, Ans changes. Type a number you need later, or keep it on the screen, rather than relying on Ans for many steps.
The full guide: Enter a calculation on the home screen
Solve a system of equations
Used in: Parallel and perpendicular lines
How to solve a system of equations on a TI-84 Plus CE
Simultaneous Equation Solver app (PlySmlt2) | |
Press apps and choose PlySmlt2. An information screen appears: press any key to reach the MAIN MENU, then choose Simultaneous Eqn Solver. |
|
On the mode screen choose 3 equations and 3 unknowns. Choose Dec instead of Auto if you want decimal answers rather than fractions. Choose NEXT, using the key directly below it on the screen. |
Equations: 3 Unknowns: 3 |
Enter the coefficients row by row, one row for each equation, with the constant (the number on the right of the equals sign) last. Press enter after each number to move to the next position. For a negative number use (−), not the subtraction key. Write each equation as first: a missing term has coefficient 0. |
1 2 3 10 2 -1 1 3 3 1 -2 1 |
Choose SOLVE, using the key directly below it on the screen. The solution for each unknown is shown. , and , which is , and in decimal form. |
x1=6/5 x2=7/5 x3=2 |
If the system has no solution or infinitely many solutions, the app does not show a single answer. The rref choice then shows the reduced row-echelon form, where a row of zeros followed by a non-zero number means no solution. To leave the app, go to the main menu and choose Quit App. | |
Check each solution by substituting it back into one of the original equations, in case a coefficient was typed in the wrong place.
The full guide: Solve a system of equations
See the full list of GDC guides for every calculator task.
Syllabus content covered
| Code | Syllabus content |
|---|---|
| SL2.1 | Different forms of the equation of a straight line: (gradient-intercept form), (general form), (point-gradient form). Gradient and intercepts. Lines with gradients and . Parallel lines . Perpendicular lines . |
| SL2.4 | Finding the point of intersection of two curves or lines using technology. |
| SL2.5 | Modelling with linear functions , including piecewise linear models, for example horizontal distances of an object to a wall, depth of a swimming pool, mobile phone charges. |
| SL3.1 | The distance between two points in three-dimensional space, and their midpoint (this page uses two dimensions, the special case ). |
| SL3.5 | Equations of perpendicular bisectors, given either two points, or the equation of a line segment and its midpoint. |
Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).
Quick questions
How do I find the equation of a line from two points?
Calculate the gradient from the two points, then substitute either point into and solve for .
How do you find the equation of a line through a point with a given gradient?
Use , substituting the known gradient and the coordinates of the point, then rearrange into if that form is asked for.
What is the formula for the distance between two points?
, which is Pythagoras' theorem applied to the horizontal and vertical differences between the two points.
How do I tell if two lines are parallel or perpendicular?
Compare their gradients. Parallel lines have equal gradients, . Perpendicular lines have gradients that multiply to , .
How do you find where two lines cross?
Set the two expressions for equal to each other and solve for , then substitute that -value back into either line's equation to find . Or graph both lines and use the intersection tool on your calculator.
What is the formula for the midpoint of two points?
. Average the x-coordinates and average the y-coordinates separately.
How do I find the gradient from a graph?
Choose two points on the line that are easy to read, then divide the change in by the change in . A line that falls from left to right has a negative gradient.
Does the order of the two points matter?
Not for the distance or the midpoint, because squaring removes any sign and the sum of the coordinates is the same either way. For the gradient, subtract in the same order in the numerator and the denominator.
How do I interpret the gradient and intercept in a context?
The gradient is the change in the output for each unit increase in the input, and the intercept is the output when the input is zero. In , each extra kilometre costs $1.50 and the fixed charge is $3.
Ready to practise properly?
Practice questions on every section, marked instantly like the real exam.