- 1. Ordered pairs and the Cartesian product
- 2. Counting and using A × B
- 3. What is a relation?
- 4. Domain, range and codomain of a relation
- 5. When is a relation a function?
- 6. Real functions: domain and range from a formula
- 7. Identity, constant and polynomial functions
- 8. Rational functions and the modulus function
- 9. Signum and greatest integer functions
- 10. Adding, multiplying and dividing functions
- Review
5 of 10·NCERT §2.4·5 min
When is a relation a function?
The big ideaA function from \( A \) to \( B \) is a relation in which every element of \( A \) has one and only one image in \( B \).
In simple words
Think of a machine. You drop something in, and out comes an answer. A fair machine must give an answer for everything you are allowed to drop in, and it must give the same single answer every time. It may not give two answers for one thing, and it may not stay silent. A machine like that is a function.
The definition
A function is a special kind of relation. A relation \( f \) from a set \( A \) to a set \( B \) is a function if every element of \( A \) has one and only one image in \( B \).
Said another way, a function \( f \) from a non-empty set \( A \) to a non-empty set \( B \) is a relation such that
- the domain of \( f \) is the whole of \( A \) (no element is left out), and
- no two different ordered pairs in \( f \) have the same first element (no element gets two images).
Other words for a function are map and mapping. We write \( f : A \to B \), read "\( f \) is a function from \( A \) to \( B \)", or "\( f \) maps \( A \) into \( B \)".
If \( (a, b) \in f \), we write
\[ f(a) = b \]read "\( f \) of \( a \) equals \( b \)". Here \( b \) is the image of \( a \) under \( f \), and \( a \) is a preimage of \( b \). As before, \( A \) is the domain and \( B \) the codomain; the range of \( f \) is the set of all images.
Testing with an arrow diagram
In the arrow diagram of a relation from \( A \) to \( B \), the relation is a function exactly when each element of \( A \) has exactly one arrow leaving it. Then:
- If some element of \( A \) has no arrow, it is not a function (it has no image).
- If some element of \( A \) has two or more arrows, it is not a function (it has more than one image).
- It does not matter how many arrows arrive at an element of \( B \). Many arrows into one element is fine, and elements of \( B \) with no arrows are fine too.
Go back to earlier examples. The relation \( y = 2x \) on \( \{1, 2, \dots, 8\} \) is not a function from that set to itself, because 5, 6, 7 and 8 have no image. The relation \( x = y^2 \) from \( \{1, 4, 16\} \) is not a function either, because 4 has two images, 2 and \( -2 \).
Try it: draw arrows and break the function on purpose, once with a missing arrow and once with a double arrow.
Worked example
Which of these relations are functions? Give a reason each time.
- \( \{(1, 7), (2, 7), (3, 7)\} \). Each first element appears once. All images are 7, which is allowed. Function, with domain \( \{1, 2, 3\} \) and range \( \{7\} \).
- \( \{(0, 1), (1, 2), (1, 3), (2, 4)\} \). The first element 1 has two images, 2 and 3. Not a function.
- \( \{(-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4)\} \). Each first element appears once; two inputs sharing an output is fine. Function, range \( \{0, 1, 4\} \).
Worked example
On \( \mathbf{N} \), let \( R = \{\, (x, y) : y = 3x \,\} \). Is it a function? Find its domain, codomain and range.
- For every natural number \( x \), \( 3x \) is a natural number, and there is only one such number. So every element has one and only one image: a function.
- Domain \( = \mathbf{N} \), codomain \( = \mathbf{N} \).
- Range \( = \{3, 6, 9, 12, \dots\} \), the multiples of 3. It is smaller than the codomain.
A rule given in pieces
Sometimes a rule is given in two parts that overlap at one point. Then check the shared point.
Worked example
\( f(x) = x + 2 \) for \( 0 \le x \le 4 \) and \( f(x) = 3x - 6 \) for \( 4 \le x \le 9 \). Is \( f \) a function on \( [0, 9] \)? What about \( g(x) = x + 2 \) for \( 0 \le x \le 3 \) and \( g(x) = 3x - 6 \) for \( 3 \le x \le 9 \)?
- For \( f \), the only shared point is \( x = 4 \). First rule: \( 4 + 2 = 6 \). Second rule: \( 12 - 6 = 6 \). Same image, so \( f \) is a function.
- For \( g \), the shared point is \( x = 3 \). First rule: \( 5 \). Second rule: \( 9 - 6 = 3 \). The number 3 has two images, so \( g \) is not a function.
Slide the meeting point and find the only place where the two rules can meet.
Don't mix these up
- Every function is a relation, but not every relation is a function.
- "One input, two outputs" breaks a function. "Two inputs, one output" does not.
- The range need not be the whole codomain. Some elements of \( B \) may be nobody's image.
A little history. The word "function" was first used in 1673, in a Latin manuscript by Gottfried Wilhelm Leibnitz (1646 to 1716, also spelt Leibniz), though not yet in today's sense. In a letter of 5 July 1698, Johann Bernoulli used it in the analytical sense we now use, and Leibnitz agreed later that month. The word appears in English in 1779, in Chambers' Cyclopaedia.
Try it. \( A = \{1, 2, 3, 4\} \), \( B = \{2, 4, 6, 8, 10\} \), \( f = \{(1, 4), (2, 6), (3, 2), (4, 4), (3, 10)\} \). (a) Is \( f \) a relation from \( A \) to \( B \)? (b) Is it a function from \( A \) to \( B \)?
Answer
- Function \( f : A \to B \)
- A relation giving every element of \( A \) exactly one image in \( B \).
- Map, mapping
- Other names for a function.
- \( f(a) = b \)
- The image of \( a \) under \( f \) is \( b \); that is, \( (a, b) \in f \).
- Image
- The output \( f(a) \) that an input \( a \) is sent to.
- Preimage
- An input \( a \) that is sent to a given output \( b \).
- Range of a function
- The set of all images; a subset of the codomain.
Words to know
Which relation from \( \{1, 2, 3\} \) to \( \{a, b\} \) is a function?
- \( \{(1, a), (2, b)\} \)
- \( \{(1, a), (2, a), (3, b)\} \)
- \( \{(1, a), (1, b), (2, a), (3, a)\} \)
\( f = \{(2, 4), (3, 9), (5, 25)\} \). What is a preimage of 9?
- \( 81 \)
- \( 3 \)
- \( -3 \)
Is \( R = \{\, (x, y) : y^2 = x,\ x, y \in \mathbf{Z} \,\} \), taken as a relation from its domain, a function?
- Yes, because each \( y \) gives exactly one \( x \)
- No, because \( x = 4 \) has two images, 2 and \( -2 \)
- No, because \( R \) is empty
Picture and video credits