Form 2 · 8

Form 2 Graphs of Functions: From a Table of Values to a Graph

Form 2 Curriculum: KSSMLearning standard: 8.1.1–8.1.2, 8.2.1–8.2.3

A function matches every input to exactly one output. In this chapter you tell one-to-one and many-to-one functions apart, use f(x) notation, build tables of values, draw graphs of linear and non-linear functions to a given scale, check points against the rule, read values from a graph and solve problems where two graphs meet.

What is a function?

At the school canteen, the cost of your kuih depends on how many pieces you buy. At RM0.60 a piece, each number of pieces gives exactly one cost.

A relation where each input is matched to exactly one output is called a function. The input is usually called x and the output y, and y depends on x.

We write the rule with function notation: f(x) = 0.6x, read as "f of x equals 0.6x". To find f(5), replace x by 5: f(5) = 0.6 × 5 = 3, so 5 pieces cost RM3.

f(5) does not mean f times 5.

Worked example

Given f(x) = 3x − 2, find f(4) and f(−1).

  1. f(4) = 3 × 4 − 2 = 12 − 2 = 10.
  2. f(−1) = 3 × (−1) − 2 = −3 − 2 = −5.

Answer: f(4) = 10 and f(−1) = −5

How do I tell whether a relation is a function?

A relation can be shown as ordered pairs, a table, a graph or an equation. It is a function if every input has exactly one output.

In a one-to-one function, different inputs always give different outputs, as in {(1, 3), (2, 5), (3, 7)}. In a many-to-one function, two or more inputs share an output: for y = x2, both 2 and −2 give 4.

That is still a function. If any single input has two or more outputs, the relation is one-to-many, and it is not a function.

Worked example

Classify each relation. P = {(1, 4), (2, 4), (3, 9)} and Q = {(5, 1), (5, 2), (6, 3)}.

  1. P: each input has one output, so P is a function.
  2. P: the inputs 1 and 2 share the output 4, so P is many-to-one.
  3. Q: the input 5 has two outputs, 1 and 2, so Q is one-to-many.

Answer: P is a many-to-one function. Q is not a function.

Practise this chapter12 original questions with worked answers and a second attempt.Practice questions

How do I make a table of values and draw a straight-line graph?

To draw a graph, start with a table of values. Use the rule to work out y for each x-value you are given.

Each column gives a point (x, y). Draw the axes with the scale in the question, mark every point with a small cross, and join them.

For a linear function such as y = 2x + 1, the points lie on a straight line, so join them with a ruler. Every point on the line fits the rule, and every point off the line does not.

That gives a quick test: to check whether a point lies on the graph, put its x-value into the rule and compare the y-values.

  1. Work out y for each x in the table.
  2. Plot each (x, y) using the scale given.
  3. Join the points: a ruler for a line, one smooth curve otherwise.
Graph of the straight line y = 2x + 1 on a grid from x = −2 to 4 and y = −2 to 8. The plotted points (−1, −1), (0, 1), (1, 3), (2, 5) and (3, 7) lie on the line. The point (3, 8) is marked one unit above the line, so it is not on the graph.−2−11234−2−1123456780xy(3, 7) on line(3, 8) not on liney = 2x + 1

Worked example

Make a table of values for y = 2x + 1 for x = −1, 0, 1, 2, 3. Then decide whether the point (3, 8) lies on the graph.

  1. x = −1: y = 2 × (−1) + 1 = −1. x = 0: y = 1.
  2. x = 1: y = 3. x = 2: y = 5. x = 3: y = 7.
  3. Test (3, 8): when x = 3, y = 2 × 3 + 1 = 7, not 8.

Answer: (3, 8) does not lie on y = 2x + 1. The point on the line at x = 3 is (3, 7).

How do I draw the graph of a non-linear function?

Functions such as y = x2 and y = x3 are non-linear: their graphs are curves, not straight lines. The method is the same, but you need more points, and you join them with one smooth curve drawn freehand, not with straight pieces.

Take y = x2 − 4. Squaring a negative number gives a positive answer, so x = −3 gives (−3)2 − 4 = 9 − 4 = 5, the same as x = 3.

The table is symmetrical, and the curve is a U shape with its lowest point at (0, −4). If one point looks out of line, recheck it before you draw through it.

The graph of y = x3 is an S shape instead. If your table keeps going wrong at the negative x-values, a teacher can work through those steps with you.

Graph of y = x² − 4 for x from −3 to 3: a smooth U-shaped curve through (−3, 5), (−2, 0), (−1, −3), (0, −4), (1, −3), (2, 0) and (3, 5). The lowest point is (0, −4) and the curve is symmetrical about the y-axis.−4−3−2−11234−5−4−3−2−11234560xy(−3, 5)(3, 5)(0, −4)y = x² − 4

Worked example

Make a table of values for y = x2 − 4 for x = −3, −2, −1, 0, 1, 2, 3, and give the lowest point of the graph.

  1. x = ±3: 9 − 4 = 5. x = ±2: 4 − 4 = 0.
  2. x = ±1: 1 − 4 = −3. x = 0: 0 − 4 = −4.
  3. The y-values are 5, 0, −3, −4, −3, 0, 5. The smallest is −4, at x = 0.

Answer: y = 5, 0, −3, −4, −3, 0, 5. The lowest point is (0, −4).

