Form 3 · 9
Form 3 Straight Lines: Gradient, y-Intercept and the Equation y = mx + c
Form 3 Curriculum: KSSMLearning standard: 9.1.1–9.1.7
Every straight line on a graph has an equation. In y = mx + c, m is the gradient and c is the y-intercept.
In this chapter you read m and c from an equation, change between the forms y = mx + c, ax + by = c and x/a + y/b = 1, find the equation of a line, spot parallel lines and find where two lines cross.
What do m and c tell me in y = mx + c?
Look at the line y = 2x + 1. When x = 0, y = 1, so the line cuts the y-axis at (0, 1).
That number 1 is c, the y-intercept. From (0, 1) to (2, 5) the line runs 2 units across and rises 4 units, so the gradient is 4 ÷ 2 = 2.
That is m, the number in front of x. A positive m slopes up to the right; a negative m slopes down.
Lines parallel to the axes are special. y = 3 is horizontal, parallel to the x-axis, with gradient 0.
x = −2 is vertical, parallel to the y-axis, and its gradient is undefined.
Worked example
State the gradient and the y-intercept of (a) y = −3x + 4 (b) y = 5.
- (a) Compare y = −3x + 4 with y = mx + c.
- (a) The number in front of x is −3, so m = −3. The constant is 4, so c = 4.
- (b) y = 5 can be written as y = 0x + 5.
- (b) So m = 0 and c = 5. The line is horizontal.
Answer: (a) gradient −3, y-intercept 4 (b) gradient 0, y-intercept 5
How do I change ax + by = c and x/a + y/b = 1 into y = mx + c?
In ax + by = c, both letters sit on the left. To read the gradient, make y the subject: move the x-term across, then divide every term by the number in front of y.
The form x/a + y/b = 1 shows where the line cuts both axes. Put y = 0 to get x = a, the x-intercept; put x = 0 to get y = b, the y-intercept.
Neither a nor b can be 0. The line joins (a, 0) to (0, b), so its gradient is −b/a.
You can also go the other way, from y = mx + c to ax + by = c.
Worked example
Write 3x + 2y = 12 in the form y = mx + c, and show that x/4 + y/6 = 1 is the same line.
- 3x + 2y = 12, so 2y = −3x + 12.
- Divide every term by 2: y = −(3/2)x + 6.
- x/4 + y/6 = 1 has x-intercept 4 and y-intercept 6, so its gradient is −6/4 = −3/2.
- Same gradient and same y-intercept, so it is the same line.
Answer: y = −(3/2)x + 6, the same line as x/4 + y/6 = 1
How do I find the equation of a line from two points?
A point lies on a line only if its coordinates make the equation true. On y = 3x − 4, the point (3, 5) fits because 3(3) − 4 = 5, but (2, 3) does not, because 3(2) − 4 = 2.
This is how you build an equation. Find the gradient from the two points, put it into y = mx + c, and substitute one point to find c.
Then substitute the other point as a check. If you are given the gradient and one point, skip straight to finding c.
- Find the gradient: m = (y2 − y1)/(x2 − x1).
- Write y = mx + c with your value of m.
- Substitute one point to find c.
- Write the equation, then check it with the second point.
Worked example
Find the equation of the straight line that passes through P(1, 3) and Q(4, 9).
- m = (9 − 3)/(4 − 1) = 6/3 = 2.
- So y = 2x + c.
- Substitute P(1, 3): 3 = 2(1) + c, so c = 1.
- The equation is y = 2x + 1.
- Check P: 2(1) + 1 = 3. Check Q: 2(4) + 1 = 9. Both fit.
Answer: y = 2x + 1
How do I spot parallel lines and find where two lines meet?
Parallel lines have the same gradient. y = 2x + 1 and y = 2x − 3 both have m = 2 but different y-intercepts, so they never meet.
For a line parallel to a given line, copy the gradient and use the new point to find c. Lines with different gradients cross at exactly one point, the point of intersection, whose coordinates fit both equations.
Find it by drawing both lines, or by substitution or elimination. Use a calculator only to check.
In the graph, y = 2x + 1 and y = −x + 4 cross at (1, 3).
Worked example
Find the point of intersection of y = 2x + 1 and x + y = 4.
- Substitute y = 2x + 1 into x + y = 4: x + 2x + 1 = 4.
- 3x + 1 = 4, so 3x = 3 and x = 1.
- y = 2(1) + 1 = 3.
- Check in x + y = 4: 1 + 3 = 4. Both equations fit.
Answer: (1, 3)
How do I use straight lines to solve a real problem?
A taxi fare is a fixed starting charge plus a fixed amount per kilometre, so its graph is a straight line. The starting charge is the y-intercept and the rate per km is the gradient.
If you know two fares, treat them as two points (distance, fare). The gradient between them gives the rate; substitute one point to find the starting charge.
Note that the fare is not proportional to distance: 10 km does not cost 2.5 times as much as 4 km, because the starting charge is paid only once.
Worked example
A 4 km taxi ride costs RM9.00 and a 10 km ride costs RM16.20. The fare is a straight-line graph of distance. Find the starting charge and the charge per km, then write the fare equation.
- Points (distance, fare): (4, 9.00) and (10, 16.20).
- Gradient = (16.20 − 9.00)/(10 − 4) = 7.20/6 = 1.20, so RM1.20 per km.
- F = 1.20d + c. Substitute (4, 9.00): 9.00 = 4.80 + c, so c = 4.20.
- Fare equation: F = 1.20d + 4.20. The starting charge is RM4.20.
- Check (10, 16.20): 1.20 × 10 + 4.20 = 16.20. Correct.
Answer: Starting charge RM4.20, RM1.20 per km, F = 1.20d + 4.20
Where will I use straight lines again?
In Form 4 Linear Inequalities in Two Variables, you draw lines such as 2x + y = 8 and shade a region, so you need to draw a line quickly from its equation. In Graphs of Motion, the gradient of a distance-time graph is the speed.
Finding a point of intersection is the same as solving a pair of simultaneous linear equations. Fitting a line through two readings, as with the taxi fare, is how you build a simple linear model from data.
Common mistakes
What gets written For 2y = 6x + 8, the gradient is 6 and the y-intercept is 8.
Why it happens m and c were read before y was on its own.
How to catch it Divide every term by 2 first: y = 3x + 4. Now m = 3 and c = 4.
What gets written For 3x + 2y = 12, the gradient is 3.
Why it happens The x-coefficient was taken as the gradient while x and y were on the same side.
How to catch it Rearrange: 2y = −3x + 12, so y = −(3/2)x + 6. The gradient is −3/2.
What gets written Through (1, 3) and (4, 9): m = (4 − 1)/(9 − 3) = 1/2.
Why it happens The change in x was put on top. Gradient is the change in y divided by the change in x.
How to catch it Use m = (y2 − y1)/(x2 − x1) = (9 − 3)/(4 − 1) = 2, then check: does y = 2x + 1 give 9 when x = 4? Yes.
What gets written The line through (2, 5) parallel to the x-axis is x = 2.
Why it happens Lines parallel to the x-axis were mixed up with lines parallel to the y-axis.
How to catch it A line parallel to the x-axis is flat, so every point on it has y-coordinate 5. The line is y = 5.
What gets written y = 3x − 2 and y = x + 4 meet where x = 3, so the answer is 3.
Why it happens Only the x-coordinate was found; a point needs both coordinates.
How to catch it Find y as well: y = 3 + 4 = 7. Check in the other equation: 3(3) − 2 = 7. The point is (3, 7).
For parents
You can help without knowing the topic. Ask your child to put the x-value of each given point into their final equation and say the y-value they get.
If it does not match the given point, the error is in the working, and you can go back line by line. If they struggle to read the gradient from an equation, ask them to get y on its own first.
Most slips in this chapter happen at that step. If the same step keeps going wrong after a few tries, a teacher can sit with your child and work through it one-to-one.
Share with a parent or teacher
Source:DSKP KSSM Mathematics Form 3 (English version)· DSKP KSSM Matematik Tingkatan 3 (Bahasa Melayu)
Ask a teacher about this
One pupil, one teacher, online. Lessons in English or Bahasa Melayu.
Book a Trial ClassOne-hour paid trial · Same-day reply · from RM50/hr
Frequently asked questions
What is the difference between the gradient and the y-intercept?
The gradient tells you how steep the line is: how much y changes when x goes up by 1. The y-intercept is where the line crosses the y-axis, the value of y when x = 0.
How do I know if two lines are parallel?
Write both as y = mx + c. Equal gradients with different y-intercepts mean parallel lines that never meet.
Equal gradients and equal y-intercepts mean it is the same line.
What is the gradient of a vertical line like x = 3?
It is undefined. Between any two points on x = 3, the change in x is 0, and you cannot divide by 0.
A horizontal line like y = 3 has gradient 0.
Which method is best for finding the point of intersection?
If one equation already has y on its own, substitution is quickest. If both are in the form ax + by = c, elimination is often neater.
A sketch graph is a good check.
Ask a teacher about this
One pupil, one teacher, online. Lessons in English or Bahasa Melayu.
Book a Trial ClassOne-hour paid trial · Same-day reply · from RM50/hr