myUASARevision for UASA
Mathematics notes, chapter 8

Graphs of Functions

Textbook Mathematics Form 2 (DLP), pages 144–167

What this chapter covers

  • Explain the meaning of a function as a relation in which each object has only one image (8.1.1)
  • Identify one-to-one, many-to-one, one-to-many and many-to-many relations, and decide which are functions (8.1.1)
  • Identify functions and justify the answer from ordered pairs, tables, graphs and equations (8.1.2)
  • State the domain, codomain, object, image and range of a function, and write it with f(x) notation (8.1.2)
  • Construct tables of values for linear and non-linear functions (8.2.1)
  • Draw graphs of linear, quadratic, cubic and reciprocal functions using a given scale (8.2.1)
  • Interpret graphs of functions to find values of x and y, and to make inferences and predictions (8.2.2)
  • Solve problems involving graphs of functions (8.2.3)

A taxi fare, the height of a kicked ball and the cost of a phone plan all depend on another quantity. Whenever one quantity is fixed by another, we can write the link as a function and draw it as a graph. In this chapter you will decide whether a relation is a function, build a table of values, draw straight line and curved graphs, and read information from them.

EnglishBahasa Melayu
functionfungsi
relationhubungan
variablepemboleh ubah
graph of functiongraf fungsi
table of valuesjadual nilai
linear function, non-linear functionfungsi linear, fungsi bukan linear
quadratic function, cubic functionfungsi kuadratik, fungsi kubik
reciprocal functionfungsi salingan
scaleskala

8.1Functions

Relations and their types

A relation matches the items (objects) of set A to the items (images) of set B. It can be shown by an arrow diagram, a graph or a set of ordered pairs (object, image).

There are four types of relation, depending on how many images each object has and how many objects share an image (textbook pp. 147-149, Examples 1 and 2).

Four arrow diagrams. (a) one-to-one: 1, 2, 3 go to 2, 4, 6. (b) many-to-one: -1, 1, 2 go to 1, 1, 4. (c) one-to-many: 3 goes to 3 and 6, 4 goes to 4 and 8. (d) many-to-many: 16 goes to 4 and 8, 18 goes to 6, 24 goes to 4, 6 and 8
One-to-one and many-to-one relations are functions. One-to-many and many-to-many relations are not.
TypeMeaningExample (ordered pairs)Function?
One-to-oneEach object has one image, and each image has one object{(1, 2), (2, 4), (3, 6)}Yes
Many-to-oneEach object has one image, but some objects share an image{(−1, 1), (1, 1), (2, 4)}Yes
One-to-manyAt least one object has more than one image{(3, 3), (3, 6), (4, 4), (4, 8)}No
Many-to-manyAt least one object has more than one image, and some objects share an image{(16, 4), (16, 8), (18, 6), (24, 4), (24, 6), (24, 8)}No
A function is a relation in which each object has exactly one image. Two objects may share the same image, but one object may never have two images.
Do not mix up "one image per object" with "one object per image". Many-to-one is a function (the squares of −2 and 2 are both 4). One-to-many is not.
Quick test for a set of ordered pairs: look at the first numbers. If a first number appears twice with different second numbers, it is not a function. On a graph, no two points may lie directly above each other (the same x with different y).
State the type of relation and say whether it is a function.   a) {(1, 5), (2, 5), (3, 7)}   b) {(2, 4), (2, 6), (5, 10)}   c) {(−3, 9), (3, 9), (4, 16)}
Show answerHide answer
a) Many-to-one (1 and 2 share the image 5). A function.
b) One-to-many (the object 2 has two images, 4 and 6). Not a function.
c) Many-to-one (−3 and 3 share the image 9). A function.

Domain, codomain and range

Arrow diagram from Set P with 9, 16, 25 and 36 to Set Q with 1, 3, 4, 5 and 6. Arrows go 9 to 3, 16 to 4, 25 to 5, 36 to 6. The number 1 in Q receives no arrow
f maps x to the square root of x. Range = {3, 4, 5, 6} (shown in orange).
  • The set of all objects is the domain: P = {9, 16, 25, 36}.
  • The set of all the elements in set Q that objects may be matched to is the codomain: Q = {1, 3, 4, 5, 6}.
  • The elements of the codomain that are actually matched are the images. The set of images is the range: {3, 4, 5, 6}.
