In this explainer, we will learn how to identify, represent, and recognize functions from schematic descriptions, arrow diagrams, and graphs.

### Definition: A Relation

A relation, or relationship, describes a property between objects of two sets. If the object from the first set exhibits this relationship to the object in the second set, then it can be represented with a relation diagram.

Letβs consider some examples of relationships and their relation diagrams.

For instance, the following diagram represents the relationship βson or daughter of.β

This diagram is then read as βAmira is daughter of Lobna and Adelβ and so on. We can then deduce that Amira and Nada are sisters (they have the same parents), and Engy and Adam are half sister and brother (they have the same mother, but not the same father).

The following diagram represents the relationship βis the same age asβ between two groups of people.

We can deduce that, in the first group, Farida and Maged are the same age (because they are both the same age as Sally) and that Mariam and Dalia, in the second group, are the same age.

Letβs see now how a function is defined.

### Definition: A Function

A function is a special type of relationship that connects each object of the first set, called the *input*,
to **exactly one** object of the second set, called the *output*.

Note that the objects are usually numbers when we talk about functions, but not necessarily. For instance, the relationship βlives inβ is a function, since each person in the first set is associated with only one city in the second set (considering, e.g., only the main residence).

With such diagrams, functions can be identified as those where all elements of the first set are connected to exactly one object of the other set (i.e., only one arrow goes from each object).

Note that a function does not necessarily assign different output values to each input value. Here, two people live in the same city, but each person lives in exactly one city. The last part makes this relation a function.

Relations can also be represented as a ** set of ordered pairs**. Each pair consists of an object in the first
set and an object in the second set that it has been associated with.

The above relation is then written as follows: {(Sarah, Detroit), (Fares, New York), (Nabil, Seattle), (Samar, Seattle), (Bassem, Boston)}.

It is important to remember that the first object appearing in an ordered pair is from the first set, called input for a function, and the second one is from the second set, the output. This means that, for a function, the first objects in all the ordered pairs are distinct (i.e., no two are the same) and all of the elements from the input set appear.

Letβs look at the following examples.

### Example 1: Determining Whether a Relation Is a Function from a Relation Diagram

Determine whether the following statement is true or false: The given figure represents a function.

### Answer

We need to find whether the relation diagram shown in the figure represents a function. We know that a function connects each object in the input to exactly one object in the output. In the figure, each object in the input (4, 5, and 8) is connected to objects in the output. However, one of them (5) is connected to two outputs (2 and 9). Therefore, this relation is not a function.

### Example 2: Determining Whether a Relation Is a Function from a Relation Diagram

Which of the following relations represents a function?

### Answer

We need to find which of the relation diagrams shown in the figure represents a function. We know that a function connects each object in the input to exactly one object in the output.

In Figure (a), one object in the input b is not connected to any object in the output. Hence, this relation is not a function.

In Figure (b), each object is connected to objects in the output, but for one of them c, two output values 2 and 3 have been assigned. Hence, this relation is not a function.

In Figure (c), each input value a, b, and c is associated with exactly one output value 3, 1, and 3. Hence, this relation is a function.

Therefore, the answer is Figure (c).

### Example 3: Determining Whether a Relation Is a Function from a Table

Which of the following represents a function with input and output ?

Relation A | |||||
---|---|---|---|---|---|

0 | 3 | 8 | |||

6 | 8 | 20 | 4 | 8 |

Relation B | |||||
---|---|---|---|---|---|

0 | 7 | ||||

6 | 8 | 20 | 4 | 8 |

### Answer

In this question, two relationships between the sets and are shown in the form of a table showing pairs of -values and -values that have been associated together. We know that a function is a relation that associates each object in the input here with exactly one object in the output .

Therefore, we need to check that each -value is assigned one and only one -value. We notice that in both tables there is no blank in the -lines, which means that no -value has not been assigned any -value. We need then to find in which table no -value appears more than once to identify the function. This is the case for relation A where the five -values are all distinct , 0, 3, 8, and , while in relation B the -value appears twice and is associated with both 6 and 20. Hence, relation A represents a function.

### Example 4: Determining Whether a Relation Is a Function from a Set of Ordered Pairs

Which of the following relations represents a function?

Relation A | Relation B |
---|---|

### Answer

In this question, two relations between two sets of numbers are given in the form of a set of ordered pairs. In order to identify which of the two represents a function, we need to find for which one all the values from the input (which is written first in each ordered pair) are distinct (meaning different).

In relation A, the input values 4 and 5 appear, each, twice in and , and and , while in relation B the five ordered pairs all have a different input value 4, 5, 6, 7, and 8.

To make it more visual, we can represent the two given relations with a relation diagram, as shown here.

In relation A, two objects in the input are each connected to two objects in the output. As for relation B, each object of the input is connected to exactly one object of the output. Hence, the answer is relation B.

### Example 5: Determining Whether a Relation Is a Function from a Set of Ordered Pairs

Which of the relations shown by the set of the ordered pairs below does not represent a function?

- {, , , }
- {, , , }
- {, , , }
- {, , , }

### Answer

In this question, four relations between two sets of numbers are given in the form of a set of ordered pairs. In order to identify which of the four does not represent a function, we need to find for which one there is at least one value from the input (which is written first in each ordered pair) that is repeated in different pairs.

**Relation A**

The input values of the four ordered pairs are 3, 11, 27, and 43. They are all different. We can visualize relation A with a relation diagram. Each object in the input set is assigned exactly one object in the output set. This relation is, therefore, a function.

**Relation B**

The input values of the four ordered pairs are 3, 4, 5, and 6. They are all different. We can visualize relation B with a relation diagram. There is one and only one arrow going from each object in the input, meaning that exactly one output value has been assigned to each object in the input. Note that a function does not necessarily assign different output values to each input value. Hence, relation B is a function.

**Relation C**

The input values of the four ordered pairs are , , 10, and 11. They are all different, so relation C is a function. Relation C can be represented with a relation diagram.

**Relation D**

The input values of the four ordered pairs are 3, 11, 3, and 11. They are not all different: 3 appears twice and 11 as well, so relation D is not a function. Note how this can be visualized on a relation diagram: two arrows go from 3, and two go from 11 as well.

### Key Points

- A function is a special type of relation between two sets.
- A relation is a function if
- for every element of the input set there is an output;
- no element of the input set is mapped to more than one element of the output.

- Functions can be represented as diagrams, as ordered pairs, in tables, or in graphs.