1. Relations and Functions

Learning outcomes
  • I can distinguish between relations and functions.
  • I can identify inputs and outputs in a relation.
  • I can determine whether a relation is a function.
  • I can represent functions using mapping diagrams.
  • I can explain why each input in a function has only one output.

Introduction

Mathematics is full of relationships between quantities. For example, the number of hours worked determines a person's wages, the radius of a circle determines its area, and the time travelled at a constant speed determines the distance covered. These relationships can be described using relations and functions.

A relation simply connects inputs and outputs, while a function is a special type of relation in which every input is matched with exactly one output. Understanding the difference between relations and functions is fundamental to algebra and prepares you for graphing, modelling real-world situations, and studying more advanced mathematics.


What Is a Relation?

A relation is any set of ordered pairs that shows a relationship between two variables.

An ordered pair is written as: (x, y)

where:

  • x is the input (independent variable).
  • y is the output (dependent variable).

Example: {(1,3),(2,5),(3,7)}

This relation connects each input with an output.


https://images.openai.com/static-rsc-4/mgWV_tJX9XCJoe2GGMDBImysA5nqz8L8nWCuGL1MXMby1BDjQmGaWR8jbAhxlIRF1zonQes00RcgTBSY5CaHpOyVvljxnD_JtjM2IdOLWPb3-0F1BZqWT2Bj-K1pGmvvzwDIoiKyDg0NWOgDcpvZ9DmK0jhP1gG1LPwbcXkOsDLKVq4U-Km6ICZoSWWLRca5?purpose=fullsize
 
https://images.openai.com/static-rsc-4/q9HW6mUoDIlHpOC2opFD7yyt9XhWLwlzzvoHof5SWXRiziRCwP6YNX3hhCjcm6zETndd_BETserLl2c18h7GazCHqIoIjDCA9iK4FYNNg1GtDYABUlBPCZjHdFKRyYDZbwhiHDcwFX6Ob4nt05x5aGh454mTcHVP0qDcstrCieJ5gBXNh6c29zJ5ucXOGlmY?purpose=fullsize
 
https://images.openai.com/static-rsc-4/vfxlDw56yiqvLEGoTa0-DBF-9I1yT7Zy6713JGyXJWcc2jhDf-4d85z4JqPrGG72bgje4JtAvsCeui3riOeK6Zqjd7HYfHBx4MZgFIlVWN7-QQaULX75G170aeEq_Cr3PNFJ41FL3Ss3-kMAEwOZ3oVVq8VujeTtISEqx9sM5VFBJ8HczAirkFcr7QX1x_PJ?purpose=fullsize
5

Figure 1. A relation is a set of ordered pairs connecting inputs and outputs.


Inputs and Outputs

Every relation has:

Input

The value placed into the relation.

Usually represented by:

  • x

Examples:

  • Time
  • Distance travelled
  • Number of items

Output

The value produced by the relation.

Usually represented by:

  • y

Examples:

  • Cost
  • Area
  • Temperature

The input determines the output.


Domain and Range

The domain is the set of all input values.

The range is the set of all output values.

Example:

Relation: {(1,4),(2,6),(3,8)}

Domain: {1,2,3}

Range: {4,6,8}

The domain contains all x-values, while the range contains all y-values.


What Is a Function?

A function is a special type of relation.

In a function:

Every input has exactly one output.

Each input may produce:

  • One output ✔

It may not produce:

  • Two or more different outputs ✘

https://images.openai.com/static-rsc-4/zU8w-8orNQ8rG4dYYs5wCqvVsAYQlTbhcl7M8kdLtp8UbJ52TQsgxgvyct1uRUGwAVmCe8Wud_YLRhf5BZ0I9_KBpqgxlW7VSONfk8N_KolcGNCFGIMtWKKqc4BzpYnjjX1tOYq2CcbjRXl6gl03clg1ehemRx9UmZTvl_nbJKAPql6daBUAofd_nsiZCkn5?purpose=fullsize
 
https://images.openai.com/static-rsc-4/l1gV9y3QG-NoxBsTh5nO2Ph_dHiLauS4TD9dxqP-DnCQ7ll8dPIHZFBJifGRKV9w5IC0R_AUH54SraqA8nu9VV2Q1-_ZMqMaCBSgqzUemnLe6O1RFUVwixkL88XnHiWzH1BkjOmqdNKvii0I5GyVH0clhy_o0DP0wfJZb3cLS95V04A4CFwhjl1Zr1h2uqIH?purpose=fullsize
 
https://images.openai.com/static-rsc-4/yGqIY12nip1HR24dyq595WNlDRe5l3UHoT3ADFxjAlN75Hhkq30L5iV3rlEfXu70_mDGiqgBAg3Dt9GcfRccCOfuMliNK_IwJFOsTK4BHCMW9kVReJ5uD2NoghKCwWYo1I82Pd6bO6XVy7u0d7GFp5sEIslV5eRn5hrfpCWPwWMK1d39w2vMsKMv5Bn2CQwL?purpose=fullsize
5

Figure 2. In a function, each input points to exactly one output.


Is It a Function?

Example 1

{(1,4),(2,6),(3,8)}

Each input appears once.

✔ Function.


Example 2

{(1,4),(1,7),(2,5)}

Input 1 has two different outputs.

✘ Not a function.


Mapping Diagrams

A mapping diagram shows how inputs connect to outputs.

Example:

Domain

1

2

3

↓

Range

4

6

8

Each arrow represents one ordered pair.

If every input has exactly one arrow leaving it, the relation is a function.


https://images.openai.com/static-rsc-4/3ocEIFRc5OWZiekhPpL2L1JtpCnTdV66BgV8V1bYvuhHaYnas_sW83o3WTOsTnqR3NzlBGWWXbiToR_uIKKsOZCoNNXhrEEHZ8k_vM-AiXSyc1GO2kvFyiJVuYGwwMX-9dAJn6s9x6png9PTj3B4kZF1jzQpPn9xvKnxK8qn0z1N1CCGF-1fgBM48XRzs50C?purpose=fullsize
 
https://images.openai.com/static-rsc-4/5eGqqvnt6Yf8TSte8CaAtBcPCyts8i1ln4QGu6EnqlCNOzWg7oNPER9wK9i3pZY6-YtU1osbAXz5aICCU53BeNZNWclSUgoTBhLKRfGrLUh5k17UzEb2I37bhdje5htff8YHLfF4qnPbgvJ6VHV4hOe5EUuej2y67y3W6ognp3G-B4MeQZZD6JlPbb9-7gLd?purpose=fullsize
 
https://images.openai.com/static-rsc-4/zwSz32E4D2pMc_MPKL32WXUQEa1aBIXr6tXEoo6OdYKt1vmEjeZlM9pBpKPy5fvDNQ5Xankx-p2p1UMIz2T6gkrzFohxi_ozTTA-RQEHDNij4LKwduB2yDY8uMoKLgBWiNIctxRLw8QODt87-Zd-80ky8TVDhGlPm3RtMMxZn_8bESjHiRKSzXxiCM2HmtFz?purpose=fullsize
5

Figure 3. Mapping diagrams make it easy to determine whether a relation is a function.


One Output, Many Inputs

Different inputs can have the same output.

Example:

{(1,5),(2,5),(3,5)}

This is a function because:

  • Input 1 → Output 5
  • Input 2 → Output 5
  • Input 3 → Output 5

Each input still has only one output.


Not Allowed in a Function

An input cannot have two outputs.

Example:

{(2,4),(2,7)}

Input 2 produces:

  • 4
  • 7

Since one input has multiple outputs:

✘ Not a function.


Representing Functions

Functions can be represented in several ways.

Ordered Pairs

(1,3), (2,5), (3,7)

Tables

 Input (x)   Output Yes 
1 3
2 5
3 7

Mapping Diagrams

Arrows connect each input to its output.


Graphs

Functions can also be shown on a coordinate plane.

Later, you will learn how to recognise functions using the vertical line test.


https://images.openai.com/static-rsc-4/WHiA8JtfoCNpJhtV-RbJkPB0uVUtb3Nohpo8PHRHa85RTjtrOlo6HVuj0UuMqZ9SdGF3bOv5VZVuGESwGRRD3qIkzZ4_XbYeddOEOF15L6CXlEfBsyBLff-I0lnhRI-ZghYsmFEKve8MmlbraSbsSLdgMX9xlkqvn4urXA_Dc2-nMFoL97wgWBpVNzy56VC-?purpose=fullsize
 
https://images.openai.com/static-rsc-4/tXbjWPtK-EfhWqPp9mHYPEXY7fanue7bwnXGfITgWrKyYuwO5B_Oaq9JwOD_HhB8c69VAu0sRKpbTytrZrvs24A_q9VYOpWlyen16QyEDfiGBfWqucA24VlBKUekDAg9clVkyqsT3OCbcrwHO7COc7gg6HwWFE83l3QIVp0Lkgoq_ScPJPsbctyh2vqcAnc3?purpose=fullsize
 
https://images.openai.com/static-rsc-4/5oJwUIJ_BguW3l0w3wdqBxcNN_QS9ciI2Y9vDeapzL97b4jymgFFhPRZANXCw_DWaJZhytfWDeTPN6LIXf4-Xb4c98gWFVy9RvP_skz26XPqUS3UiPt82t5XbcVJt6PliPrRsrMSBCjnQzsF9dobsQnYK44LFYp0zKQZLe7QNJur_5BafqDgaNAZJm_kJsEo?purpose=fullsize
6

Figure 4. Functions can be represented using tables, mapping diagrams, ordered pairs, and graphs.


Real-World Examples

Student ID Number

Each student ID belongs to exactly one student.

✔ Function.


Person → Birthday

Each person has one birthday.

✔ Function.


Person → Favourite Food

Each person may have several favourite foods.

✘ Not necessarily a function.


Country → Capital City

Each country has one official capital city (for this level of study).

✔ Function.

Functions are useful because they describe predictable relationships.


Why Functions Matter

Functions are used throughout mathematics and science.

They help describe:

  • Motion.
  • Population growth.
  • Temperature changes.
  • Business profits.
  • Scientific experiments.

Understanding functions allows us to model real-world situations using mathematics.


https://images.openai.com/static-rsc-4/xBqawa2zVNZuv23qomalH5crXIPKqTXQhny2qhj-4v84LUuiOl9OdsvL3awm75u-yeeLG2t_9mgCPD_VPklRlxp2Rl8a--mbrmlTkc7TTLCXxPgT9fMUWwKvvpbqFqYhdYia5kRtl1Y4XZ--QAoXo0Vu5RhjaMEIOS7zOoJzRa2kUaWQhqzyDLSoLdyvKWs3?purpose=fullsize
 
https://images.openai.com/static-rsc-4/wSbBii9wWfd_LziK17UpdhxYsegTZDNDR19EYrBxW-GOxRvvJr8BPKly0QLVHAo4YTvvpcJbeSjqSIYRxzDrt3UCs4szFUYwUNktH4moNMuEtvu4ozFzB52Qfb6OOm1jDwNkEBYPhyfh1ERYacSVL42p53MjTGCiaA3ZuidlqzPwRmkmuwl4RHBYgCLyXR_i?purpose=fullsize
 
https://images.openai.com/static-rsc-4/prO3RfVmwnIgJpK-GFDmvZmoToW4uuzU0K69-Gm-2whBbJsq0GJqASDo0HBugrfIn6TnjZQDTayfpX8IVFxkwmQHtuuHRFbHssqfQEvwtYQR_JSP0ZIsDwOdBYltLORYpCQ2_b4Wq099W2ghIy9DRblcz_LCHDYka5CnnnAPxm3gCZaoEgZLg7VVsZRMiIkS?purpose=fullsize
5

Figure 5. Functions model many real-world relationships by assigning one output to each input.


Worked Example

Question

Determine whether the following relation is a function.

{(2,5), (4,8), (6,11), (2,9)}

 

Solution

The input 2 is paired with:

  • 5
  • 9

Since one input has two different outputs, the relation is not a function.


Real-World Connection

An online shopping website uses functions whenever it calculates the total cost of an order. If you purchase a specific number of identical items at a fixed price, each number of items (the input) corresponds to exactly one total cost (the output). This predictable relationship allows computers to calculate prices quickly and accurately.


Did You Know?

Functions are used extensively in computer programming. Every time you use a calculator app, search engine, or navigation system, mathematical functions help transform inputs into outputs. For example, entering a destination into a GPS produces one calculated route based on the information available, demonstrating how functions are used in everyday technology.


Key Terms

Domain – The set of all input values in a relation or function.

Function – A relation in which every input has exactly one output.

Input – The independent value that is entered into a relation or function, usually represented by x.

Mapping diagram – A diagram that uses arrows to show how inputs are matched with outputs.

Ordered pair – A pair of numbers written in the form (x,y) representing an input and its corresponding output.

Output – The dependent value produced by a relation or function, usually represented by y.

Range – The set of all output values in a relation or function.

Relation – A set of ordered pairs showing a relationship between two variables.


Key Takeaways

  • A relation is any set of ordered pairs connecting inputs and outputs.
  • A function is a relation in which every input has exactly one output.
  • The domain contains all input values, while the range contains all output values.
  • Mapping diagrams are useful for determining whether a relation is a function.
  • Multiple inputs may share the same output, but a single input cannot have multiple outputs in a function.
  • Functions are used to model predictable relationships in mathematics, science, technology, and everyday life.