The range may be smaller than the codomain. Here 1 belongs to the codomain, but nothing is mapped to it, so 1 is not in the range. The range is only the images that are used.

Function notation: "f maps x to x − 1" is written f : x → x − 1 or f(x) = x − 1. Read f(3) as "the value of the function when x = 3": f(3) = 3 − 1 = 2 (textbook p. 149).

Representing a function

Example 1: set P = {1, 2, 3} is mapped to set Q = {4, 5, 6} by adding 3 (textbook p. 150)

RepresentationForm
Ordered pairs{(1, 4), (2, 5), (3, 6)}
Tablex: 1, 2, 3 and y: 4, 5, 6
GraphThree points (1, 4), (2, 5), (3, 6) plotted on a Cartesian plane
Equationy = x + 3, or f(x) = x + 3
The function f maps x to 5 − 2x for the domain {0, 1, 2, 3}. Write it as ordered pairs and state the range.
Show answerHide answer
f(0) = 5, f(1) = 3, f(2) = 1, f(3) = −1.
Ordered pairs: {(0, 5), (1, 3), (2, 1), (3, −1)}. Range = {5, 3, 1, −1}.

8.2Graphs of functions

A graph of a function is the picture of the function on a Cartesian plane. Each point on the graph is an ordered pair (x, y) that satisfies the equation of the function. We often call x the independent variable and y the dependent variable, because y depends on x.

Constructing a table of values

Substitute each given value of x into the function to find y. Put brackets around negative numbers and work out the power before multiplying (textbook pp. 151-152, Example 4).

Example 2: table of values for y = 2x² − 1

x = −1: y = 2(−1)² − 1 = 2(1) − 1 = 1
x = 0: y = 2(0)² − 1 = −1
x = 1: y = 2(1)² − 1 = 1
x = 2: y = 2(2)² − 1 = 2(4) − 1 = 7

x−1012
y1−117
In 2x², only x is squared. For x = −2 write 2(−2)² = 2 × 4 = 8. Writing −2² = −4 or (2 × −2)² = 16 are the two common errors.
Check your table for patterns. In a linear function the y values go up (or down) by the same amount each time. In y = x² − 2x − 3 the values are symmetrical: 5, 0, −3, −4, −3, 0, 5.

Steps to draw a graph

  1. Construct a table of values for the given range of x.
  2. Draw and label the axes with the scale given (for example 2 cm to 1 unit on the x-axis and 2 cm to 2 units on the y-axis).
  3. Plot the points (x, y) from the table.
  4. Join the points with a ruler for a straight line or a smooth curve freehand for a curve. Label the graph with its equation.

The four shapes you must know

FunctionPower of xGeneral formShape of graph
Linear1 (highest)y = mx + cStraight line
Quadratic2 (highest)y = ax² + bx + c, a ≠ 0Parabola (a smooth U or upside-down U)
Cubic3 (highest)y = ax³ + cSmooth S-shaped curve
Reciprocal−1y = ax (that is, y = ax⁻¹)Hyperbola: two separate branches

Example 3: linear function y = 2x + 4 for −2 ≤ x ≤ 3 (textbook p. 153)

x−2−10123
y0246810
Straight line graph of y = 2x + 4 through (-2, 0), (0, 4) and (3, 10)
A straight line: y increases by 2 every time x increases by 1.

Example 4: quadratic function y = x² − 2x − 3 for −2 ≤ x ≤ 4 (textbook p. 154)

x−2−101234
y50−3−4−305
Parabola of y = x squared minus 2x minus 3 with lowest point (1, -4), crossing the x-axis at -1 and 3
A parabola. The lowest point is (1, −4) and the curve is symmetrical about x = 1.

Example 5: cubic function y = 12 − x³ for −3 ≤ x ≤ 3 (textbook p. 155)

