1 What a function is
The canteen board in a school lists one price for each item. Samosa ₹15, vada ₹15, sandwich ₹30.
Item → price is a function. Every item has exactly one price on the board.
Two items may share a price: the samosa and the vada both cost ₹15. That is allowed.
One item with two prices on the same board would not be a function. You could not say what it costs.
A function as a machine
Think of a function as a machine with a name, say . You feed in a number . The machine doubles it and adds 3.
What comes out is written , read "f of x". So .
Feed in 4: out comes . Feed in : out comes .
The letter is only a place holder. is the same rule.
Words to know
- The input is the number you put in; the output is what comes out.
- is the image of . And is a preimage of : an input that gives it.
- The domain is the set of inputs the function accepts.
- is read "f from A to B". is the domain. , the set the outputs are taken from, is the codomain.
- The range is the set of outputs that really come out. It sits inside the codomain, and may be smaller.
NCERT puts it as a rule between two sets.
A function from to gives each element of one image in , and only one.
- is read " belongs to ": is one of the elements of .
- When to use it: to decide whether a rule, a list of pairs or a graph is a function.
- Tiny use: , and . The images are 5, 7, 9. The range is ; 11 is in the codomain but never comes out.
- The common slip: thinking two inputs may not share an output. They may. What is not allowed is one input with two outputs, or an input with none.
A real function is one whose domain and range are sets of real numbers. Every function on this page is real.
A function as a set of pairs
Write each input with its output as a pair (input, output). Any set of such pairs is called a relation.
A relation from to is a function when every element of appears as a first entry exactly once.
Example 1NCERT Ex 2.3 Q1
Which of these relations are functions? For each function, give its domain and range. (i) (ii) (iii)
See the solution
Step 1: (i) The first entries 2, 5, 8, 11, 14, 17 are all different, so each input has one output
Step 2: (i) Domain ; every output is 1, so the range is
Step 3: (ii) The first entries 2, 4, 6, 8, 10, 12, 14 are all different: a function
Step 4: (ii) Domain , range
Step 5: (iii) The input 1 appears with 3 and with 5: two outputs for one input
Answer: (i) and (ii) are functions, with the domains and ranges above; (iii) is not a function
Many inputs sharing one output, as in (i), is fine. A constant function like this has a range of one element.
Example 2NCERT Misc Q12
, and sends each to the highest prime factor of . Find the range of .
See the solution
Step 1: , so
Step 2: , so
Step 3: 11 is prime, so
Step 4: , so
Step 5: 13 is prime, so
Check: 9 and 12 both go to 3; sharing an output is allowed
Answer: the range is , four elements from five inputs
Here is the set of natural numbers . It is the codomain; most of it is never reached.
The vertical line test
On a graph, the input is read along the x-axis and the output up the y-axis.
A vertical line passes through every point with input . So it meets a function's graph at most once.
The curve is a parabola lying on its side. The line meets it at and at .
A curve that some vertical line meets twice gives two outputs for one input. It is not the graph of a function.
Working out values
To find of anything, put that thing in place of every in the rule.
Example 3Basic
. Find , and .
See the solution
Step 1:
Step 2:
Step 3:
Step 4:
Check: gives , as in Step 1
Answer: , ,
Example 4Exam level
A cab company charges by the rule , in rupees, for a ride of km. (i) What does a 15 km ride cost? (ii) How long was a ride that cost ₹232?
See the solution
Step 1: (i)
Step 2: (ii) Now the output is known:
Step 3: , so
Check:
Answer: (i) ₹220 (ii) 16 km
Part (ii) runs the rule backwards: the output is known and the input is asked. Section 5 calls this the inverse.
Try it
. Find and .
The rest of the page asks what may go in (domain), what can come out (range), and how functions combine.
Check yourself · 5 questions
Let and . Which of these relations from to is a function?
Loading the rest of the chapter…
Focused
Read the whole chapter
14 more sections: 39 worked examples, 12 graphs and figures, the question types IPMAT asks, 60 practice questions with full solutions.
Unlock with Focused Aspirant