How do I read and interpret a graph?

A graph shows the whole table at once, so you can read values you never calculated. To find y for a given x, go up or down from x to the graph, then across to the y-axis.

To find x for a given y, go across first, then down. A graph also shows the trend.

A line rising from left to right means y increases as x increases; a falling line means y decreases. Following the trend lets you make a prediction, such as when a tank will be empty.

Keep predictions inside the real situation: a tank cannot hold negative water.

Worked example

A water tank holds 120 litres. It drains so that the volume left after t minutes is V = 120 − 15t. Find V after 3 minutes, and find when the tank is empty.

  1. After 3 minutes: V = 120 − 15 × 3 = 120 − 45 = 75.
  2. Empty means V = 0, so 15t = 120 and t = 120 ÷ 15 = 8.

Answer: 75 litres are left after 3 minutes. The tank is empty after 8 minutes.

How do two graphs help me solve a problem?

Where two graphs cross, one pair of values fits both rules. Its x-value solves the equation you get by setting the two rules equal.

This works for a line and a curve too: y = x2 − 4 meets y = x + 2 at (−2, 0) and (3, 5), so x = −2 and x = 3 solve x2 − 4 = x + 2. Next, in Form 3, you study the gradient of a straight line and y = mx + c.

Form 4 Quadratic Functions and Equations builds on curves like y = x2 − 4, and Form 5 Variation uses graphs of y = kx and y = k/x.

Graphs of cost C in ringgit against time h in hours for two bicycle shops. Shop A, C = h + 3, starts at 3 and rises slowly. Shop B, C = 2h, starts at 0 and rises faster. The lines cross at (3, 6).123456712345678910110hC(3, 6)A: C = h + 3B: C = 2h

Worked example

Shop A rents a bicycle for RM3 plus RM1 per hour, C = h + 3. Shop B charges RM2 per hour, C = 2h. When do the shops charge the same, and which is cheaper for a longer ride?

  1. Shop A for h = 0, 1, 2, 3, 4: C = 3, 4, 5, 6, 7.
  2. Shop B for h = 0, 1, 2, 3, 4: C = 0, 2, 4, 6, 8.
  3. Both give C = 6 at h = 3, so the lines cross at (3, 6).
  4. After 3 hours the line for A is lower, so A is cheaper.

Answer: Both cost RM6 for 3 hours. For rides longer than 3 hours, Shop A is cheaper.

Common mistakes

What gets written For y = x2 − 4 at x = −3: y = −9 − 4 = −13

Why it happens (−3)2 was worked out as −9, as if the minus sign stayed outside the square.

How to catch it (−3) × (−3) = 9, so y = 5. A lopsided table for y = x2 − 4 points to this slip.

What gets written Joining the points of y = x2 − 4 with a ruler, making a sharp V at the bottom

Why it happens Every graph was treated as straight pieces between points.

How to catch it Try x = 0.5: y = 0.25 − 4 = −3.75, which is below the ruler line. Draw one smooth curve.

What gets written {(4, 2), (4, −2), (9, 3)} is a many-to-one function

Why it happens A repeated number was spotted, but it is in the inputs, not the outputs.

How to catch it Ask how many outputs each input has. The input 4 has 2, so this is not a function.

What gets written (3, 8) is on y = 2x + 1 because it looks close to the line

Why it happens The point was judged by eye instead of by the rule.

How to catch it Substitute x = 3: y = 2 × 3 + 1 = 7. Only (3, 7) is on the line.

What gets written Plotting (2, 5) at 5 along and 2 up

Why it happens The coordinates were swapped.

How to catch it The x-value comes first: 2 along, then 5 up.

Practise this chapter12 original questions with worked answers and a second attempt.Practice questions

For parents

Ask your child to read one column of their table aloud, such as "when x is −3, y is 5", and show you that point on the graph. If the table is wrong, the slip is in the arithmetic, often with negative numbers.

If the table is right but the point is in the wrong place, the slip is in plotting: x goes along first, then y goes up. For function questions, ask: "does any input have two outputs?"

Source:DSKP KSSM Mathematics Form 2 (English version)· DSKP KSSM Matematik Tingkatan 2 (Bahasa Melayu)

Ask a teacher about this

One pupil, one teacher, online. Lessons in English or Bahasa Melayu.

Book a Trial Class

One-hour paid trial · Same-day reply · from RM50/hr

Frequently asked questions

What is the difference between a relation and a function?

A relation is any pairing of inputs with outputs. A function is a relation where every input has exactly one output.

Is a many-to-one relation a function?

Yes. With y = x2, both 3 and −3 give 9, but each input still has only one output, so it is a function.

How many points do I need to draw a graph?

For a straight line, 2 points are enough, but plot 3 so a mistake shows up. For a curve, use every x-value in the table, usually 6 or more.

How do I know if a graph will be a straight line or a curve?

Look at the power of x. If x has power 1, as in y = 3x − 2, the graph is a straight line.

If x is squared or cubed, the graph is a curve.

Ask a teacher about this

One pupil, one teacher, online. Lessons in English or Bahasa Melayu.

Book a Trial Class

One-hour paid trial · Same-day reply · from RM50/hr

One-hour paid trial · Same-day replyfrom RM50/hr
Book a Trial Class