x−3−2−10123
y39201312114−15
Curve of y = 12 minus x cubed falling from (-3, 39) to (3, -15), almost flat near (0, 12)
A cubic curve. With the scale 2 cm to 5 units on the y-axis, the big values 39 and −15 still fit on the paper.

Example 6: reciprocal function y = 24x for −4 ≤ x ≤ 4 (textbook p. 156)

x−4−3−2−11234
y−6−8−12−24241286
Hyperbola of y = 24 over x with one branch in the top right and one in the bottom left, never touching the axes
Two branches. The graph never touches the y-axis because x = 0 gives no value of y.
For y = 24x, x = 0 is undefined (you cannot divide by 0), so there is no point at x = 0 and you must not join the two branches across the y-axis.
Plotting curves: use a sharp pencil, plot every point carefully, then draw one smooth curve through them. Never join curve points with short straight pieces.
a) Complete the table of values for y = x² + 1: x = −2, −1, 0, 1, 2.   b) State the shape of its graph.   c) Complete the table for y = 6x at x = −3, −2, −1, 1, 2, 3.
Show answerHide answer
a) y = 5, 2, 1, 2, 5
b) A parabola (quadratic function, highest power 2)
c) y = −2, −3, −6, 6, 3, 2 (hyperbola)

Interpreting graphs of functions

To read a value from a graph, draw a guide line to the curve and then to the other axis (textbook p. 158, Examples 10 and 11).

Graph of y = 2x + 2 with dashed lines showing that x = 2 gives y = 6 and y = 4 gives x = 1
When x = 2, y = 6. When y = 4, x = 1.
  • Given x, find y: go up (or down) from x until you meet the graph, then go across to the y-axis.
  • Given y, find x: go across from y until you meet the graph, then go down (or up) to the x-axis.
Parabola y = x squared minus 2 with a horizontal dashed line at y = 7 meeting the curve at x = -3 and x = 3
For y = x² − 2, the line y = 7 meets the curve twice: x = −3 or x = 3.
A curve can give two values of x for one value of y. Read both sides of the curve. For y = x² − 2 and y = 7, the answers are x = 3 and x = −3. (Check: 3² − 2 = 7 and (−3)² − 2 = 7.)

Example 7: reading a profit graph (textbook p. 159)

The profit graph of a stall is a straight line through the origin: 10 packets give RM5, 20 packets give RM10 and 40 packets give RM20. Then 26 packets give RM13, and 60 packets are predicted to give RM30, because the line goes on in the same direction. Reading values beyond the plotted part by following the trend is called a prediction. The inference: the more packets sold, the higher the profit.

Solving problems with graphs

Follow four steps: understand the problem, plan the strategy, carry it out by reading the graph, then write a conclusion with units (textbook pp. 160-161).

Example 8: Jibam's jump (textbook p. 161)

The height of Jibam is y = 6 + x − x² metres after x seconds, and a pebble moves with y = 2x.

  1. Maximum height: the highest point of the curve is (0.5, 6.25), so the maximum height is 6.25 m. (Check: 6 + 0.5 − 0.25 = 6.25.)
  2. The pebble touches Jibam where the two graphs meet. At x = 2: 6 + 2 − 4 = 4 and 2(2) = 4, so the meeting point is (2, 4): at the 2nd second.
  3. Jibam touches the ground when y = 0. At x = 3: 6 + 3 − 9 = 0, so at the 3rd second.
Where two graphs cross, both functions have the same value of x and y. That point answers "when are they equal?". To check, substitute the x value into both equations.
Always give units and the full answer. "6.25" is not enough: write 6.25 metres. Also read the scale carefully: one square may be 1, 2 or 5 units.
The graph of y = 2x + 2 passes through (0, 2) and (3, 8). a) Find y when x = 2.   b) Find x when y = −2.   c) For y = x² − 2, find the values of x when y = 7.
Show answerHide answer
a) y = 2(2) + 2 = 6
b) −2 = 2x + 2, 2x = −4, x = −2
c) x² = 9, so x = 3 or x = −3