Functions and Relations
Mathematics
Topic Two

### Relations

The equation, y= 8x+4, is a relation. A relation is defined as a set of ordered pairs that conforms  to a specific rule. So with the equation, y= 8x+ 4, the specific rule that applies is:

when, x = 2
y = 8(2) + 4
y = 16 + 4
y = 20

This results in the ordered pair of when x = 2 , y = 20 or (x, y) which is (2, 20)

Relations can also be showed using arrow diagrams which show the relation between, x and y values for the equation, y = 8x+ 4.

The y values in the arrow diagram above were obtained by substituting the respective x values in the equation, y =8x + 4, for x.

### Functions

A function is a relation in which each member of the domain (the set of x values) is mapped to only one member of the range (the set of y values), that is, each x value corresponds to a particular y value

Example of a One to One mapping

Using the equation, f(x) = 8x + 4
Where, f(x) means ‘the function of x is 8x + 4’
and, y = f(x).

The following is an example of a one-to-one mapping.

Recall the y values are obtained by substituting the domain values for x in the equation.

That is, when x = 1
y = 8(1) + 4
y = 12

### Linear Functions

Linear functions are those of the form, f(x) = ax + c or y = mx + b, where a and c are integers.  Linear means a straight line.

If y = ax + c

Then y is the dependent variable

a is the coefficient of x

x is the independent variable

c is the constant term.

Note also that, y = mx + c is the equation of a line

Therefore, y = ax + c = mx + b

where, m is the gradient or slope of the line and b is the point at which the line intercepts the y axis.

A linear equation or function can be graphed.

We want to draw the graph of the linear function, f(x) = 2x + 2 which is y = 2x + 2, for the domain -2 ≤ x ≤ 2.

Substitute the values given for x in the domain (-2, -1, 0, 1, 2), in the function, solving for the respective f(x)/ y values.

Given,                   f(x) = 2x + 2

Then,                    f(-2) = 2(-2) + 2 = -4 + 2 = -2

f(-1) = 2(-1) + 2 = -2 + 2 = 0

f(0) = 2(0) + 2 = 0 + 2 = 2

f(1) = 2(1) + 2 = 2 + 2 = 4

f(2) = 2(2) + 2 = 4 + 2 = 6

Therefore, the set of (x, y) values to be plotted and connected in forming the linear function are:

{(-2, -2), (-1, 0), (0, 2), (1, 4), (2,6)}

The graph of y= 2x + 2 is as follows:

### Equation of a Line

There are different ways in which to find the equation of a line.

Method 1: Slope-Intercept Form

In this case, the graph of a line is given and the question requires finding the equation of the line. Substitute the co-ordinates of the points in the equation and solving for m and b.

m = Change in y divided by the change in x or 2/1 = 2

b = 1 (where the line crosses the y-axis)

So: y = 2x + 1

You can also find the equation of a line when both the x and y values are given such as follows:

Find the equation of the straight line that has slope m = 4 and passes through the point (2,4).

In the slope-intercept form of a straight line, we have y, m, x, and b. We know that x=2, y=4 and slope or m = 4 so we have to calculate for b which is the intercept.

y = mx + b

(4) = (4)(2) + b

4 = 8 + b

–4 = b

Then the line equation must be y = 4x – 4.

Method 2: Point-Slope Form

In this method, the co-ordinates of the two points can be used to find the gradient of the line (m) using the following equation:

and after manipulating this equation, we get the point slope equation by solving for y − y1 such as follows:

to be:

y2 − y1 = m(x2 − x1)

So using the same information as in the above example we have:

y – 4 = 4(x – 2)

y – 4 = 4x – 8

y = 4x  –  4

Method 3: Standard Form of an Equation

Standard form of an equation is Ax + By = C, where A, B and C are real numbers and A and B are not both zero.

Notice that we got the same equation using both the slope intercept form and the point slope form.  We can also convert the results from the point-slope form to the standard form of an equation which is as follows:

So to write the above results, y = 4x – 4 in standard form, we more the x term to the left of the equation by subtracting it on both sides of the equation to get:

-4x + y = -4

Because the x term must be positive, we must multiply the entire equation by -1 to get the following:

4x – y = 4.

Quadratic functions are those of the form, f(x) = ax2 + bx + c

Where  a, b and c are all integers and f(x) which is y is the dependent variable

a is the coefficient of x2

b is the coefficient of x

c is the y intercept

x is the independent variable

Example

Draw the graph of the quadratic function, f(x) = x2 – 2x -3, for the domain -2 ≤ x ≤ 2.

Solution:

The set of (x, y) values to be plotted and connected in forming the graph representing the quadratic function, parabola (a smooth curve), are found by substituting the values given for x in the domain (-2, -1, 0, 1, 2), in the function, solving for the respective f(x)/ y values.

Given,                   f(x) = x2 – 2x – 3

Then,

f(-1) = (-1)2 – 2(-1) – 3 = 1 + 2 -3 = 0

f(0)  = (0)2 – 2(0) – 3 = 0 – 0 – 3 = -3

f(1)  = (1)2 – 2(1) – 3 = 1 -2 – 3 = -4

f(2)  = (2)2 – 2(2) – 3 = 4 – 4 – 3 = -3

f(-2) = (-2)2 – 2(-2) – 3 = 4 - 4 – 3 = 5

Therefore the set of (x, y) values are: {(-2, 5), (-1, 0), (0, -3), (1, -4), (2, -3)}

### Bar Chart

A bar chart is a type of graph that is used to display and compare the number, frequency or other measure such as the mean for different discrete categories of data. In the example below, the bar chart shows the amount of people who participate in certain sporting activities.

### Pie Charts

A pie chart is a circular diagram divided into sectors, with the size of each sector representing the magnitude of data it is showing. Each sector of a pie chart can be displayed in percentages. For example, using the data on sporting activities above, the pie chart looks as follows:

### Line Graphs

Line graphs are mostly used in depicting trends.  A line graph is drawn by connecting a line to consecutive values.

Example, the line graph for the sporting activities above is as follows: