Relations and Functions simply define or establish a relationship between two variables. In this chapter, we will provide an overview of relations, functions, the different ways in which we can look at functions and the different approaches we could use in answering them.
1. Relations
Relations define relationships between two sets of data.
A relation is a set comprising of ordered pairs. A set of my friends and their ages (in years) – {(Meera, 21), (Ashish, 19), (Mohan, 23), (Divya, 19)} – is a relation. Here, we understand that the age of Meera is 21 years, Ashish is 19 years and so on.
In the above relation, the two variables are name and age. Most exam questions, however, both the variables will be numbers. Therefore, going forward we will only use variables which hold numerical values.
Relation: y=x+5
Here, x is called the independent variable or the input.
And, y is called the dependent variable or output.
The below table shows the outputs (y-values) we get for certain inputs (x-values) in the relation y=x+5.
Input (x)
−8
−5
0
2.5
100
Output (y)
−3
0
5
7.5
105
Relations are classified into 4 types that are listed below. These names suggest the inputs-to-outputs relationship. For instance, Many-to-One relations are those where many inputs may have one output.
1.1 Types of Relations
One-to-One Relationship: 1 input has only 1 output and vice-versa.
y=x+1 is a relation where for every possible value of x, there is exactly one value of y and vice-versa.
Many-to-One Relationship: Many inputs could have the same output. However, 1 input will result in only 1 output.
y=x2. In this relations, x=2 and x=−2, result in y=4. So, many (more than one) values in x could result in one y-value.
One-to-Many Relationship: 1 input could result in many outputs. However, 1 output could be a result of only 1 input.
In y=x for x≤0, every value of x will have two y-values. x=4 results in y=+2,−2.
Many-to-Many Relationship: Many inputs could have many outputs and vice versa.
x2+y2=1 is the equation of a circle with a radius of 1 unit.
2. Functions
A function is a relationship, where every input has exactly one output. Therefore, not all relations are functions. Functions exist only for One-to-One and Many-to-One relationships.
Examples of functions are f(x)=3x+2,g(x)=5x2+4x+2,h(x)=∣5x–4∣,
i(x)=ex,j(x)=log(x+5) where x>−5 and k(x)=x−22x+1 where x=2
Let's take the function f(x)=3x+2.
For this function, the input isx, while the output isf(x) or 3x+2.
For an input of x=3,f(x)=11. Note that the output can also be represented as f(3)=11.