Loading

Chapter 2

Relations and Functions

How many licence-plate codes can three states make from three numbers, which pairs does a rule like "x is the first letter of the name y" pick out, and what makes a rule a function? This chapter builds pairs from two sets (the Cartesian product), picks pairs out by rules (relations, with their domains and ranges), and studies the special relations called functions: their graphs, the identity, constant, polynomial, rational, modulus, signum and greatest integer functions, and how functions are added, subtracted, multiplied and divided.

  • Ordered pairs, and when two pairs are equal
  • The Cartesian product A × B, its n(A) × n(B) elements, ordered triplets, and R × R as the plane
  • Relations: subsets of A × B chosen by a rule, arrow diagrams, domain, range and codomain
  • Counting the relations from one finite set to another: 2 to the power pq
  • Functions: one image for every element, image and preimage, and the notation f(x)
  • Graphs of the identity, constant, polynomial and rational functions
  • The modulus, signum and greatest integer functions and their graphs
  • Finding the domain and the range of a real function from its formula
  • The algebra of real functions: sums, differences, scalar multiples, products and quotients
Class 11, MathematicsOpen the original PDF

StartBefore you start: eleven ideas you already know

This chapter is about pairs: how to form them from two sets, how a rule picks some pairs out (a relation), and the most important kind of relation, a function. It uses sets from Chapter 1, coordinates from Class 9, and the graphs of Class 9 and Class 10. Each idea is refreshed below with a small example. If one feels new, read its example twice before going on.

1. Sets, roster form and set-builder form (Chapter 1)

A set is a well-defined collection of objects, its elements. In roster form we list the elements in braces, each once: {1, 2, 3}. In set-builder form we give a property: {x : x is a natural number less than 4} is the same set. Example: the set of vowels is {a, e, i, o, u}.

2. Ordered pairs and coordinates (Class 9, Chapter 1)

A point of the plane is named by an ordered pair (x, y): first the x-coordinate, then the y-coordinate. The order matters. Example: (2, 3) is the point 2 to the right and 3 up, while (3, 2) is 3 to the right and 2 up, a different point.

3. Counting choices one after another

If one thing can be chosen in 2 ways and, after it, a second thing in 3 ways, the two choices together can be made in 2 × 3 = 6 ways. Each first choice goes with each second choice. Example: with 2 shirts and 3 trousers you can dress in 6 different ways. Tossing a coin twice gives 2 × 2 = 4 outcomes (Class 10, Chapter 14).

4. How many subsets a set has (Chapter 1)

A set with n elements has 2ⁿ subsets, because each element is either in a subset or out of it: 2 choices for each element. Example: {a, b} has the 2² = 4 subsets φ, {a}, {b} and {a, b}.

5. Functions as rules (Class 9, Chapter 2)

In Class 9 we met rules that take an input and give exactly one output, like "double it and add 3". We wrote p(x) = 2x + 3, read "p of x", and called such a rule a function of x. Example: p(0) = 3, p(1) = 5 and p(4) = 11. That chapter promised that functions would be studied properly later: this chapter keeps that promise.

6. Graphs of y = ax + b (Class 9, Chapter 2, and Class 10, Chapter 3)

Make a table of values, plot the points (x, y), and join them: the graph of y = ax + b is a straight line. Example: y = 2x + 1 passes through (0, 1), (1, 3) and (2, 5).

7. Squares, cubes and the parabola (Class 10, Chapter 2)

A square is never negative: (−4)² = 16 and 0² = 0. A cube keeps the sign: (−2)³ = −8. The graph of y = x² is a parabola, a U-shaped curve with its lowest point at the origin. Example: the points (−2, 4), (0, 0) and (2, 4) all lie on y = x².

8. Absolute value (Class 9, Chapter 1)

The absolute value |x| of a number is its distance from 0 on the number line, so it is never negative. If x ≥ 0, then |x| = x; if x < 0, then |x| = −x. Example: |−3| = 3, |3| = 3 and |0| = 0. In this chapter, |x| is also called the modulus of x.

9. What cannot be computed

Division by 0 has no answer, so 1/0 is not a number. A negative real number has no real square root, because every real square is 0 or more. Example: 1/(x − 2) cannot be found when x = 2, and √(x − 5) is not a real number when x < 5.

10. Intervals and inequalities (Chapter 1)

[a, b] is the set of real numbers from a to b with both ends; (a, b) leaves out both ends; [a, ∞) is every real number from a onwards. Example: [0, ∞) is the set of real numbers that are not negative, and (−∞, 2) is every real number less than 2.

11. The integer part of a number

Every real number lies between two consecutive integers. Example: 2.7 lies between 2 and 3, and −1.5 lies between −2 and −1. The smaller of the two, the largest integer that is not more than the number, will matter in section 2.4.1: for 2.7 it is 2, and for −1.5 it is −2, not −1.

Words you will meet

WordMeaning
Ordered pairtwo elements written in a fixed order, (a, b)
Cartesian productA × B: all the ordered pairs (a, b) with a in A and b in B
Relationa subset of A × B, chosen by a rule linking a and b
Arrow diagrama picture of a relation, with an arrow from a to b for each pair
Domain, range, codomainthe first elements, the second elements, and the whole set B
Image, preimagein a pair (a, b), b is the image of a, and a a preimage of b
Functiona relation in which every element of A has exactly one image
Real functiona function whose domain and range are sets of real numbers
Graph of a functionall the points (x, f(x)), drawn in the plane
Algebra of functionsadding, subtracting, multiplying and dividing functions value by value

By the end of this chapter you will be able to

  • form the Cartesian product of two or three sets, and count its elements;
  • describe a relation in roster form, in set-builder form and by an arrow diagram, and find its domain, codomain and range;
  • count the relations from one finite set to another;
  • decide whether a relation is a function, and find the image of an element;
  • recognise and draw the graphs of the identity, constant, polynomial, rational, modulus, signum and greatest integer functions;
  • find the domain and range of a real function given by a formula;
  • add, subtract, multiply and divide real functions, and find where each result is defined.

2.1Relations and functions: introduction

A thought to begin with

The French chemist Marcellin Berthelot wrote: "Mathematics is the indispensable instrument of all physical research." His words open the chapter. Much of that instrument is made of the idea of this chapter: a function, a precise link between one quantity and another.

Much of mathematics is about finding a pattern: a recognisable link between quantities that change. In daily life we meet many patterns that describe relations, such as brother and sister, father and son, or teacher and student.

Mathematics has relations too: "the number m is less than the number n", "the line l is parallel to the line m", "the set A is a subset of the set B". In every one of these, a relation links a pair of objects, and the pair has an order. "Ravi is the father of Arjun" does not mean the same as "Arjun is the father of Ravi".

So the chapter begins with pairs. First we learn how to link pairs of objects from two sets: the Cartesian product. Then we pick out the pairs that a rule links: a relation. Finally we study special relations called functions. The idea of a function matters because it captures a mathematically precise link between one quantity and another.

G. W. Leibnitz (1646 to 1716), who first used the word "function" (the book's portrait).

The word "function" was first used by the German mathematician Gottfried Wilhelm Leibnitz (1646 to 1716), whose name is also spelt Leibniz. The historical note at the end of the chapter tells how the word came into mathematics.

Worked example 1

For each relation, say whether swapping the two objects keeps it true: (a) "is a sister of", for Meera and her sister Lata; (b) "is less than", for the numbers 2 and 5; (c) "is parallel to", for two parallel lines l and m.

What we know: A relation links two objects in a definite order.

What we need: Whether the reversed statement is still true.

The plan: Read each statement forwards, then backwards.

  1. (a) Meera is a sister of Lata, and Lata is a sister of Meera. Swapping keeps it true for these two sisters.
  2. (b) 2 is less than 5, but 5 is not less than 2. Swapping makes it false.
  3. (c) If l is parallel to m, then m is parallel to l. Swapping keeps it true.

Swapping keeps (a) and (c) true, but not (b): "2 < 5" is true and "5 < 2" is false. So in general, the order of the pair matters.

Check: For (a), if Lata were Meera's brother, the reverse "Lata is a sister of Meera" would be false. A relation must be tested in the order it is stated.

Worked example 2

The historical note says that Leibnitz first wrote the word "function" in 1673, and that Johann Bernoulli gave it its present, analytical meaning in a letter of 1698. How old was Leibnitz in 1673, and how many years after his first use did the new meaning come?

What we know: Leibnitz was born in 1646. The two dates are 1673 and 1698.

What we need: His age in 1673, and the time between the two dates.

The plan: Subtract the years.

  1. 1673 − 1646 = 27, so he was about 27 years old.
  2. 1698 − 1673 = 25 years later.

Leibnitz was about 27, and the analytical meaning came 25 years later.

Check: Leibnitz lived 1716 − 1646 = 70 years, so he saw the new meaning, and the note says he approved of it.

When you are stuck: starting the chapter

Read every symbol aloud: (a, b) is "the ordered pair a, b", A × B is "A cross B", and f(x) is "f of x".

Make it small: when an idea feels abstract, try it on two small sets you can list, such as {1, 2} and {3, 4}.

Draw it: arrows between two lists, or a graph, turn most questions of this chapter into a picture.

Your turn

Give one relation from daily life in which the order of the pair matters, and one in which it does not.Tap to reveal

The plan: Test a relation forwards and backwards.

  1. "Is the teacher of": a teacher of a student is not usually that student's student, so the order matters.
  2. "Lives in the same house as": if A lives in the same house as B, then B lives in the same house as A.

For example, "is the teacher of" (order matters) and "lives in the same house as" (it does not).

Name the three main ideas of this chapter, in the order the chapter studies them.Tap to reveal

The plan: Recall the plan of the introduction.

  1. Pairs from two sets come first, then the pairs a rule picks out, then special relations.

The Cartesian product, relations and functions.

In one line

A relation links objects in ordered pairs; this chapter builds pairs from two sets (the Cartesian product), picks pairs by a rule (relations), and studies the most useful relations of all (functions).

2.2Cartesian products of sets

Pairs from two sets

Suppose A is a set of 2 colours and B is a set of 3 objects: A = {red, blue} and B = {b, c, s}, where b, c and s stand for a particular bag, coat and shirt. How many pairs of a colour and an object can be made from these two sets?

Work in an orderly way: take each colour in turn, and pair it with each object in turn. Red gives (red, b), (red, c) and (red, s). Blue gives (blue, b), (blue, c) and (blue, s). That is 6 distinct pairs, as Figure 2.1 shows: each of the 2 colours goes with each of the 3 objects, and 2 × 3 = 6.

Book Figure 2.1: The six pairs of a colour from A = {red, blue} and an object from B = {b, c, s}, the bag, the coat and the shirt (the book labels this figure only with its number).

Ordered pairs, and when two are equal

Recall from Class 9 that an ordered pair of elements, taken from two sets P and Q, is a pair written in round brackets in a particular order: (p, q), with p ∈ P and q ∈ Q. The element p is the first element (or first coordinate), and q is the second element.

Ordered pair

An ordered pair is a pair of elements grouped together in a particular order, written (a, b). The ordered pair (a, b) and the ordered pair (b, a) are different whenever a ≠ b.

Examples: the ordered pair (2, 3) is the point 2 to the right and 3 up. The ordered pair (DL, 01) is a licence-plate code, and (01, DL) is not the same code. In the ordered pair (red, b), red is the first element and b is the second.

When are two ordered pairs the same? Only when they match place by place: the first elements are equal, and the second elements are equal too.

Equality of ordered pairs

Read the double arrow ⇔ aloud as "exactly when" (or "if and only if"). An equation between two pairs is really two equations, one for each place.

Example 1 (from the book)

If (x + 1, y − 2) = (3, 1), find the values of x and y.

What we know: Equal ordered pairs have equal first elements and equal second elements.

What we need: x and y.

The plan: Write one equation for each place, and solve each.

  1. First elements: x + 1 = 3, so x = 3 − 1 = 2.
  2. Second elements: y − 2 = 1, so y = 1 + 2 = 3.

x = 2 and y = 3.

Check: Put the values back: (2 + 1, 3 − 2) = (3, 1). Both places match.

Worked example 3

Find a and b if (2a − 1, b + 4) = (7, 1). Then say whether (a, b) = (b, a) for these values.

What we know: Equal ordered pairs match place by place.

What we need: a and b, and a comparison of (a, b) with (b, a).

The plan: Solve the two place-by-place equations; then swap the pair.

  1. First places: 2a − 1 = 7, so 2a = 8 and a = 4.
  2. Second places: b + 4 = 1, so b = 1 − 4 = −3.
  3. Then (a, b) = (4, −3) and (b, a) = (−3, 4). Their first elements differ (4 ≠ −3), so the pairs are not equal.

a = 4 and b = −3, and (a, b) ≠ (b, a).

Check: Put the values back: (2 × 4 − 1, −3 + 4) = (7, 1). As points, (4, −3) and (−3, 4) lie in different quarters of the plane.

A common mistake: an ordered pair is not a set

The set {1, 2} is the same as the set {2, 1}, because a set has no order. The ordered pair (1, 2) is not the same as (2, 1), because a pair keeps its order.

A pair can also repeat an element: (3, 3) is an ordered pair, while the set {3, 3} is just {3}.

The Cartesian product

Collecting all the ordered pairs from two sets gives a new set, named after the French mathematician René Descartes, who described the points of a plane by pairs of numbers. This leads to the book's first definition.

Cartesian product

Given two non-empty sets P and Q, the Cartesian product P × Q is the set of all ordered pairs of elements from P and Q: P × Q = {(p, q) : p ∈ P, q ∈ Q}. If either P or Q is the empty set, then P × Q is also empty: P × Q = φ.

Examples: the Cartesian product of {red, blue} and {b, c, s} has the 6 pairs listed above. The Cartesian product {1, 2} × {3} is {(1, 3), (2, 3)}. The Cartesian product R × R is the set of all points of the plane.

The Cartesian product

Read P × Q aloud as "P cross Q". It is the set of all ordered pairs whose first element comes from P and whose second element comes from Q.

From the illustration above, A × B = {(red, b), (red, c), (red, s), (blue, b), (blue, c), (blue, s)}.

Again, consider A = {DL, MP, KA}, where DL, MP and KA stand for Delhi, Madhya Pradesh and Karnataka, and B = {01, 02, 03}, the codes for the licence plates of vehicles issued by these states. Suppose each code must begin with a state from A and end with a number from B. Which codes are available, and how many are there (Figure 2.2)?

Book Figure 2.2: The nine licence-plate codes: pairs of a state code from A = {DL, MP, KA} and a number from B = {01, 02, 03} (the book labels this figure only with its number).

The available pairs are (DL, 01), (DL, 02), (DL, 03), (MP, 01), (MP, 02), (MP, 03), (KA, 01), (KA, 02) and (KA, 03). So A × B has 9 pairs, because each of the 3 states goes with each of the 3 numbers. The order of each pair matters: the code (DL, 01) is not the same as (01, DL).

As a final illustration, take A = {a₁, a₂} and B = {b₁, b₂, b₃, b₄} (Figure 2.3). Then A × B = {(a₁, b₁), (a₁, b₂), (a₁, b₃), (a₁, b₄), (a₂, b₁), (a₂, b₂), (a₂, b₃), (a₂, b₄)}. If A and B are sets of real numbers, these 8 ordered pairs can stand for points of the plane, and the point (a₁, b₂) is different from the point (b₂, a₁).

Book Figure 2.3: The eight ordered pairs of A = {a₁, a₂} and B = {b₁, b₂, b₃, b₄}, as points of the plane (the book labels this figure only with its number).
12312Oxy(1, 1)(1, 2)(2, 1)(2, 2)(3, 1)(3, 2)
Our picture of A × B for A = {1, 2, 3} and B = {1, 2}: the 3 × 2 = 6 pairs are six points of the plane.

Four remarks

  1. Equal pairs: two ordered pairs are equal if and only if their first elements are equal and their second elements are also equal.
  2. How many pairs: if A has p elements and B has q elements, then A × B has pq elements. That is, if n(A) = p and n(B) = q, then n(A × B) = pq.
  3. Infinite products: if A and B are non-empty, and either of them is infinite, then A × B is infinite too.
  4. Three sets: A × A × A = {(a, b, c) : a, b, c ∈ A}. Here (a, b, c) is called an ordered triplet.
The number of elements of a Cartesian product

Why it is true: each of the n(A) first elements can be paired with each of the n(B) second elements, so the pairs come in n(A) rows of n(B), as in Figure 2.2.

Worked example 4

A café offers 4 kinds of sandwich and 3 kinds of drink. A meal is one sandwich with one drink. How many different meals are there? How many if the café adds 2 more drinks?

What we know: A meal is an ordered pair (sandwich, drink). So the set of meals is S × D, with n(S) = 4 and n(D) = 3.

What we need: n(S × D) before and after the change.

The plan: Use n(S × D) = n(S) × n(D).

  1. Before: n(S × D) = 4 × 3 = 12 meals.
  2. With 2 more drinks, n(D) = 3 + 2 = 5, so n(S × D) = 4 × 5 = 20 meals.

12 meals, and 20 after the change.

Check: Adding 2 drinks adds 2 new meals for each of the 4 sandwiches: 12 + 4 × 2 = 20.

Example 2 (from the book)

If P = {a, b, c} and Q = {r}, form the sets P × Q and Q × P. Are these two products equal?

What we know: P × Q pairs a first element from P with a second from Q; Q × P does the opposite.

What we need: Both products, and whether they are equal.

The plan: List each product, then compare the pairs.

  1. P × Q = {(a, r), (b, r), (c, r)}.
  2. Q × P = {(r, a), (r, b), (r, c)}.
  3. The pair (a, r) is not equal to the pair (r, a), by the equality of ordered pairs. So the two sets do not have the same elements.

P × Q ≠ Q × P. But both have the same number of elements, 3.

Check: n(P × Q) = 3 × 1 = 3 and n(Q × P) = 1 × 3 = 3.

Example 3 (from the book)

Let A = {1, 2, 3}, B = {3, 4} and C = {4, 5, 6}. Find (i) A × (B ∩ C); (ii) (A × B) ∩ (A × C); (iii) A × (B ∪ C); (iv) (A × B) ∪ (A × C).

What we know: Work out B ∩ C and B ∪ C first; then form the products.

What we need: Four sets of pairs.

The plan: Do the brackets first, then pair every element of A with every element found.

  1. (i) B ∩ C = {4}, so A × (B ∩ C) = {(1, 4), (2, 4), (3, 4)}.
  2. (ii) A × B = {(1, 3), (1, 4), (2, 3), (2, 4), (3, 3), (3, 4)} and A × C = {(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)}. Their common pairs are (1, 4), (2, 4) and (3, 4).
  3. (iii) B ∪ C = {3, 4, 5, 6}, so A × (B ∪ C) has 3 × 4 = 12 pairs: (1, 3), (1, 4), (1, 5), (1, 6), (2, 3), (2, 4), (2, 5), (2, 6), (3, 3), (3, 4), (3, 5), (3, 6).
  4. (iv) Joining the pairs of A × B and A × C, each once, gives the same 12 pairs as in (iii).

(i) and (ii) are both {(1, 4), (2, 4), (3, 4)}; (iii) and (iv) are the same 12 pairs.

Check: The results show two laws: A × (B ∩ C) = (A × B) ∩ (A × C) and A × (B ∪ C) = (A × B) ∪ (A × C).

Example 4 (from the book)

If P = {1, 2}, form the set P × P × P.

What we know: P × P × P is the set of ordered triplets (a, b, c) with a, b and c in P.

What we need: All the triplets.

The plan: Choose the first, then the second, then the third element, in order.

  1. First element 1: (1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2).
  2. First element 2: (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2).

P × P × P = {(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2), (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)}, 8 triplets.

Check: Each of the 3 places has 2 choices, so there are 2 × 2 × 2 = 8 triplets.

Example 5 (from the book)

If R is the set of all real numbers, what do the Cartesian products R × R and R × R × R represent?

What we know: A point of the plane is an ordered pair of real numbers; a point of space is an ordered triplet.

What we need: What each product stands for.

The plan: Read each product as a set of coordinates.

  1. R × R = {(x, y) : x, y ∈ R} is the set of the coordinates of all the points of two-dimensional space, the plane.
  2. R × R × R = {(x, y, z) : x, y, z ∈ R} is the set of the coordinates of all the points of three-dimensional space.

R × R is the plane and R × R × R is space, each point named by its coordinates.

Check: Chapter 11 of this book studies points (x, y, z) of three-dimensional space.

Example 6 (from the book)

If A × B = {(p, q), (p, r), (m, q), (m, r)}, find A and B.

What we know: A is the set of first elements, and B is the set of second elements.

What we need: A and B.

The plan: Collect the first elements, then the second elements, each once.

  1. The first elements are p, p, m, m, so A = {p, m}.
  2. The second elements are q, r, q, r, so B = {q, r}.

A = {p, m} and B = {q, r}.

Check: {p, m} × {q, r} gives back exactly the four given pairs, and 2 × 2 = 4.

Worked example 5

A × B has 6 elements, and two of them are (1, x) and (2, y). If A = {1, 2, 3}, how many elements has B? Can x = y?

What we know: n(A × B) = n(A) × n(B), and n(A) = 3.

What we need: n(B), and whether x and y can be equal.

The plan: Divide; then think about which second elements can appear.

  1. 6 = 3 × n(B), so n(B) = 2.
  2. Every element of B appears as a second element with each element of A. So (1, x) and (2, y) can have the same second element: with x = y, both pairs belong to A × B.

B has 2 elements, and x = y is possible: for example (1, 5) and (2, 5) are both in A × {5, 7}.

Check: A × {5, 7} = {(1, 5), (1, 7), (2, 5), (2, 7), (3, 5), (3, 7)}: 6 pairs, as given.

Worked example 6

Story: A hostel's lockers are named by a letter from {A, B, C, D} and a number from {1, 2, 3, 4, 5}, such as (B, 3). How many lockers can be named? If the hostel needs 30 lockers, what is the smallest number of letters it needs, keeping the five numbers?

What we know: Each name is an ordered pair (letter, number), so the names form L × N.

What we need: n(L × N), then the least n(L) with n(L) × 5 ≥ 30.

The plan: Multiply; then divide and round up.

  1. n(L × N) = 4 × 5 = 20 lockers.
  2. We need n(L) × 5 ≥ 30, so n(L) ≥ 30 ÷ 5 = 6.

20 lockers can be named now; 6 letters are needed for 30.

Check: 6 × 5 = 30 exactly, while 5 letters give only 25.

A common mistake: thinking A × B = B × A

A × B and B × A have the same number of elements, but not the same elements (unless A = B or one set is empty). (1, a) ∈ {1} × {a}, but (1, a) ∉ {a} × {1}.

When you are stuck: Cartesian products

List in rows: take the first element of A and pair it with every element of B; then the next element of A; and so on.

Count before you list: n(A × B) = n(A) × n(B) tells you how many pairs to expect, so you notice a missing one.

Going backwards: from a product, A is the set of first elements and B the set of second elements.

Worked example 7

Codes are made of a letter from L = {A, B, C}, then a digit from D = {1, 2}, then a letter from L again, as the ordered triplet (letter, digit, letter). How many codes are there? List those that begin A, 1.

What we know: A code is an element of L × D × L.

What we need: n(L × D × L), and the codes (A, 1, ·).

The plan: Multiply the numbers of choices for the three places.

  1. The first place has 3 choices, the second 2 and the third 3.
  2. So n(L × D × L) = 3 × 2 × 3 = 18.
  3. The codes beginning A, 1 are (A, 1, A), (A, 1, B) and (A, 1, C).

18 codes; the three beginning A, 1 are (A, 1, A), (A, 1, B), (A, 1, C).

Check: A letter may repeat, as in (A, 1, A), because the third place chooses from all of L again.

Worked example 8

Show that if A and B are non-empty sets with A × B = B × A, then A = B.

What we know: A × B = B × A means the two sets have exactly the same pairs.

What we need: A proof that A = B.

The plan: Take any a ∈ A and any b ∈ B, and look at the pair (a, b).

  1. (a, b) ∈ A × B, so (a, b) ∈ B × A. Its first element is then in B and its second in A: a ∈ B and b ∈ A.
  2. a was any element of A, so A ⊂ B. And b was any element of B, so B ⊂ A.
  3. Sets that are subsets of each other are equal (Chapter 1).

A = B. So for non-empty sets, A × B = B × A happens only when A and B are the same set.

Check: Non-empty matters: if A = φ, then A × B = φ = B × A for every set B.

Worked example 9

If A × B = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}, find A and B, and the number of elements of B × A × B.

What we know: A is the set of first elements and B the set of second elements.

What we need: A, B and n(B × A × B).

The plan: Collect each place; then multiply the sizes.

  1. First elements: 1, 2, 3, so A = {1, 2, 3}.
  2. Second elements: a, b, so B = {a, b}.
  3. n(B × A × B) = 2 × 3 × 2 = 12.

A = {1, 2, 3}, B = {a, b}, and B × A × B has 12 elements.

Check: n(A × B) = 3 × 2 = 6 matches the six given pairs.

Your turn

If n(A) = 5 and n(B) = 4, how many elements has A × B? And B × A?Tap to reveal

The plan: Use n(A × B) = n(A) × n(B).

  1. n(A × B) = 5 × 4 = 20.
  2. n(B × A) = 4 × 5 = 20.

20 each.

Find x and y if (x, 7) = (−3, y + 2).Tap to reveal

The plan: Equate place by place.

  1. x = −3.
  2. 7 = y + 2, so y = 5.

x = −3 and y = 5.

Write {a} × {1, 2, 3}.Tap to reveal

The plan: Pair a with each number.

  1. The pairs are (a, 1), (a, 2) and (a, 3).

{(a, 1), (a, 2), (a, 3)}.

In one line

A × B is the set of all ordered pairs (a, b) with a in A and b in B; it has n(A) × n(B) elements, and in general A × B ≠ B × A.

Ex 2.1Exercise 2.1, solved in full

Every answer below agrees with the book's answer key.

1. If (x/3 + 1, y − 2/3) = (5/3, 1/3), find the values of x and y.Tap to reveal

What we know: Equal ordered pairs match place by place.

The plan: Write and solve one equation for each place.

  1. First places: x/3 + 1 = 5/3, so x/3 = 5/3 − 1 = 2/3, and x = 2.
  2. Second places: y − 2/3 = 1/3, so y = 1/3 + 2/3 = 1.

x = 2 and y = 1.

Check: Put the values back: (2/3 + 1, 1 − 2/3) = (5/3, 1/3). Both places match, so the pairs are equal.

2. If the set A has 3 elements and the set B = {3, 4, 5}, then find the number of elements in A × B.Tap to reveal

What we know: n(A × B) = n(A) × n(B).

The plan: Count B, then multiply.

  1. n(A) = 3 and n(B) = 3.
  2. Each of the 3 elements of A is paired with each of 3, 4 and 5.
  3. n(A × B) = 3 × 3 = 9.

A × B has 9 elements.

Check: We do not need to know the elements of A, only how many there are. If A = {a, b, c}, the pairs are (a, 3), (a, 4), (a, 5), and then the same for b and c: 9 in all.

3. If G = {7, 8} and H = {5, 4, 2}, find G × H and H × G.Tap to reveal

What we know: G × H takes first elements from G; H × G takes them from H.

The plan: List in rows.

  1. G × H: 7 with 5, 4, 2, then 8 with 5, 4, 2.
  2. H × G: 5 with 7, 8, then 4 with 7, 8, then 2 with 7, 8.

G × H = {(7, 5), (7, 4), (7, 2), (8, 5), (8, 4), (8, 2)} and H × G = {(5, 7), (5, 8), (4, 7), (4, 8), (2, 7), (2, 8)}.

Check: Each has 2 × 3 = 6 pairs, and the two sets are not equal.

4. State whether each of the following statements is true or false. If the statement is false, rewrite it correctly. (i) If P = {m, n} and Q = {n, m}, then P × Q = {(m, n), (n, m)}. (ii) If A and B are non-empty sets, then A × B is a non-empty set of ordered pairs (x, y) such that x ∈ A and y ∈ B. (iii) If A = {1, 2} and B = {3, 4}, then A × (B ∩ φ) = φ.Tap to reveal

The plan: Test each statement against the definition.

  1. (i) P and Q are the same set {m, n}, so P × Q has 2 × 2 = 4 pairs, not 2. False: P × Q = {(m, m), (m, n), (n, m), (n, n)}.
  2. (ii) A non-empty A and B give at least one pair (x, y). True.
  3. (iii) B ∩ φ = φ, and A × φ = φ. True.

(i) False; P × Q = {(m, n), (m, m), (n, n), (n, m)}. (ii) True. (iii) True.

Check: In (i), the order of listing a set does not change it, so {m, n} = {n, m}.

5. If A = {−1, 1}, find A × A × A.Tap to reveal

What we know: A × A × A is the set of ordered triplets with every place from A.

The plan: Fix the first place, then the second, then the third.

  1. First place −1: (−1, −1, −1), (−1, −1, 1), (−1, 1, −1), (−1, 1, 1).
  2. First place 1: (1, −1, −1), (1, −1, 1), (1, 1, −1), (1, 1, 1).

A × A × A is the set of these 8 triplets.

Check: 2 × 2 × 2 = 8. On the way, A × A = {(−1, −1), (−1, 1), (1, −1), (1, 1)}.

6. If A × B = {(a, x), (a, y), (b, x), (b, y)}, find A and B.Tap to reveal

What we know: A is the set of first elements and B the set of second elements.

The plan: Collect each place, each element once.

  1. First elements: a, a, b, b, so A = {a, b}.
  2. Second elements: x, y, x, y, so B = {x, y}.

A = {a, b} and B = {x, y}.

Check: {a, b} × {x, y} = {(a, x), (a, y), (b, x), (b, y)}: exactly the four given pairs, and 2 × 2 = 4.

7. Let A = {1, 2}, B = {1, 2, 3, 4}, C = {5, 6} and D = {5, 6, 7, 8}. Verify that (i) A × (B ∩ C) = (A × B) ∩ (A × C); (ii) A × C is a subset of B × D.Tap to reveal

The plan: Work out each side; for (ii), check every pair of A × C.

  1. (i) B ∩ C = φ, so the left side is A × φ = φ.
  2. Every pair of A × B has a second element from {1, 2, 3, 4}, and every pair of A × C one from {5, 6}. So no pair is in both, and the right side is φ too.
  3. (ii) A × C = {(1, 5), (1, 6), (2, 5), (2, 6)}. In each pair, the first element is in B (1 and 2 are in B) and the second is in D (5 and 6 are in D). So each pair is in B × D.

(i) Both sides are φ. (ii) A × C ⊂ B × D, since A ⊂ B and C ⊂ D.

Check: In general, if A ⊂ B and C ⊂ D, then A × C ⊂ B × D.

8. Let A = {1, 2} and B = {3, 4}. Write A × B. How many subsets will A × B have? List them.Tap to reveal

What we know: A set with n elements has 2ⁿ subsets.

The plan: Form A × B; then list its subsets by size.

  1. A × B = {(1, 3), (1, 4), (2, 3), (2, 4)}, which has 4 elements, so it has 2⁴ = 16 subsets.
  2. Size 0: φ. Size 1: {(1, 3)}, {(1, 4)}, {(2, 3)}, {(2, 4)}.
  3. Size 2: {(1, 3), (1, 4)}, {(1, 3), (2, 3)}, {(1, 3), (2, 4)}, {(1, 4), (2, 3)}, {(1, 4), (2, 4)}, {(2, 3), (2, 4)}.
  4. Size 3: {(1, 3), (1, 4), (2, 3)}, {(1, 3), (1, 4), (2, 4)}, {(1, 3), (2, 3), (2, 4)}, {(1, 4), (2, 3), (2, 4)}.
  5. Size 4: A × B itself.

A × B = {(1, 3), (1, 4), (2, 3), (2, 4)}, with 2⁴ = 16 subsets, listed above.

Check: 1 + 4 + 6 + 4 + 1 = 16, the number of subsets of each size added up.

9. Let A and B be two sets such that n(A) = 3 and n(B) = 2. If (x, 1), (y, 2) and (z, 1) are in A × B, find A and B, where x, y and z are distinct elements.Tap to reveal

What we know: Every first element of a pair in A × B is in A; every second element is in B.

The plan: Collect the elements we know, and count.

  1. x, y and z are in A, and they are 3 distinct elements, while n(A) = 3. So A = {x, y, z}.
  2. 1 and 2 are in B, and n(B) = 2. So B = {1, 2}.

A = {x, y, z} and B = {1, 2}.

Check: A × B then has 3 × 2 = 6 pairs, among them the three given.

10. The Cartesian product A × A has 9 elements, among which are found (−1, 0) and (0, 1). Find the set A and the remaining elements of A × A.Tap to reveal

What we know: n(A × A) = n(A)², and both places of a pair in A × A come from A.

The plan: Find n(A); then read off elements of A from the given pairs.

  1. n(A)² = 9, so n(A) = 3.
  2. From (−1, 0) and (0, 1), the numbers −1, 0 and 1 are in A. That is 3 elements, so A = {−1, 0, 1}.
  3. A × A has the 9 pairs (−1, −1), (−1, 0), (−1, 1), (0, −1), (0, 0), (0, 1), (1, −1), (1, 0), (1, 1).

A = {−1, 0, 1}; the remaining elements are (−1, −1), (−1, 1), (0, −1), (0, 0), (1, −1), (1, 0) and (1, 1).

Check: 2 given pairs + 7 remaining = 9.

When you are stuck: Exercise 2.1

Equal pairs give two equations, one for each place (Q1).

Count first: n(A × B) = n(A) × n(B) (Q2, Q8 and Q10).

Go back from pairs to sets: collect the first elements and the second elements (Q6, Q9 and Q10).

In one line

Equal ordered pairs match place by place, n(A × B) = n(A) × n(B), and a product of n elements has 2ⁿ subsets.

2.3Relations

A rule that picks out pairs

Consider the two sets P = {a, b, c} and Q = {Ali, Bhanu, Binoy, Chandra, Divya}. Their Cartesian product has 3 × 5 = 15 ordered pairs: P × Q = {(a, Ali), (a, Bhanu), (a, Binoy), ..., (c, Divya)}.

Now keep only the pairs (x, y) in which x is the first letter of the name y. Call this collection R: R = {(x, y) : x is the first letter of the name y, x ∈ P, y ∈ Q}. Testing all 15 pairs gives R = {(a, Ali), (b, Bhanu), (b, Binoy), (c, Chandra)}. R is a subset of P × Q, chosen by a rule that links the first element of each pair with the second.

A picture of R, called an arrow diagram, is shown in Figure 2.4: the elements of P and of Q are written inside two closed curves, and an arrow joins x to y for every pair (x, y) in R.

Book Figure 2.4: An arrow diagram of the relation "x is the first letter of the name y" from P = {a, b, c} to Q = {Ali, Bhanu, Binoy, Chandra, Divya} (the book labels this figure only with its number).
Relation

A relation R from a non-empty set A to a non-empty set B is a subset of the Cartesian product A × B. The subset is chosen by describing a relationship between the first element and the second element of the ordered pairs in A × B. The second element is called the image of the first element.

Examples: "x is the first letter of the name y" gives a relation from P to Q, and the image of c is Chandra. "y = x + 1" on {1, 2, 3} gives the relation {(1, 2), (2, 3)}. The empty set φ is a relation too: no pair is linked.

Domain, range and codomain

The domain of a relation R from A to B is the set of all first elements of the ordered pairs in R. The range is the set of all second elements in R. The whole set B is called the codomain. The range is always a subset of the codomain.

Examples: for the first-letter relation, the domain is {a, b, c}, the range is {Ali, Bhanu, Binoy, Chandra}, and the codomain is all of Q. Divya is in the codomain but not in the range, because no letter of P starts her name.

Two remarks. A relation can be written algebraically, either in roster form (listing its pairs) or in set-builder form (giving the rule). And an arrow diagram is a picture of a relation.

Example 7 (from the book)

Let A = {1, 2, 3, 4, 5, 6}. Define a relation R from A to A by R = {(x, y) : y = x + 1}. (i) Depict this relation using an arrow diagram. (ii) Write down the domain, codomain and range of R.

What we know: R holds the pairs of A × A whose second element is one more than the first.

What we need: The arrow diagram, and the three sets.

The plan: Test each x in A: is x + 1 also in A?

  1. x = 1 gives y = 2; x = 2 gives 3; x = 3 gives 4; x = 4 gives 5; x = 5 gives 6.
  2. x = 6 would give 7, which is not in A, so 6 has no image.
  3. So R = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)}, drawn as the arrow diagram of Figure 2.5.

Domain {1, 2, 3, 4, 5}, range {2, 3, 4, 5, 6}, codomain {1, 2, 3, 4, 5, 6}.

Check: The range {2, ..., 6} is a subset of the codomain A, as it must be. The element 1 of the codomain is never an image.

Book Figure 2.5: Example 7: the arrow diagram of R = {(x, y) : y = x + 1} on A = {1, 2, 3, 4, 5, 6} (the book labels this figure only with its number).
Book Figure 2.6: Example 8: a relation between the sets P and Q in which x is the square of y (the book labels this figure only with its number).

Example 8 (from the book)

Figure 2.6 shows a relation between the sets P and Q, in which x is the square of y. Write this relation (i) in set-builder form; (ii) in roster form. What is its domain and range?

What we know: The figure joins each x in P to the numbers y in Q whose square is x. The book's solution reads the figure as follows.

What we need: Both forms, the domain and the range.

The plan: Name the rule; then list the pairs the figure shows.

  1. (i) In set-builder form, R = {(x, y) : x is the square of y, x ∈ P, y ∈ Q}.
  2. (ii) In roster form, R = {(9, 3), (9, −3), (4, 2), (4, −2), (25, 5), (25, −5)}: each x is the square of two numbers, one positive and one negative.

The domain is {4, 9, 25} and the range is {−2, 2, −3, 3, −5, 5}.

Check: The element 1 of Q is not the image of any element of P, so it is in the codomain Q but not in the range. Every pair passes the test: 3² = (−3)² = 9, 2² = (−2)² = 4 and 5² = (−5)² = 25.

How many relations are there?

A relation from A to B is any subset of A × B. So the number of relations is the number of subsets of A × B. If n(A) = p and n(B) = q, then A × B has pq elements, and a set with pq elements has 2 to the power pq subsets.

The number of relations from A to B

Why it is true: each of the pq pairs of A × B is either in the relation or not, 2 choices for each pair, so there are 2 × 2 × ... × 2 = ways to choose a relation. One of them is φ, and one is A × B itself.

Example 9 (from the book)

Let A = {1, 2} and B = {3, 4}. Find the number of relations from A to B.

What we know: A relation from A to B is a subset of A × B.

What we need: The number of subsets of A × B.

The plan: Count the pairs of A × B; then use 2ⁿ.

  1. A × B = {(1, 3), (1, 4), (2, 3), (2, 4)}, so n(A × B) = 4.
  2. The number of subsets of A × B is 2⁴ = 16.

There are 2⁴ = 16 relations from A to B.

Check: With p = 2 and q = 2, the rule gives = 2⁴ = 16.

Worked example 10

Story: Three friends, Amit, Bela and Charu, may each join any of two clubs, Chess and Music, in any way (one club, both, or none). A record of who joined which club is a relation from the set of friends to the set of clubs. How many different records are possible?

What we know: A record is a set of pairs (friend, club), that is, a subset of F × C with n(F) = 3 and n(C) = 2.

What we need: The number of relations from F to C.

The plan: Use N = with p = 3 and q = 2.

  1. F × C has 3 × 2 = 6 pairs, such as (Amit, Chess).
  2. Each pair is either in the record or not, so N = 2⁶ = 64.

64 different records.

Check: One record is φ (nobody joins anything) and one is all of F × C (everyone joins both clubs).

Worked example 11

An arrow diagram from A = {1, 2} to B = {x, y} may use any of the possible arrows. How many arrows are possible, and how many different arrow diagrams can be drawn (counting the diagram with no arrows)?

What we know: Each possible arrow stands for one pair of A × B.

What we need: The number of possible arrows, and of diagrams.

The plan: Count the pairs; each diagram draws some of them.

  1. The possible arrows are 1 to x, 1 to y, 2 to x and 2 to y: 2 × 2 = 4 arrows.
  2. Each arrow is either drawn or not, so there are 2⁴ = 16 diagrams.

4 possible arrows and 16 arrow diagrams, one for each relation.

Check: This is the picture behind the rule N = : every relation is a choice of arrows.

Worked example 12

There are 256 relations from a set A to a set B, and n(A) = 4. Find n(B).

What we know: N = = 256 and p = 4.

What we need: q = n(B).

The plan: Write 256 as a power of 2; then compare powers.

  1. 256 = 2⁸, so = 2⁸.
  2. Equal powers of 2 have equal exponents, so 4q = 8 and q = 2.

n(B) = 2.

Check: With n(A) = 4 and n(B) = 2, there are = 2⁸ = 256 relations.

Worked example 13

Let A = {1, 2, 3, 6}. Write the relation R = {(a, b) : a, b ∈ A and a is a factor of b} in roster form, and find its domain and range.

What we know: a is a factor of b when b ÷ a leaves no remainder.

What we need: R in roster form, its domain and range.

The plan: For each a in A, list the b in A that a divides.

  1. a = 1 divides 1, 2, 3 and 6.
  2. a = 2 divides 2 and 6.
  3. a = 3 divides 3 and 6.
  4. a = 6 divides only 6.

R = {(1, 1), (1, 2), (1, 3), (1, 6), (2, 2), (2, 6), (3, 3), (3, 6), (6, 6)}; domain = range = {1, 2, 3, 6}.

Check: Every element is a factor of itself, so every (a, a) is in R and the domain is all of A.

A relation from A to A is also called a relation on A. The relation of Example 7 is a relation on {1, 2, 3, 4, 5, 6}, and the factor relation above is a relation on {1, 2, 3, 6}.

A common mistake: the range is not the codomain

The codomain is the whole second set B, given in advance. The range holds only the elements that are actually images. In Example 7, 1 is in the codomain but not in the range.

In the same way, the domain holds only the first elements that actually appear: in Example 7, the element 6 of A is not in the domain.

When you are stuck: relations

Test every pair: go through the elements of A one by one, and for each, find every element of B that the rule links to it.

Draw the arrow diagram: the domain is where arrows start, and the range is where they end.

Count with the rule: there are relations from a set of p elements to a set of q elements.

Worked example 14

Write the relation "is less than" on A = {1, 2, 3, 4} in roster form, and find its domain and range.

What we know: (a, b) is in the relation when a < b.

What we need: The pairs, the domain and the range.

The plan: For each a, list the larger elements of A.

  1. a = 1: (1, 2), (1, 3), (1, 4). a = 2: (2, 3), (2, 4). a = 3: (3, 4). a = 4: nothing is larger.

{(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}; domain {1, 2, 3}, range {2, 3, 4}.

Check: 6 pairs: the number of ways to choose 2 different elements of A, each pair written smaller first.

Worked example 15

Let A = {0, 1, 2, 3} and B = {1, 2, 3, 4}. Write R = {(x, y) : x + y = 5, x ∈ A, y ∈ B} in roster form. Does every element of A have an image under R?

What we know: For each x, y = 5 − x, and y must be in B.

What we need: The pairs, and whether every element of A is used.

The plan: Work out 5 − x for each x, keeping it only if it is in B.

  1. x = 0 gives y = 5, which is not in B: no pair.
  2. x = 1, 2, 3 give y = 4, 3, 2, all in B.

R = {(1, 4), (2, 3), (3, 2)}. No: 0 has no image, so the domain {1, 2, 3} is smaller than A.

Check: Each of 1, 2 and 3 has exactly one image. Section 2.4 gives a name to relations in which every element of the first set has exactly one image.

Your turn

Let A = {1, 2, 3} and R = {(x, y) : y = 2x, x, y ∈ A}. Find R, its domain and its range.Tap to reveal

The plan: Test x = 1, 2, 3.

  1. x = 1 gives y = 2, which is in A.
  2. x = 2 gives 4 and x = 3 gives 6, which are not in A.

R = {(1, 2)}, domain {1}, range {2}.

How many relations are there from a set of 3 elements to a set of 3 elements?Tap to reveal

The plan: Use N = .

  1. pq = 3 × 3 = 9.
  2. N = 2⁹ = 512.

512 relations.

In one line

A relation from A to B is a subset of A × B chosen by a rule. Its domain holds the first elements and its range the second elements, a subset of the codomain B; there are relations in all.

Ex 2.2Exercise 2.2, solved in full

Every answer below agrees with the book's answer key.

1. Let A = {1, 2, 3, ..., 14}. Define a relation R from A to A by R = {(x, y) : 3x − y = 0, where x, y ∈ A}. Write down its domain, codomain and range.Tap to reveal

What we know: 3x − y = 0 means y = 3x, and both x and y must be in A.

The plan: Try x = 1, 2, 3, ... while 3x is still at most 14.

  1. x = 1, 2, 3, 4 give y = 3, 6, 9, 12, all in A.
  2. x = 5 gives y = 15, which is not in A, and larger x give larger y.
  3. So R = {(1, 3), (2, 6), (3, 9), (4, 12)}.

Domain {1, 2, 3, 4}, range {3, 6, 9, 12}, codomain A = {1, 2, 3, ..., 14}.

Check: Each pair satisfies 3x − y = 0: for example, 3 × 4 − 12 = 0.

2. Define a relation R on the set N of natural numbers by R = {(x, y) : y = x + 5, x is a natural number less than 4; x, y ∈ N}. Depict this relationship using roster form. Write down the domain and the range.Tap to reveal

What we know: The natural numbers less than 4 are 1, 2 and 3.

The plan: Add 5 to each.

  1. x = 1 gives y = 6; x = 2 gives 7; x = 3 gives 8.
  2. So R = {(1, 6), (2, 7), (3, 8)}.

R = {(1, 6), (2, 7), (3, 8)}; domain {1, 2, 3}, range {6, 7, 8}.

Check: Each y is 5 more than its x, and all six numbers are natural numbers.

3. A = {1, 2, 3, 5} and B = {4, 6, 9}. Define a relation R from A to B by R = {(x, y) : the difference between x and y is odd; x ∈ A, y ∈ B}. Write R in roster form.Tap to reveal

What we know: The difference of two whole numbers is odd exactly when one is odd and the other even.

The plan: Pair each odd x with each even y, and the even x with each odd y.

  1. The odd elements of A are 1, 3 and 5; the even elements of B are 4 and 6. That gives (1, 4), (1, 6), (3, 4), (3, 6), (5, 4) and (5, 6).
  2. The even element of A is 2; the odd element of B is 9. That gives (2, 9).

R = {(1, 4), (1, 6), (2, 9), (3, 4), (3, 6), (5, 4), (5, 6)}.

Check: Test one pair: 9 − 2 = 7, which is odd. Test a pair left out: 9 − 1 = 8, which is even.

Book Figure 2.7: Exercise 2.2, Question 4: a relation between the sets P and Q (the book labels this figure only with its number).
4. Figure 2.7 shows a relationship between the sets P and Q. Write this relation (i) in set-builder form; (ii) in roster form. What is its domain and range?Tap to reveal

What we know: As the book's key reads the figure, its arrows join 5 to 3, 6 to 4 and 7 to 5.

The plan: Find the rule that takes each x to its y.

  1. Each y is 2 less than its x: 5 − 2 = 3, 6 − 2 = 4 and 7 − 2 = 5.
  2. (i) R = {(x, y) : y = x − 2 for x = 5, 6, 7}.
  3. (ii) R = {(5, 3), (6, 4), (7, 5)}.

Domain {5, 6, 7} and range {3, 4, 5}.

Check: Three arrows give three pairs, and each pair satisfies y = x − 2.

5. Let A = {1, 2, 3, 4, 6}. Let R be the relation on A defined by {(a, b) : a, b ∈ A, b is exactly divisible by a}. (i) Write R in roster form. (ii) Find the domain of R. (iii) Find the range of R.Tap to reveal

What we know: b is exactly divisible by a when b ÷ a leaves no remainder.

The plan: For each a, list the b in A that it divides.

  1. a = 1: 1, 2, 3, 4, 6. a = 2: 2, 4, 6. a = 3: 3, 6. a = 4: 4. a = 6: 6.
  2. (i) R = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 6), (2, 2), (2, 4), (2, 6), (3, 3), (3, 6), (4, 4), (6, 6)}.

(i) The 12 pairs above. (ii) Domain {1, 2, 3, 4, 6}. (iii) Range {1, 2, 3, 4, 6}.

Check: 5 + 3 + 2 + 1 + 1 = 12 pairs. Every element divides itself, so both the domain and the range are all of A.

6. Determine the domain and range of the relation R defined by R = {(x, x + 5) : x ∈ {0, 1, 2, 3, 4, 5} }.Tap to reveal

What we know: The first elements are the x; the second elements are x + 5.

The plan: List the pairs.

  1. R = {(0, 5), (1, 6), (2, 7), (3, 8), (4, 9), (5, 10)}.

Domain {0, 1, 2, 3, 4, 5} and range {5, 6, 7, 8, 9, 10}.

Check: Each element of the range is 5 more than an element of the domain.

7. Write the relation R = {(x, x³) : x is a prime number less than 10} in roster form.Tap to reveal

What we know: The primes less than 10 are 2, 3, 5 and 7.

The plan: Cube each prime.

  1. List the primes less than 10: 2, 3, 5 and 7.
  2. Cube each: 2³ = 8, 3³ = 27, 5³ = 125 and 7³ = 343.

R = {(2, 8), (3, 27), (5, 125), (7, 343)}.

Check: 1 is not a prime and 9 = 3 × 3 is not a prime, so neither appears. R has 4 pairs, one for each prime, and its domain is {2, 3, 5, 7}.

8. Let A = {x, y, z} and B = {1, 2}. Find the number of relations from A to B.Tap to reveal

What we know: There are relations from a set of p elements to a set of q elements.

The plan: Use p = 3 and q = 2.

  1. n(A × B) = 3 × 2 = 6.
  2. The number of relations is 2⁶ = 64.

2⁶ = 64 relations.

Check: The key gives 2⁶, which is 64. Listing them would be slow: they run from φ to all of A × B, and the rule counts them at once.

9. Let R be the relation on Z defined by R = {(a, b) : a, b ∈ Z, a − b is an integer}. Find the domain and range of R.Tap to reveal

What we know: The difference of two integers is always an integer.

The plan: Ask which pairs of integers pass the test.

  1. For any integers a and b, a − b is an integer, so every pair (a, b) of Z × Z is in R.
  2. So R = Z × Z, and every integer appears as a first element and as a second element.

Domain Z and range Z.

Check: For example, (5, −2) ∈ R because 5 − (−2) = 7 is an integer.

When you are stuck: Exercise 2.2

Mind the codomain: a pair counts only when its second element lies in the given set (Q1).

Sort by a property: odd and even (Q3), or divisibility (Q5), tells you which pairs to keep.

Count relations with , never by listing them (Q8).

In one line

To write a relation, test each element of the first set against the rule; the domain and range are the first and second elements that actually appear.

2.4Functions

In this section we study a special type of relation, called a function. It is one of the most important ideas in mathematics. We can picture a function as a rule which produces new elements out of some given elements, like the input-output machines of Class 9. Other words for a function are map and mapping.

Function

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. In other words, f is a relation from a non-empty set A to a non-empty set B such that the domain of f is A, and no two distinct ordered pairs in f have the same first element.

Examples: "double it" from N to N is a function, since every natural number has exactly one double. "y = x + 1" on {1, 2, 3, 4, 5, 6} is not a function, since 6 has no image there. "x is the square of y" from {4, 9} to the integers is not a function, since 9 has the two images 3 and −3.

So a function must pass two tests: every element of A has an image (nothing is left out), and no element of A has two images (nothing is doubled). Two different elements may share the same image; that is allowed.

Image and preimage

If f is a function from A to B and (a, b) ∈ f, we write f(a) = b, read "f of a equals b". Then b is the image of a under f, and a is a preimage of b under f. The function itself is written f : A → B, read "f from A to B".

Examples: if f(x) = 2x, then 10 is the image of 5, and 5 is the preimage of 10. If g(x) = x², then 4 has two preimages, 2 and −2. The element 0 is the image of 0 under both.

The earlier relations, tested

The relation in Example 7 is not a function, because the element 6 has no image. The relation in Example 8 is not a function, because some elements of the domain are joined to more than one image: 9 to both 3 and −3.

Example 9 counted all 16 relations from A = {1, 2} to B = {3, 4}. Most of them are not functions. The empty relation gives no image at all, and A × B itself gives each element two images. Only 4 of the 16 are functions: {(1, 3), (2, 3)}, {(1, 3), (2, 4)}, {(1, 4), (2, 3)} and {(1, 4), (2, 4)}. In each of these, 1 has exactly one image and so does 2.

Going further: how many functions?

To build a function from A to B, choose one image for each element of A. If n(A) = p and n(B) = q, each of the p elements has q choices, so there are q × q × ... × q = functions.

For A = {1, 2} and B = {3, 4}, that is 2² = 4, the four functions listed above. Compare this with = 16 relations: most relations are not functions.

Example 10 (from the book)

Let N be the set of natural numbers, and let R be the relation on N given by R = {(x, y) : y = 2x, x, y ∈ N}. What are the domain, codomain and range of R? Is this relation a function?

What we know: Every natural number x has the double 2x, which is again a natural number.

What we need: The three sets, and whether R is a function.

The plan: Check that every x has exactly one image.

  1. Every n ∈ N is the first element of the pair (n, 2n), so the domain is all of N.
  2. The codomain is N, as given. The images 2, 4, 6, ... are the even natural numbers, so the range is the set of even natural numbers.
  3. Each n has one and only one double, 2n.

Domain N, codomain N, range the even natural numbers; R is a function.

Check: The odd numbers are in the codomain but are not images: 3 = 2x has no natural solution x.

Example 11 (from the book)

Examine each relation and state, giving reasons, whether it is a function: (i) R = {(2, 1), (3, 1), (4, 2)}; (ii) R = {(2, 2), (2, 4), (3, 3), (4, 4)}; (iii) R = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7)}.

What we know: A relation is a function on its domain when no first element appears twice.

What we need: A verdict and a reason for each.

The plan: Look for a first element that repeats.

  1. (i) The first elements 2, 3 and 4 each appear once, so each has a unique image. Function. (3 and 2 share the image 1; that is allowed.)
  2. (ii) The first element 2 appears twice, with the different images 2 and 4. Not a function.
  3. (iii) The first elements 1 to 6 each appear once. Function.

(i) a function; (ii) not a function; (iii) a function.

Check: Our arrow diagrams below show (i) and (ii): in (ii), two arrows leave 2.

DomainRange23412
Our arrow diagram of Example 11 (i): one arrow leaves each element, so the relation is a function. Two arrows may end at the same element.
DomainRange234234
Our arrow diagram of Example 11 (ii): two arrows leave the element 2, so the relation is not a function.

A common mistake: "two arrows meet, so it is not a function"

Two arrows may end at the same element: in Example 11 (i), both 2 and 3 go to 1, and the relation is still a function.

What a function forbids is two arrows leaving the same element (as from 2 in (ii)), or an element of A with no arrow at all.

Real function

A function which has R, or one of its subsets, as its range is called a real valued function. If, in addition, its domain is R or a subset of R, it is called a real function.

Examples: f(x) = 2x + 1 from N to N is a real function, because N is a subset of R. f(x) = x² on R is a real function with range [0, ∞). The function giving each student of a class his or her height in cm is real valued, but not a real function, because its domain is a set of students.

Example 12 (from the book)

Let N be the set of natural numbers. Define a real valued function f : N → N by f(x) = 2x + 1. Using this definition, complete the table of f(1), f(2), ..., f(7).

What we know: f(x) = 2x + 1: double the input, then add 1.

What we need: The seven values.

The plan: Substitute x = 1 to 7.

  1. f(1) = 2 + 1 = 3; f(2) = 5; f(3) = 7; f(4) = 9.
  2. f(5) = 11; f(6) = 13; f(7) = 15.

The table reads 3, 5, 7, 9, 11, 13, 15 for x = 1 to 7.

Check: Each step of 1 in x adds 2 to f(x), as for any line y = 2x + 1 (Class 9, Chapter 2).

Worked example 16

Which of these relations from A = {1, 2, 3} to B = {a, b} are functions? (i) {(1, a), (2, a), (3, b)}; (ii) {(1, a), (2, b)}; (iii) {(1, a), (1, b), (2, a), (3, b)}.

What we know: A function from A must give each of 1, 2 and 3 exactly one image.

What we need: A verdict for each.

The plan: Check both tests: every element has an image, and none has two.

  1. (i) 1, 2 and 3 each have one image. Function.
  2. (ii) 3 has no image. Not a function from A.
  3. (iii) 1 has two images, a and b. Not a function.

Only (i) is a function from A to B.

Check: (ii) would be a function from the smaller set {1, 2}, which is its domain.

Worked example 17

Let f : {−2, −1, 0, 1, 2} → Z be given by f(x) = x². Write f as a set of pairs, find its range, and find the preimages of 4.

What we know: f(x) = x² gives each input its square.

What we need: The pairs, the range, and every x with f(x) = 4.

The plan: Square each input.

  1. f = {(−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4)}.
  2. The images are 4, 1, 0, 1 and 4, so the range is {0, 1, 4}.
  3. f(x) = 4 for x = 2 and x = −2.

Range {0, 1, 4}; the preimages of 4 are 2 and −2.

Check: f is still a function: each input has one square. Two inputs sharing an image is allowed.

Worked example 18

f : R → R is given by f(x) = 3x − 2. Find f(4), and find the preimage of 13.

What we know: The image of a is f(a); a preimage of b is any x with f(x) = b.

What we need: f(4), and the x with f(x) = 13.

The plan: Substitute for the image; solve an equation for the preimage.

  1. f(4) = 3 × 4 − 2 = 12 − 2 = 10.
  2. 3x − 2 = 13 gives 3x = 15, so x = 5.

f(4) = 10, and the preimage of 13 is 5.

Check: f(5) = 15 − 2 = 13.

Worked example 19

Story: A taxi in a city charges ₹50 to start and ₹15 for each kilometre. Write the fare f(d) for a ride of d km, find f(8), and find the distance for a fare of ₹230.

What we know: Fare = the starting charge + 15 times the distance.

What we need: The rule, f(8), and the d with f(d) = 230.

The plan: Write the rule; substitute; then solve backwards.

  1. f(d) = 50 + 15d, for d ≥ 0.
  2. f(8) = 50 + 15 × 8 = 50 + 120 = 170.
  3. 50 + 15d = 230 gives 15d = 180, so d = 12.

f(d) = 50 + 15d; f(8) = ₹170; a fare of ₹230 means 12 km.

Check: f(12) = 50 + 180 = 230. The fare is a function of the distance: each distance gives exactly one fare.

Worked example 20

Is "is the mother of" a function from the set M of the mothers of the students in a class to the set S of those students? Is "has as mother" a function from S to M?

What we know: A function needs exactly one image for each element of its first set.

What we need: Two verdicts.

The plan: Ask how many images each element can have.

  1. A mother may have two children in the same class, as twins do. Then she has two images, so "is the mother of" need not be a function from M to S.
  2. Each student has exactly one mother, and she is in M. So "has as mother" gives each student exactly one image: a function from S to M.

No in general for M to S; yes for S to M.

Check: Reversing a relation can change whether it is a function, because the two tests look only at the first set.

When you are stuck: functions

Run the two tests on the first elements: every element of A appears, and none appears twice.

Look at the arrows: exactly one arrow must leave each element of A; any number may arrive at an element of B.

For an image, substitute; for a preimage, solve f(x) = b.

Worked example 21

List all the functions from A = {a, b} to B = {0, 1}.

What we know: A function gives each of a and b one image, 0 or 1.

What we need: Every possible function.

The plan: Choose the image of a, then the image of b.

  1. a ↦ 0, b ↦ 0: {(a, 0), (b, 0)}.
  2. a ↦ 0, b ↦ 1: {(a, 0), (b, 1)}.
  3. a ↦ 1, b ↦ 0: {(a, 1), (b, 0)}.
  4. a ↦ 1, b ↦ 1: {(a, 1), (b, 1)}.

There are 4 functions, listed above.

Check: = 2² = 4. Read the arrow ↦ as "goes to".

Worked example 22

Is y a function of x when y = x², for real x? Is y a function of x when y² = x?

What we know: y is a function of x when each x gives exactly one y.

What we need: Two verdicts.

The plan: Test a value of x in each.

  1. y = x²: each x has exactly one square. A function.
  2. y² = x: for x = 4, both y = 2 and y = −2 satisfy y² = 4. So 4 has two values of y. Not a function.

y = x² is a function of x; y² = x is not.

Check: Drawn as a curve, y² = x is a parabola lying on its side: the points (4, 2) and (4, −2) are both on it, one above the other. Section 2.4.1 turns this into a test.

Worked example 23

Let f : Z → Z be f(x) = 2x. Does 7 have a preimage? Which integers have preimages?

What we know: A preimage of 7 is an integer x with 2x = 7.

What we need: A verdict for 7, and the set of integers with preimages.

The plan: Solve 2x = 7 in the integers; then describe all the values 2x.

  1. 2x = 7 gives x = 3.5, which is not an integer. So 7 has no preimage.
  2. The values 2x are exactly the even integers: ..., −4, −2, 0, 2, 4, ....

No; only the even integers have preimages, and they form the range of f.

Check: The codomain is Z, but the range is smaller: a function need not reach every element of its codomain.

Your turn

Is {(1, 2), (2, 2), (3, 2)} a function from {1, 2, 3} to {2}? Find its range.Tap to reveal

The plan: Check each first element.

  1. 1, 2 and 3 each have the single image 2.

Yes, a function (a constant one), with range {2}.

If f(x) = 5 − x on R, find f(−3) and the preimage of 0.Tap to reveal

The plan: Substitute; then solve.

  1. f(−3) = 5 + 3 = 8.
  2. 5 − x = 0 gives x = 5.

f(−3) = 8; the preimage of 0 is 5.

In one line

A function from A to B gives every element of A exactly one image in B; f(a) = b means b is the image of a, and two elements may share an image.

2.4.1Some functions and their graphs

A real function can be pictured. For each x in its domain, mark the point (x, f(x)) in the plane. All these points together form the graph of f. The graph shows at a glance where f is large or small, where it is zero, and how it changes.

Graph of a function

The graph of a real function f is the set of all the points (x, f(x)) of the plane, for x in the domain of f.

Examples: the graph of f(x) = 2x + 1 is the straight line through (0, 1) and (1, 3). The graph of f(x) = x² is a parabola through (−1, 1), (0, 0) and (1, 1). The point (2, 5) lies on the graph of f exactly when f(2) = 5.

The vertical line test

A function gives each x only one value. So a vertical line x = a can meet the graph of a function at most once. A curve that some vertical line meets twice is not the graph of a function.

For example, a circle is not the graph of a function: the vertical line through its centre meets it twice. Miscellaneous Exercise Q1 uses this idea.

(i) The identity function

Define the real function f : R → R by y = f(x) = x for each x ∈ R. Such a function is called the identity function: it leaves every number as it is. Its domain and range are both R. Its graph is a straight line through the origin, as shown in Figure 2.8: it passes through (−2, −2), (0, 0), (1, 1), (3, 3), and so on.

Book Figure 2.8: The graph of the identity function f(x) = x: a straight line through the origin (the book labels this figure only with its number).

(ii) The constant function

Define f : R → R by y = f(x) = c for each x ∈ R, where c is a fixed number, a constant. Such a function is called a constant function. Its domain is R and its range is the single-element set {c}. Its graph is a line parallel to the x-axis, at height c. For example, if f(x) = 3 for every x ∈ R, the graph is the line shown in Figure 2.9.

Book Figure 2.9: The graph of the constant function f(x) = 3: a line parallel to the x-axis (the book labels this figure only with its number).

(iii) Polynomial functions

A function f : R → R is a polynomial function if, for each x in R, f(x) is a polynomial in x, as in Class 9, Chapter 2:

A polynomial function

Here n is a non-negative integer, and the coefficients a₀, a₁, a₂, ..., aₙ are real numbers. Read a₀ as "a nought" and aₙ as "a n". Every power of x must be a whole number.

The functions f(x) = x³ − x² + 2 and g(x) = x⁴ + √2 x are polynomial functions. But h(x) = + 2x is not a polynomial function. Here means the cube root of x², a power of x that is not a whole number, and a polynomial allows only whole-number powers.

Example 13 (from the book)

Define the function f : R → R by y = f(x) = x², x ∈ R. Complete a table of f(x) for x = −4, −3, ..., 4. What is the domain and range of this function? Draw the graph of f.

What we know: f squares each input, and a square is never negative.

What we need: The table, the domain and range, and the graph.

The plan: Square each x; then read off the domain and range.

  1. x = −4, −3, −2, −1, 0, 1, 2, 3, 4 give f(x) = 16, 9, 4, 1, 0, 1, 4, 9, 16.
  2. Every real number can be squared, so the domain of f is {x : x ∈ R}.
  3. The squares are exactly the real numbers that are not negative: any y ≥ 0 is the square of √y. So the range is {x² : x ∈ R} = [0, ∞).
  4. Plotting the points and joining them with a smooth curve gives the parabola of Figure 2.10.

Domain R, range [0, ∞), the real numbers that are not negative; the graph is the parabola of Figure 2.10.

Check: The table is the same for x and −x, because (−x)² = x². So the graph is the same on both sides of the y-axis.

Book Figure 2.10: Example 13: the graph of f(x) = x² (the book labels this figure only with its number).

Example 14 (from the book)

Draw the graph of the function f : R → R defined by f(x) = x³, x ∈ R.

What we know: A cube keeps the sign of the number.

What we need: Some points, and the graph.

The plan: Work out a few values, then join them smoothly.

  1. f(0) = 0, f(1) = 1, f(−1) = −1, f(2) = 8, f(−2) = −8, f(3) = 27, f(−3) = −27, and so on.
  2. So f = {(x, x³) : x ∈ R}, and its graph is the curve of Figure 2.11.

The graph rises from the bottom left, through (−1, −1), (0, 0) and (1, 1), to the top right (Figure 2.11).

Check: Unlike x², the cube of a negative number is negative, so this graph goes below the x-axis on the left. Its range is all of R.

Book Figure 2.11: Example 14: the graph of f(x) = x³ (the book labels this figure only with its number).

Worked example 24

Find the domain and the range of (a) f(x) = 7; (b) f(x) = 2x − 3; (c) f(x) = x² + 1, each defined for all real x.

What we know: A polynomial can be computed for every real x, so each domain is R.

What we need: The three ranges.

The plan: Ask which values each function can take.

  1. (a) f(x) = 7 for every x, so the range is {7}.
  2. (b) For any real y, x = (y + 3)/2 gives 2x − 3 = y, so every real number is a value: the range is R.
  3. (c) x² ≥ 0, so x² + 1 ≥ 1. Every y ≥ 1 is a value, at x = √(y − 1). The range is [1, ∞).

Each domain is R; the ranges are {7}, R and [1, ∞).

Check: (c) at x = 0 gives 1, the smallest value, and x = 3 gives 10, which is in [1, ∞).

Worked example 25

Does the point (2, 6) lie on the graph of f(x) = x³ − x² + 2? Find the point of the graph with x = 1.

What we know: (a, b) lies on the graph of f exactly when f(a) = b.

What we need: A verdict, and the point at x = 1.

The plan: Substitute x = 2, then x = 1.

  1. f(2) = 8 − 4 + 2 = 6, so (2, 6) lies on the graph.
  2. f(1) = 1 − 1 + 2 = 2, so the point is (1, 2).

Yes, (2, 6) is on the graph; the point at x = 1 is (1, 2).

Check: f(0) = 2 as well, so the graph passes through (0, 2) and (1, 2) at the same height.

When you are stuck: graphs of functions

Make a table of a few values, including negative x and x = 0, then plot and join smoothly.

Use symmetry: if f(−x) = f(x), as for x², the graph is the same on both sides of the y-axis.

Test a point (a, b) by checking whether f(a) = b.

Worked example 26

Make a table of f(x) = 3 − x for x = −1, 0, 1, 2, 3, describe its graph, and find where it meets the x-axis.

What we know: f is a linear function: f(x) = mx + c with m = −1 and c = 3.

What we need: The table, the shape, and the crossing point.

The plan: Substitute; then solve f(x) = 0.

  1. The values are 4, 3, 2, 1 and 0.
  2. Each step of 1 to the right lowers f by 1, so the graph is a straight line falling to the right.
  3. f(x) = 0 when 3 − x = 0, that is, x = 3.

Values 4, 3, 2, 1, 0; a falling straight line meeting the x-axis at (3, 0).

Check: It meets the y-axis at (0, 3), since f(0) = 3.

Worked example 27

Use the graph of f(x) = x² (Figure 2.10) to answer: which x give f(x) = 9? Which give f(x) = 0? Does any x give a negative value?

What we know: The graph is the set of points (x, x²).

What we need: Three answers.

The plan: Read heights off the parabola, and check with algebra.

  1. Height 9 is reached at x = 3 and x = −3, since 3² = (−3)² = 9.
  2. Height 0 only at x = 0, the lowest point.
  3. The parabola never dips below the x-axis, since a square is never negative.

x = 3 or −3; only x = 0; no negative values.

Check: So the range of x² is [0, ∞), as Example 13 found.

Your turn

Is f(x) = 4x⁵ − x + √3 a polynomial function? Is g(x) = 1/x + x?Tap to reveal

The plan: Check that every power of x is a whole number.

  1. f has the powers 5, 1 and 0 of x.
  2. g has 1/x, which is x to the power −1, not a whole number.

f is a polynomial function; g is not.

What is the range of the constant function f(x) = −2, and what does its graph look like?Tap to reveal

The plan: A constant function takes one value.

  1. Every x gives −2.

Range {−2}; the graph is the line y = −2, parallel to the x-axis.

In one line

The graph of f is the set of points (x, f(x)); the identity is the line y = x, a constant function is a line parallel to the x-axis, and polynomial functions are defined for every real x.

2.4.1More functions: rational, modulus, signum and greatest integer

(iv) Rational functions

A rational function is a function of the form f(x)/g(x), where f(x) and g(x) are polynomial functions of x, defined where g(x) ≠ 0. Dividing by zero is impossible, so every x that makes the bottom zero is left out of the domain.

Example 15 (from the book)

Define the real valued function f : R − {0} → R by f(x) = 1/x, x ∈ R − {0}. Complete a table for x = −2, −1.5, −1, −0.5, 0.25, 0.5, 1, 1.5, 2. What is the domain and range of this function?

What we know: 1/x is the reciprocal of x, defined for every x except 0.

What we need: The table, the domain and range.

The plan: Divide 1 by each x; then think about which values 1/x can take.

  1. The values are −0.5, −0.67, −1, −2, 4, 2, 1, 0.67 and 0.5 (0.67 is 2/3 rounded).
  2. The domain is all real numbers except 0.
  3. 1/x is never 0, since 1 divided by any number is not 0. Every other real y is a value, at x = 1/y. So the range is also all real numbers except 0.

Domain R − {0} and range R − {0}; the graph is the curve of Figure 2.12.

Check: Small inputs give large outputs: 1/0.25 = 4. That is why the graph climbs steeply near the y-axis.

Book Figure 2.12: Example 15: the graph of f(x) = 1/x, for x ≠ 0 (the book labels this figure only with its number).

(v) The modulus function

The function f : R → R defined by f(x) = |x| for each x ∈ R is called the modulus function: it gives the absolute value of Class 9. For a non-negative x, f(x) equals x. For a negative x, f(x) is the negative of x, which is positive.

The modulus function

Read |x| aloud as "the modulus of x" (or "mod x"). The brace means: use the top line when x ≥ 0, and the bottom line when x is negative. Its domain is R and its range is [0, ∞).

The graph of the modulus function is a V with its corner at the origin, shown in Figure 2.13.

Book Figure 2.13: The graph of the modulus function f(x) = |x| (the book labels this figure only with its number).

(vi) The signum function

The function f : R → R that tells only the sign of a number is called the signum function (signum is Latin for "sign"):

The signum function

The domain of the signum function is R and its range is the set {−1, 0, 1}. For x ≠ 0, it equals |x|/x: for example |−5|/(−5) = −1.

Book Figure 2.14: The graph of the signum function (the book labels this figure only with its number).

(vii) The greatest integer function

The function f : R → R defined by f(x) = [x] takes the value of the greatest integer less than or equal to x. Such a function is called the greatest integer function. From the definition of [x], we can see that [x] = −1 for −1 ≤ x < 0, [x] = 0 for 0 ≤ x < 1, [x] = 1 for 1 ≤ x < 2, [x] = 2 for 2 ≤ x < 3, and so on.

The greatest integer function

Read [x] aloud as "the greatest integer in x". On each stretch from an integer n up to the next one, [x] stays at n, so the graph is a staircase (Figure 2.15). Its range is Z.

Book Figure 2.15: The graph of the greatest integer function f(x) = [x] (the book labels this figure only with its number).

Worked example 28

Find [2.7], [−1.5], [5] and [−0.01].

What we know: [x] is the greatest integer that is not more than x.

What we need: Four values.

The plan: Find the two consecutive integers around each number, and take the lower one.

  1. 2.7 lies between 2 and 3, so [2.7] = 2.
  2. −1.5 lies between −2 and −1, so [−1.5] = −2.
  3. 5 is an integer, so [5] = 5.
  4. −0.01 lies between −1 and 0, so [−0.01] = −1.

2, −2, 5 and −1.

Check: For negative numbers, [x] is not just "x with the decimals dropped": dropping the decimals of −1.5 gives −1, but −1 is more than −1.5.

A common mistake: [x] for negative x

[−1.5] is −2, not −1, because −2 is the greatest integer that does not exceed −1.5. Always picture the number line: go left from x to the nearest integer.

Worked example 29

Story: Riya's age is 15.8 years. In completed years, her age is the greatest integer function of her exact age. What is it? For which exact ages is the completed age 15?

What we know: Completed years = [exact age].

What we need: [15.8], and every exact age a with [a] = 15.

The plan: Use the definition of [x] both ways.

  1. [15.8] = 15.
  2. [a] = 15 exactly when 15 ≤ a < 16.

Her completed age is 15. It stays 15 from her 15th birthday until just before her 16th: 15 ≤ a < 16.

Check: On her 16th birthday, a = 16 and [16] = 16.

Worked example 30

Find the domain of (a) f(x) = 1/(x − 3); (b) g(x) = √(x + 2); (c) h(x) = (x + 1)/(x² − 9).

What we know: A denominator cannot be 0, and a real square root needs a number that is not negative.

What we need: Three domains.

The plan: Leave out the x that break a rule.

  1. (a) x − 3 = 0 when x = 3, so the domain is R − {3}.
  2. (b) x + 2 ≥ 0 when x ≥ −2, so the domain is [−2, ∞).
  3. (c) x² − 9 = (x − 3)(x + 3) = 0 when x = 3 or x = −3, so the domain is R − {−3, 3}.

(a) R − {3}; (b) [−2, ∞); (c) R − {−3, 3}.

Check: g(−2) = √0 = 0 is allowed, so −2 belongs to the domain of g.

When you are stuck: special functions

Write the pieces: for |x| and the signum function, decide first whether x is positive, zero or negative.

For [x], picture the number line and step left to the nearest integer.

For a domain, remove every x that makes a denominator 0 or puts a negative number under a square root.

Worked example 31

Solve |x − 3| = 2, and explain the answer as a distance.

What we know: |x − 3| is the distance between x and 3 on the number line.

What we need: Every x at distance 2 from 3.

The plan: Step 2 to the right of 3, and 2 to the left.

  1. To the right: 3 + 2 = 5.
  2. To the left: 3 − 2 = 1.

x = 1 or x = 5.

Check: |1 − 3| = |−2| = 2 and |5 − 3| = 2.

Worked example 32

Let s(x) be the signum function. Show that s(x) × |x| = x for every real x.

What we know: s(x) is 1, 0 or −1 by the sign of x.

What we need: A check of all three cases.

The plan: Take the cases one at a time.

  1. x > 0: s(x) = 1 and |x| = x, so the product is x.
  2. x = 0: s(0) = 0, so the product is 0 = x.
  3. x < 0: s(x) = −1 and |x| = −x, so the product is (−1)(−x) = x.

In every case, s(x) × |x| = x.

Check: For x = −4: s = −1 and |x| = 4, and (−1) × 4 = −4.

Worked example 33

Find the domain of f(x) = √(4 − x) + 1/(x + 1).

What we know: The square root needs 4 − x ≥ 0; the fraction needs x + 1 ≠ 0.

What we need: Every x meeting both conditions.

The plan: Solve each condition; then keep the x that satisfy both.

  1. 4 − x ≥ 0 means x ≤ 4.
  2. x + 1 ≠ 0 means x ≠ −1.
  3. So x can be any number up to 4 except −1.

The domain is (−∞, −1) ∪ (−1, 4].

Check: f(0) = √4 + 1 = 3 is defined; f(5) is not, since 4 − 5 < 0; and f(−1) is not, since it divides by 0.

Worked example 34

Find [x] + [−x] for x = 2.5 and for x = 3. What is it in general?

What we know: [x] is the greatest integer not more than x.

What we need: Two values, and a general rule.

The plan: Work out each bracket; then compare integers with non-integers.

  1. [2.5] = 2 and [−2.5] = −3, so the sum is −1.
  2. [3] = 3 and [−3] = −3, so the sum is 0.
  3. For an integer x, the sum is x + (−x) = 0. For any other x, [−x] is one less than −[x], so the sum is −1.

−1 for x = 2.5 and 0 for x = 3: in general, 0 when x is an integer, and −1 otherwise.

Check: Test x = 1.25: [1.25] = 1 and [−1.25] = −2, so the sum is −1.

Your turn

Find |−7|, the signum of −7, and [−7].Tap to reveal

The plan: Use each definition.

  1. |−7| = 7.
  2. −7 is negative, so its signum is −1.
  3. −7 is an integer, so [−7] = −7.

7, −1 and −7.

Find the domain of f(x) = 5/(2x − 1).Tap to reveal

The plan: Exclude the zero of the denominator.

  1. 2x − 1 = 0 when x = 1/2.

R − {1/2}.

In one line

Rational functions leave out the zeros of their denominators; |x| gives the distance from 0, the signum function gives the sign (1, 0 or −1), and [x] steps down to the nearest integer that is not more than x.

2.4.2Algebra of real functions

Numbers can be added, subtracted, multiplied and divided. So can real functions: we do the operation to their values, one x at a time. In this section, f and g are real functions with the same domain X, a subset of R.

The algebra of real functions

Each line holds for every x in X. Read α as "alpha": here it is a scalar, which means a real number. The product fg is also called pointwise multiplication, because it multiplies the values point by point.

The quotient leaves out every x with g(x) = 0, because division by zero is impossible.

Here is the same thing in words. (i) Addition: (f + g)(x) is f(x) plus g(x). (ii) Subtraction: (f − g)(x) is f(x) minus g(x). (iii) Multiplication by a scalar: (αf)(x) is α times f(x). (iv) Multiplication: (fg)(x) is f(x) times g(x). (v) Quotient: (f/g)(x) is f(x) divided by g(x), provided g(x) ≠ 0.

Worked example 35

For f(x) = x² and g(x) = 2x + 1, make a table of f(x), g(x) and (f + g)(x) for x = −2, −1, 0, 1, 2.

What we know: (f + g)(x) = f(x) + g(x): add the two values in each column.

What we need: The table.

The plan: Work out f(x) and g(x) for each x, then add.

  1. x = −2: f = 4, g = −3, f + g = 1.
  2. x = −1: f = 1, g = −1, f + g = 0.
  3. x = 0: f = 0, g = 1, f + g = 1.
  4. x = 1: f = 1, g = 3, f + g = 4.
  5. x = 2: f = 4, g = 5, f + g = 9.

(f + g)(x) takes the values 1, 0, 1, 4, 9 at x = −2, −1, 0, 1, 2.

Check: These are the squares of x + 1, because x² + 2x + 1 = (x + 1)²: for example, at x = 2, (2 + 1)² = 9.

Example 16 (from the book)

Let f(x) = x² and g(x) = 2x + 1 be two real functions. Find (f + g)(x), (f − g)(x), (fg)(x) and (f/g)(x).

What we know: Each operation works on the values f(x) and g(x).

What we need: The four new functions.

The plan: Combine the two formulas, simplifying each.

  1. (f + g)(x) = x² + 2x + 1.
  2. (f − g)(x) = x² − (2x + 1) = x² − 2x − 1.
  3. (fg)(x) = x²(2x + 1) = 2x³ + x².
  4. (f/g)(x) = x²/(2x + 1), which needs 2x + 1 ≠ 0, that is, x ≠ −1/2.

x² + 2x + 1, x² − 2x − 1, 2x³ + x², and x²/(2x + 1) for x ≠ −1/2.

Check: At x = 1: f(1) = 1 and g(1) = 3, so the four values are 4, −2, 3 and 1/3, and each formula gives the same.

Example 17 (from the book)

Let f(x) = √x and g(x) = x be two functions defined over the set of non-negative real numbers. Find (f + g)(x), (f − g)(x), (fg)(x) and (f/g)(x).

What we know: √x is defined for x ≥ 0, and √x × √x = x. A square root can be written as a power: √x = , read "x to the power one half". This fits the law aᵐ × aⁿ = , because × = = x¹ = x. In the same way, 1/√x = .

What we need: The four new functions.

The plan: Combine; write powers of x where it helps.

  1. (f + g)(x) = √x + x.
  2. (f − g)(x) = √x − x.
  3. (fg)(x) = √x × x = × x¹ = = .
  4. (f/g)(x) = √x / x = 1/√x = , which needs x ≠ 0.

√x + x, √x − x, , and for x ≠ 0.

Check: At x = 4: √4 = 2, so the four values are 6, −2, 8 and 1/2; and = 8 and = 1/2.

Worked example 36

Story: A shop sells x lamps a month at ₹40 each, so its revenue is R(x) = 40x. Its cost is C(x) = 25x + 300 (₹25 for each lamp and ₹300 of rent). Find the profit function P = R − C, and the number of lamps at which the shop breaks even.

What we know: (R − C)(x) = R(x) − C(x). Breaking even means a profit of 0.

What we need: P(x), and the x with P(x) = 0.

The plan: Subtract the functions; then solve P(x) = 0.

  1. P(x) = 40x − (25x + 300) = 15x − 300.
  2. 15x − 300 = 0 gives x = 20.

P(x) = 15x − 300; the shop breaks even at 20 lamps.

Check: At 50 lamps, P(50) = 750 − 300 = ₹450 of profit; at 0 lamps, P(0) = −₹300, the rent alone.

Worked example 37

With f(x) = x² and g(x) = 2x + 1, find (3f)(2) and (f/g)(3). For which x is f/g not defined?

What we know: (3f)(x) = 3 × f(x), and (f/g)(x) = f(x)/g(x) where g(x) ≠ 0.

What we need: Two values, and the excluded x.

The plan: Substitute; then solve g(x) = 0.

  1. (3f)(2) = 3 × f(2) = 3 × 4 = 12.
  2. (f/g)(3) = f(3)/g(3) = 9/7.
  3. g(x) = 0 when 2x + 1 = 0, that is, x = −1/2.

(3f)(2) = 12, (f/g)(3) = 9/7, and f/g is undefined at x = −1/2.

Check: The domain of f/g is R − {−1/2}, which is smaller than the common domain R of f and g.

A common mistake: the quotient's domain

(f/g)(x) needs g(x) ≠ 0, even when the formula seems to simplify. For f(x) = x and g(x) = x, (f/g)(x) = 1, but only for x ≠ 0.

When you are stuck: the algebra of functions

Work value by value: (f + g)(x) is just f(x) + g(x), so substitute first if a formula is confusing.

Bracket g(x) when subtracting: x² − (2x + 1) = x² − 2x − 1.

For a quotient, solve g(x) = 0 and remove those x.

Worked example 38

Let f(x) = √x and g(x) = √(4 − x). Find the domain of f + g, and find (f + g)(1).

What we know: f + g is defined where both f and g are.

What we need: The common domain, and one value.

The plan: Find each domain; keep their common part.

  1. f needs x ≥ 0; g needs x ≤ 4.
  2. Both hold for 0 ≤ x ≤ 4.
  3. (f + g)(1) = √1 + √3 = 1 + √3.

Domain [0, 4]; (f + g)(1) = 1 + √3, about 2.73.

Check: The domain of a sum is the intersection of the two domains: [0, ∞) ∩ (−∞, 4] = [0, 4].

Worked example 39

Story: After t months, Amit has saved A(t) = 1000 + 200t rupees and Bina has saved B(t) = 2000 + 100t rupees. Find (A − B)(t). When do they have equal savings?

What we know: (A − B)(t) = A(t) − B(t).

What we need: The difference function, and the t where it is 0.

The plan: Subtract; then solve.

  1. (A − B)(t) = 1000 + 200t − 2000 − 100t = 100t − 1000.
  2. 100t − 1000 = 0 gives t = 10.

(A − B)(t) = 100t − 1000; equal savings after 10 months.

Check: A(10) = 3000 = B(10). After that, Amit is ahead: at t = 12, he has ₹200 more.

Your turn

If f(x) = x + 2 and g(x) = x − 2, find (fg)(x) and (f + g)(x).Tap to reveal

The plan: Multiply and add the formulas.

  1. (fg)(x) = (x + 2)(x − 2) = x² − 4.
  2. (f + g)(x) = 2x.

x² − 4 and 2x.

For the same f and g, where is f/g undefined?Tap to reveal

The plan: Solve g(x) = 0.

  1. x − 2 = 0 when x = 2.

At x = 2.

In one line

Functions are added, subtracted, scaled, multiplied and divided value by value: (f + g)(x) = f(x) + g(x), and so on, with g(x) ≠ 0 for a quotient.

Ex 2.3Exercise 2.3, solved in full

Every answer below agrees with the book's answer key.

1. Which of the following relations are functions? Give reasons. If it is a function, determine its domain and range. (i) {(2, 1), (5, 1), (8, 1), (11, 1), (14, 1), (17, 1)}. (ii) {(2, 1), (4, 2), (6, 3), (8, 4), (10, 5), (12, 6), (14, 7)}. (iii) {(1, 3), (1, 5), (2, 5)}.Tap to reveal

What we know: A relation is a function when no first element appears with two different second elements.

The plan: Look for a repeated first element.

  1. (i) The first elements 2, 5, 8, 11, 14 and 17 are all different. A function; every element has the image 1.
  2. (ii) The first elements 2, 4, ..., 14 are all different. A function; each x has the image x/2.
  3. (iii) The first element 1 appears with 3 and with 5. Not a function.

(i) Yes: domain {2, 5, 8, 11, 14, 17}, range {1}. (ii) Yes: domain {2, 4, 6, 8, 10, 12, 14}, range {1, 2, 3, 4, 5, 6, 7}. (iii) No.

Check: (i) is a constant function: six inputs, one output.

2. Find the domain and range of the following real functions: (i) f(x) = −|x|; (ii) f(x) = √(9 − x²).Tap to reveal

What we know: |x| can be found for every real x and is never negative. A real square root needs a number that is not negative.

The plan: Find where each formula works, then which values it takes.

  1. (i) Every real x has a modulus, so the domain is R. |x| ≥ 0, so −|x| ≤ 0, and every number y ≤ 0 is a value (at x = y). The range is (−∞, 0].
  2. (ii) We need 9 − x² ≥ 0, that is, x² ≤ 9, so −3 ≤ x ≤ 3. Then 9 − x² runs from 0 (at x = ±3) up to 9 (at x = 0), so √(9 − x²) runs from 0 to 3.

(i) Domain R, range (−∞, 0]. (ii) Domain {x : −3 ≤ x ≤ 3}, range {x : 0 ≤ x ≤ 3}.

Check: Our graphs below show both: the upside-down V never rises above 0, and the half circle stays between heights 0 and 3.

−4−224−4−2Oxyy = −|x|
Our graph for Q2 (i): y = −|x| is an upside-down V. Its highest point is the origin, so the range is (−∞, 0].
−3−2−112312Oxyy = √(9 − x²)
Our graph for Q2 (ii): y = √(9 − x²) is the upper half of a circle of radius 3, from x = −3 to 3, and from height 0 up to 3.
3. A function f is defined by f(x) = 2x − 5. Write down the values of (i) f(0); (ii) f(7); (iii) f(−3).Tap to reveal

What we know: Substitute each value for x.

The plan: Double, then subtract 5.

  1. (i) f(0) = 2 × 0 − 5 = 0 − 5 = −5.
  2. (ii) f(7) = 2 × 7 − 5 = 14 − 5 = 9.
  3. (iii) f(−3) = 2 × (−3) − 5 = −6 − 5 = −11.

(i) −5; (ii) 9; (iii) −11.

Check: f is a linear function with slope 2, so from x = 0 to x = 7 it rises by 2 × 7 = 14, and −5 + 14 = 9.

4. The function t which maps temperature in degrees Celsius into temperature in degrees Fahrenheit is defined by t(C) = 9C/5 + 32. Find (i) t(0); (ii) t(28); (iii) t(−10); (iv) the value of C, when t(C) = 212.Tap to reveal

What we know: t(C) = 9C/5 + 32: multiply by 9/5, then add 32.

The plan: Substitute for (i) to (iii); solve an equation for (iv).

  1. (i) t(0) = 0 + 32 = 32.
  2. (ii) t(28) = 9 × 28/5 + 32 = 252/5 + 160/5 = 412/5, which is 82.4.
  3. (iii) t(−10) = −90/5 + 32 = −18 + 32 = 14.
  4. (iv) 9C/5 + 32 = 212 gives 9C/5 = 180, so C = 180 × 5/9 = 100.

(i) 32; (ii) 412/5 = 82.4; (iii) 14; (iv) C = 100.

Check: (i) and (iv) are the familiar facts that water freezes at 0 °C = 32 °F and boils at 100 °C = 212 °F.

40100100200OCt(−40, −40)(0, 32)(100, 212)
Our graph for Q4: the line t = 9C/5 + 32, with the freezing point (0, 32), the boiling point (100, 212), and (−40, −40), where both scales agree.
5. Find the range of each of the following functions. (i) f(x) = 2 − 3x, x ∈ R, x > 0. (ii) f(x) = x² + 2, x a real number. (iii) f(x) = x, x a real number.Tap to reveal

What we know: The range is the set of values the function actually takes.

The plan: Ask which values each formula can give on its domain.

  1. (i) For x > 0, 3x > 0, so 2 − 3x < 2. Every y < 2 is a value, at x = (2 − y)/3, which is positive. The range is (−∞, 2).
  2. (ii) x² ≥ 0, so x² + 2 ≥ 2, and every y ≥ 2 is a value, at x = √(y − 2). The range is [2, ∞).
  3. (iii) The identity function takes every real value. The range is R.

(i) (−∞, 2); (ii) [2, ∞); (iii) R.

Check: In (i), 2 itself is not a value, because it would need x = 0, which is not allowed. Our graphs below show (i) and (ii).

2−4−22Oxyy = 2 − 3x, x > 0
Our graph for Q5 (i): the ray y = 2 − 3x for x > 0 starts at a hollow dot at (0, 2), because x = 0 is not allowed. Every value is below 2.
−2−11246Oxy(0, 2)y = x² + 2
Our graph for Q5 (ii): y = x² + 2 is the parabola y = x² raised by 2. Its lowest point is (0, 2), so the range is [2, ∞).

When you are stuck: Exercise 2.3

Repeated first element means "not a function" (Q1).

Range: find the smallest or largest value first (a square is at least 0), then check that every value beyond it is reached (Q2 and Q5).

Solve backwards for an input: set t(C) = 212 and solve for C (Q4).

In one line

To find a range, find what the function can never be (such as negative, for a square) and then check that every other value is reached by some x of the domain.

MiscMiscellaneous examples

These examples bring the chapter's ideas together: a graph, the properties of a relation, finding a function from its pairs, a domain, and a function made of pieces.

Example 18 (from the book)

Let R be the set of real numbers. Define the real function f : R → R by f(x) = x + 10, and sketch the graph of this function.

What we know: f adds 10 to every input.

What we need: Some points, and the graph.

The plan: Make a short table, plot, and join.

  1. f(0) = 10, f(1) = 11, f(2) = 12, ..., f(10) = 20.
  2. f(−1) = 9, f(−2) = 8, ..., f(−10) = 0.
  3. The points lie on one straight line, shown in Figure 2.16.

The graph is the straight line through (0, 10) and (−10, 0), rising 1 for each step of 1 to the right.

Check: Each step of 1 in x adds exactly 1 to f(x), which is why the points lie on a straight line.

Book Figure 2.16: Example 18: the graph of f(x) = x + 10 (the book labels this figure only with its number).
Linear function

A function f defined by f(x) = mx + c, x ∈ R, where m and c are constants, is called a linear function. Its graph is a straight line, with slope m, crossing the y-axis at (0, c).

Examples: f(x) = x + 10 is a linear function with m = 1 and c = 10. The identity function f(x) = x is a linear function with m = 1 and c = 0. The temperature function t(C) = 9C/5 + 32 is a linear function with m = 9/5 and c = 32.

Example 19 (from the book)

Let R be a relation from Q to Q defined by R = {(a, b) : a, b ∈ Q and a − b ∈ Z}. Show that (i) (a, a) ∈ R for all a ∈ Q; (ii) (a, b) ∈ R implies (b, a) ∈ R; (iii) (a, b) ∈ R and (b, c) ∈ R imply (a, c) ∈ R.

What we know: (a, b) ∈ R exactly when the difference a − b is an integer.

What we need: Three proofs, each for all rational numbers.

The plan: Write each difference using differences we already know are integers.

  1. (i) a − a = 0, and 0 ∈ Z. So (a, a) ∈ R, for every a.
  2. (ii) If (a, b) ∈ R, then a − b is an integer. Then b − a = −(a − b) is also an integer, so (b, a) ∈ R.
  3. (iii) If (a, b) and (b, c) are in R, then a − b and b − c are integers. Then a − c = (a − b) + (b − c) is a sum of two integers, an integer. So (a, c) ∈ R.

All three hold: (a, a) ∈ R; (a, b) ∈ R ⇒ (b, a) ∈ R; (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R.

Check: A test: (5/2, 1/2) ∈ R since 5/2 − 1/2 = 2; (1/2, −3/2) ∈ R since the difference is 2; and (5/2, −3/2) ∈ R since 5/2 + 3/2 = 4.

Example 20 (from the book)

Let f = {(1, 1), (2, 3), (0, −1), (−1, −3)} be a linear function from Z into Z. Find f(x).

What we know: A linear function has the form f(x) = mx + c.

What we need: m and c.

The plan: Use two of the pairs to find m and c; check the others.

  1. (0, −1) ∈ f gives f(0) = c = −1.
  2. (1, 1) ∈ f gives f(1) = m + c = 1, so m = 1 + 1 = 2.

f(x) = 2x − 1.

Check: f(2) = 4 − 1 = 3 and f(−1) = −2 − 1 = −3, matching the other two pairs.

Example 21 (from the book)

Find the domain of the function f(x) = (x² + 3x + 5)/(x² − 5x + 4).

What we know: A rational function is defined wherever its denominator is not zero.

What we need: The domain.

The plan: Factorise the denominator and find its zeros.

  1. x² − 5x + 4 = (x − 4)(x − 1).
  2. This is zero at x = 4 and at x = 1, and nowhere else.

The domain is R − {1, 4}.

Check: At x = 1 the denominator is 1 − 5 + 4 = 0; at x = 0 it is 4, so 0 belongs to the domain.

Example 22 (from the book)

The function f is defined by f(x) = 1 − x for x < 0, f(x) = 1 for x = 0, and f(x) = x + 1 for x > 0. Draw the graph of f(x).

What we know: Each piece of the formula is used on its own part of the number line.

What we need: Points from each piece, and the graph.

The plan: Tabulate each piece separately.

  1. For x < 0, f(x) = 1 − x: f(−4) = 5, f(−3) = 4, f(−2) = 3, f(−1) = 2.
  2. For x = 0, f(0) = 1.
  3. For x > 0, f(x) = x + 1: f(1) = 2, f(2) = 3, f(3) = 4, f(4) = 5.

The graph is a V with its corner at (0, 1): two rays rising from (0, 1), one to the left and one to the right (Figure 2.17).

Check: This f equals |x| + 1 for every x: for example, |−4| + 1 = 5 = f(−4).

Book Figure 2.17: Example 22: the graph of the function defined in three pieces (the book labels this figure only with its number).

When you are stuck: the miscellaneous examples

Linear function from pairs: f(0) gives c at once; one more pair gives m.

Properties of a relation: rewrite the new difference (b − a, or a − c) using the differences you know.

A function in pieces: tabulate each piece on its own stretch, then join.

Worked example 40

Find the linear function f with f(1) = 5 and f(3) = 11.

What we know: f(x) = mx + c.

What we need: m and c.

The plan: The change in f divided by the change in x gives m.

  1. m = (11 − 5)/(3 − 1) = 6/2 = 3.
  2. f(1) = 3 + c = 5, so c = 2.

f(x) = 3x + 2.

Check: f(3) = 9 + 2 = 11.

Worked example 41

Test the relation "is less than or equal to" on N, written a ≤ b, for the three properties of Example 19.

What we know: The properties are: every (a, a) is in R; (a, b) in R gives (b, a) in R; (a, b) and (b, c) in R give (a, c) in R.

What we need: Three verdicts.

The plan: Prove the true ones; find a counterexample for a false one.

  1. a ≤ a for every a: the first property holds.
  2. 2 ≤ 3, but 3 ≤ 2 is false: the second fails.
  3. a ≤ b and b ≤ c give a ≤ c: the third holds.

Yes, no, yes.

Check: Compare Example 19, where all three hold for "a − b is an integer".

Your turn

A linear function has f(0) = 4 and f(2) = 10. Find f(x).Tap to reveal

The plan: c = f(0); then use f(2).

  1. c = 4.
  2. 2m + 4 = 10 gives m = 3.

f(x) = 3x + 4.

Find the domain of f(x) = (x + 1)/(x² − x − 6).Tap to reveal

The plan: Factorise the denominator.

  1. x² − x − 6 = (x − 3)(x + 2), zero at 3 and −2.

R − {−2, 3}.

In one line

A linear function f(x) = mx + c has a straight-line graph; a rational function leaves out the zeros of its denominator; and a function in pieces is graphed piece by piece.

Misc ExMiscellaneous Exercise on Chapter 2, solved in full

Every answer below agrees with the book's answer key where the key gives one.

1. The relation f is defined by f(x) = x² for 0 ≤ x ≤ 3 and f(x) = 3x for 3 ≤ x ≤ 10. The relation g is defined by g(x) = x² for 0 ≤ x ≤ 2 and g(x) = 3x for 2 ≤ x ≤ 10. Show that f is a function and g is not a function.Tap to reveal

What we know: Where two pieces overlap, at one shared x, both pieces give a value. A function needs these values to be equal.

The plan: Compare the two pieces at the shared point.

  1. For f, the pieces share x = 3. There x² = 9 and 3x = 9: the same value. So every x from 0 to 10 has exactly one image, and f is a function.
  2. For g, the pieces share x = 2. There x² = 4 but 3x = 6: two different values. So 2 has two images, 4 and 6, and g is not a function.

f is a function (both pieces give 9 at x = 3); g is not (it gives 4 and 6 at x = 2).

Check: Our graph of g shows the vertical line x = 2 meeting it twice, which the vertical line test forbids.

246810612182430Oxy(2, 4)(2, 6)y = 3x
Our graph for Q1: the vertical line x = 2 meets the graph of g twice, at (2, 4) and (2, 6). So g gives 2 two images, and g is not a function.
2. If f(x) = x², find (f(1.1) − f(1))/(1.1 − 1).Tap to reveal

What we know: f(1.1) = 1.1² = 1.21 and f(1) = 1.

The plan: Substitute, then divide.

  1. f(1.1) = 1.1 × 1.1 = 1.21, and f(1) = 1.
  2. f(1.1) − f(1) = 1.21 − 1 = 0.21.
  3. 1.1 − 1 = 0.1.
  4. 0.21 ÷ 0.1 = 2.1.

2.1

Check: This is the slope of the chord of y = x² from (1, 1) to (1.1, 1.21). Chapter 12 shrinks such chords to find the slope at a point.

3. Find the domain of the function f(x) = (x² + 2x + 1)/(x² − 8x + 12).Tap to reveal

What we know: The denominator must not be zero.

The plan: Factorise the denominator.

  1. Look for two numbers with product 12 and sum −8: they are −2 and −6.
  2. So x² − 8x + 12 = (x − 2)(x − 6).
  3. It is zero at x = 2 and x = 6.

The domain is R − {2, 6}, all real numbers except 6 and 2.

Check: The numerator (x + 1)² does not matter for the domain: a zero on top is allowed.

4. Find the domain and the range of the real function f defined by f(x) = √(x − 1).Tap to reveal

What we know: A real square root needs a number that is not negative, and is itself never negative.

The plan: Find where x − 1 ≥ 0; then the values.

  1. x − 1 ≥ 0 when x ≥ 1, so the domain is [1, ∞).
  2. √(x − 1) ≥ 0, and every y ≥ 0 is a value, at x = y² + 1. So the range is [0, ∞).

Domain [1, ∞), range [0, ∞).

Check: f(5) = 2 and f(10) = 3: our graph below passes through (5, 2) and (10, 3).

12510123Oxyy = √(x − 1)
Our graph for Q4: y = √(x − 1) starts at (1, 0), passes through (5, 2) and (10, 3), and keeps rising: domain [1, ∞), range [0, ∞).
5. Find the domain and the range of the real function f defined by f(x) = |x − 1|.Tap to reveal

What we know: |x − 1| exists for every real x and is never negative.

The plan: Domain first; then find the smallest value.

  1. Every real x has |x − 1|, so the domain is R.
  2. |x − 1| ≥ 0, with 0 at x = 1, and every y ≥ 0 is a value, at x = 1 + y.

Domain R, range [0, ∞), the non-negative real numbers.

Check: |x − 1| is the distance from x to 1 on the number line, which can be any number that is not negative.

−2−112323Oxyy = |x − 1|
Our graph for Q5: y = |x − 1| is the V of y = |x| moved 1 to the right. Its lowest point is (1, 0), so the range is [0, ∞).
6. Let f = {(x, x²/(1 + x²)) : x ∈ R} be a function from R into R. Determine the range of f.Tap to reveal

What we know: x² ≥ 0, and the bottom 1 + x² is always bigger than the top x².

The plan: Compare the top with the bottom.

  1. The value is 0 at x = 0, and it is never negative.
  2. x² < 1 + x², so the fraction is always less than 1.
  3. Every y with 0 ≤ y < 1 is a value: solve x² = y(1 + x²) to get x² = y/(1 − y), which is possible when y < 1.

The range is [0, 1).

Check: x = 1 gives 1/2, and x = 3 gives 9/10: close to 1 but below it, as our graph shows.

−4−224Oxyy = x²/(1 + x²)y = 1
Our graph for Q6: y = x²/(1 + x²) starts at 0 and creeps up towards the dashed line y = 1, but never reaches it. The range is [0, 1).
7. Let f, g : R → R be defined by f(x) = x + 1 and g(x) = 2x − 3. Find f + g, f − g and f/g.Tap to reveal

What we know: Combine the values; the quotient needs g(x) ≠ 0.

The plan: Add, subtract and divide the formulas.

  1. (f + g)(x) = x + 1 + 2x − 3 = 3x − 2.
  2. (f − g)(x) = x + 1 − (2x − 3) = −x + 4.
  3. (f/g)(x) = (x + 1)/(2x − 3), which needs 2x − 3 ≠ 0, that is, x ≠ 3/2.

(f + g)(x) = 3x − 2, (f − g)(x) = −x + 4, (f/g)(x) = (x + 1)/(2x − 3) for x ≠ 3/2.

Check: At x = 0: f = 1 and g = −3, so f + g = −2, f − g = 4 and f/g = −1/3; the formulas agree.

8. Let f = {(1, 1), (2, 3), (0, −1), (−1, −3)} be a function from Z to Z defined by f(x) = ax + b, for some integers a and b. Determine a and b.Tap to reveal

What we know: Each pair (x, y) gives an equation y = ax + b.

The plan: Use x = 0 first, then x = 1.

  1. Each pair has the form (x, ax + b).
  2. (0, −1): a × 0 + b = −1, so b = −1.
  3. (1, 1): a + b = 1, so a = 1 + 1 = 2.

a = 2 and b = −1.

Check: 2 × 2 − 1 = 3 and 2 × (−1) − 1 = −3: the other two pairs fit.

9. Let R be a relation from N to N defined by R = {(a, b) : a, b ∈ N and a = b²}. Are the following true? (i) (a, a) ∈ R for all a ∈ N. (ii) (a, b) ∈ R implies (b, a) ∈ R. (iii) (a, b) ∈ R and (b, c) ∈ R imply (a, c) ∈ R. Justify your answer in each case.Tap to reveal

What we know: (a, b) ∈ R means a is the square of b. One counterexample is enough to show a claim false.

The plan: Test each claim with small squares.

  1. (i) (2, 2) would need 2 = 2² = 4. False, so (i) does not hold for all a (it holds only for a = 1).
  2. (ii) (4, 2) ∈ R, since 4 = 2². But (2, 4) would need 2 = 16. False.
  3. (iii) (16, 4) ∈ R and (4, 2) ∈ R. But (16, 2) would need 16 = 2² = 4. False.

(i) No; (ii) No; (iii) No.

Check: Each answer rests on one example where the claim fails, which is enough to show that it is not true for all natural numbers.

10. Let A = {1, 2, 3, 4}, B = {1, 5, 9, 11, 15, 16} and f = {(1, 5), (2, 9), (3, 1), (4, 5), (2, 11)}. Are the following true? (i) f is a relation from A to B. (ii) f is a function from A to B. Justify your answer in each case.Tap to reveal

What we know: A relation from A to B is any subset of A × B; a function also needs one image for each element.

The plan: Check each pair; then look for a repeated first element.

  1. (i) Every first element is in A and every second element is in B, so f ⊂ A × B: a relation.
  2. (ii) The first element 2 appears twice, with 9 and with 11. So 2 has two images, and f is not a function.

(i) Yes, f is a relation from A to B. (ii) No, f is not a function.

Check: 1 and 4 share the image 5; that is allowed. It is the two images of 2 that break the rule.

11. Let f be the subset of Z × Z defined by f = {(ab, a + b) : a, b ∈ Z}. Is f a function from Z to Z? Justify your answer.Tap to reveal

What we know: f is a function only if each first element has just one second element.

The plan: Find two choices of a and b with the same product but different sums.

  1. a = 1, b = 2 give the pair (2, 3).
  2. a = −1, b = −2 give the pair (2, −3).
  3. So the element 2 has two images, 3 and −3.

No, f is not a function.

Check: Another way: a = 0 gives the pairs (0, b) for every integer b, so 0 has infinitely many images.

12. Let A = {9, 10, 11, 12, 13} and let f : A → N be defined by f(n) = the highest prime factor of n. Find the range of f.Tap to reveal

What we know: Factorise each number into primes.

The plan: Take the largest prime factor of each.

  1. 9 = 3 × 3 gives 3; 10 = 2 × 5 gives 5; 11 is prime, giving 11.
  2. 12 = 2 × 2 × 3 gives 3; 13 is prime, giving 13.

The range of f is {3, 5, 11, 13}.

Check: 9 and 12 share the image 3, so the range has 4 elements, not 5.

When you are stuck: the Miscellaneous Exercise

Pieces that meet: check the shared point in both formulas (Q1).

Domain: leave out the zeros of a denominator (Q3) and the x that make a square root's inside negative (Q4).

Is it a function? Find one first element with two images (Q10 and Q11).

In one line

A domain removes what cannot be computed, a range is found from the smallest or largest value and what is reached, and one element with two images is enough to show a relation is not a function.

MixMixed practice

These ten problems mix the ideas of the whole chapter. Three of them (C, F and I) cannot be answered as asked: spotting why is part of the exercise.

A. Let A = {1, 2} and B = {x, y, z}. Find n(A × B), n(B × A), the number of relations from A to B, and the number of functions from A to B.Tap to reveal

What we know: n(A × B) = n(A) × n(B); there are relations; a function gives each element of A one of the n(B) images.

What we need: Four numbers.

The plan: Use each counting rule in turn.

  1. n(A × B) = 2 × 3 = 6, and n(B × A) = 3 × 2 = 6.
  2. Relations: = 2⁶ = 64.
  3. Functions: 1 has 3 choices of image and so has 2, so 3 × 3 = 3² = 9.

6, 6, 64 and 9.

Check: Only 9 of the 64 relations are functions, as the count = 3² shows.

B. A student says that {(1, 2), (2, 3), (1, 4)} is a function from {1, 2} to {2, 3, 4}, "because every element of {1, 2} has an image". Find the mistake.Tap to reveal

What we know: A function needs every element to have exactly one image.

What we need: The flaw in the reasoning.

The plan: Run both tests.

  1. A path that fails: checking only that every element has an image. Here 1 and 2 do have images, so the first test passes.
  2. But 1 has two images, 2 and 4, so the second test fails.

It is not a function: the element 1 has two images.

Check: Removing (1, 4) would give the function {(1, 2), (2, 3)}.

C. f is a function from R to R with f(2) = 5. Find f(3).Tap to reveal

What we know: A function can follow any rule.

What we need: f(3).

The plan: Ask whether one value fixes another.

  1. f(x) = x + 3 gives f(2) = 5 and f(3) = 6.
  2. f(x) = 5 for every x gives f(2) = 5 and f(3) = 5.
  3. f(x) = x² + 1 gives f(2) = 5 and f(3) = 10.

It cannot be found as asked: we need the rule of f (or more information, such as "f is linear" and a second value).

Check: Three different functions agree at 2 and disagree at 3, which settles it.

D. Find the domain and the range of f(x) = (x + 3)/(x − 1).Tap to reveal

What we know: The denominator must not be 0.

What we need: The domain and the range.

The plan: Rewrite f(x) to see which values it can take.

  1. x − 1 = 0 at x = 1, so the domain is R − {1}.
  2. (x + 3)/(x − 1) = ((x − 1) + 4)/(x − 1) = 1 + 4/(x − 1).
  3. 4/(x − 1) takes every real value except 0, so f(x) takes every real value except 1.

Domain R − {1}, range R − {1}.

Check: f(5) = 8/4 = 2 and f(−3) = 0, both in the range; f(x) = 1 would need 4/(x − 1) = 0, which never happens.

E. Story: A parking lot charges ₹20 for each full hour and nothing for a part of an hour, so the fee for t hours is 20 × [t]. Find the fee for 3.5 hours and for 0.9 hours. For which times t is the fee ₹40?Tap to reveal

What we know: [t] is the number of full hours.

What we need: Two fees, and the t with 20[t] = 40.

The plan: Use the greatest integer function both ways.

  1. [3.5] = 3, so the fee is ₹60.
  2. [0.9] = 0, so the fee is ₹0.
  3. 20[t] = 40 gives [t] = 2, that is, 2 ≤ t < 3.

₹60 and ₹0; the fee is ₹40 for 2 ≤ t < 3 hours.

Check: At t = 3 exactly, [3] = 3 and the fee jumps to ₹60: the graph is a staircase.

F. R is a relation from a set A to a set B, and R has 5 ordered pairs. Find n(A).Tap to reveal

What we know: A relation can be any subset of A × B.

What we need: n(A).

The plan: Ask what the pairs reveal about A.

  1. The pairs show only the domain, the elements of A that appear. A may have more elements, with no pairs.
  2. Even the domain is unknown: 5 pairs can have anything from 1 to 5 different first elements.

It cannot be found as asked: we need A itself, or at least the pairs of R.

Check: For A = {1} and B = {1, 2, 3, 4, 5}, R = A × B has 5 pairs; for A = {1, 2, 3, 4, 5, 6}, R = {(1, 1), (2, 1), (3, 1), (4, 1), (5, 1)} also has 5.

G. Let f(x) = 2x + 3 and g(x) = x². Find (f + g)(1), (fg)(−1) and (f/g)(2). Where is f/g undefined?Tap to reveal

What we know: Work value by value; the quotient needs g(x) ≠ 0.

What we need: Three values and the excluded x.

The plan: Substitute first, then combine.

  1. f(1) = 5 and g(1) = 1, so (f + g)(1) = 6.
  2. f(−1) = 1 and g(−1) = 1, so (fg)(−1) = 1.
  3. f(2) = 7 and g(2) = 4, so (f/g)(2) = 7/4.
  4. g(x) = 0 only at x = 0.

6, 1 and 7/4; f/g is undefined at x = 0.

Check: (f/g)(x) = (2x + 3)/x², which has no value at 0.

H. A student writes [−2.5] = −2 and |−4| = −4. Correct both.Tap to reveal

What we know: [x] is the greatest integer not more than x; |x| is never negative.

What we need: The correct values.

The plan: Picture the number line.

  1. A path that fails: dropping the decimals of −2.5 gives −2, but −2 is more than −2.5. Stepping left from −2.5, the nearest integer is −3.
  2. |−4| is the distance of −4 from 0, which is 4.

[−2.5] = −3 and |−4| = 4.

Check: [x] ≤ x always: −3 ≤ −2.5. And |x| ≥ 0 always.

I. The graph of a function passes through the point (1, 2). Is the function f(x) = 2x?Tap to reveal

What we know: Many graphs pass through one point.

What we need: A verdict.

The plan: Look for two different functions through (1, 2).

  1. f(x) = 2x passes through (1, 2).
  2. So do g(x) = x + 1 and h(x) = 2, which are different functions.

It cannot be decided as asked: one point does not fix a function. We need the rule, or more points (two points fix a linear function).

Check: f(2) = 4 but g(2) = 3 and h(2) = 2: the three functions agree only at x = 1.

J. Let f : {1, 2, 3, 4} → {1, 4, 9, 16} be f(x) = x². Is f a function? Is every element of the codomain an image?Tap to reveal

What we know: Each input has exactly one square.

What we need: Two verdicts.

The plan: List the pairs.

  1. f = {(1, 1), (2, 4), (3, 9), (4, 16)}: each input has one image, so f is a function.
  2. The images 1, 4, 9 and 16 are all four elements of the codomain.

Yes, f is a function, and yes, its range equals its codomain {1, 4, 9, 16}.

Check: On {−2, −1, 0, 1, 2}, by contrast, x² would give two inputs the same image, and that is still allowed.

When you are stuck: mixed practice

Name the idea first: a count (n(A × B), ), a test (is it a function?), or a calculation (an image, a domain).

Check that the data are enough before calculating: C, F and I cannot be done as asked.

Picture it: an arrow diagram for a relation, a graph for a real function.

In one line

Count pairs, relations and functions with n(A) × n(B), and ; test a function by its arrows; and make sure the data fix the answer before computing.

RecapThe whole chapter on one screen

  • Ordered pair: a pair of elements grouped together in a particular order.
  • Cartesian product A × B of two sets A and B: A × B = {(a, b) : a ∈ A, b ∈ B}. In particular, R × R = {(x, y) : x, y ∈ R} and R × R × R = {(x, y, z) : x, y, z ∈ R}.
  • If (a, b) = (x, y), then a = x and b = y.
  • If n(A) = p and n(B) = q, then n(A × B) = pq. Also A × φ = φ, and in general A × B ≠ B × A.
  • Relation: a relation R from a set A to a set B is a subset of the Cartesian product A × B. It is obtained by describing a relationship between the first element x and the second element y of the ordered pairs in A × B.
  • The image of an element x under a relation R is y, where (x, y) ∈ R.
  • The domain of R is the set of all first elements of the ordered pairs in R; the range is the set of all second elements.
  • There are relations from a set of p elements to a set of q elements.
  • Function: a function f from a set A to a set B is a special relation in which every element x of A has one and only one image y in B. We write f : A → B, where f(x) = y. A is the domain and B the codomain of f, and the range of f is the set of images.
  • A real function has the set of real numbers, or one of its subsets, both as its domain and as its range.
  • Algebra of functions: for f : X → R and g : X → R, (f + g)(x) = f(x) + g(x), (f − g)(x) = f(x) − g(x), (f.g)(x) = f(x).g(x), (kf)(x) = k(f(x)) for a real number k, and (f/g)(x) = f(x)/g(x) where g(x) ≠ 0.
FunctionRuleDomainRange
Identityf(x) = xRR
Constantf(x) = cR{c}
Polynomiala₀ + a₁x + ... + aₙxⁿRdepends on f
Rationalf(x)/g(x)R without the zeros of gdepends
Modulus|x|R[0, ∞)
Signum1, 0 or −1 by the sign of xR{−1, 0, 1}
Greatest integer[x]RZ

WordsWords to know

Ordered pair
(a, b): two elements in a fixed order.
Ordered triplet
(a, b, c): three elements in a fixed order.
Cartesian product
A × B: all the pairs (a, b) with a ∈ A and b ∈ B.
Relation
A subset of A × B, chosen by a rule.
Arrow diagram
A picture of a relation, with an arrow for each pair.
Image, preimage
In (a, b), b is the image of a, and a a preimage of b.
Domain
The set of the first elements of a relation.
Range
The set of the second elements, or images.
Codomain
The whole second set B, of which the range is a subset.
Function
A relation giving every element of A exactly one image.
Real function
A function with domain and range inside R.
Graph of a function
The set of points (x, f(x)).
Identity function
f(x) = x.
Constant function
f(x) = c, the same value for every x.
Polynomial function
f(x) = a₀ + a₁x + ... + aₙxⁿ.
Rational function
f(x)/g(x) with polynomials f and g, where g(x) ≠ 0.
Modulus function
f(x) = |x|, the distance of x from 0.
Signum function
1, 0 or −1, by the sign of x.
Greatest integer function
[x], the greatest integer not more than x.
Linear function
f(x) = mx + c, whose graph is a straight line.

CheckQuick self-check

When are (a, b) and (x, y) equal?Answer

When a = x and b = y.

If n(A) = 4 and n(B) = 3, find n(A × B).Answer

12.

Is A × B = B × A in general?Answer

No, though both have the same number of elements.

What is A × φ?Answer

φ, the empty set.

What is a relation from A to B?Answer

A subset of A × B.

How many relations are there from a set of 2 elements to a set of 2 elements?Answer

2⁴ = 16.

Is {(1, 2), (1, 3)} a function?Answer

No: 1 has two images.

Is {(1, 5), (2, 5)} a function?Answer

Yes: two elements may share an image.

If f(x) = 3x + 1, find f(2).Answer

7.

What is the domain of f(x) = 1/x?Answer

R − {0}.

What is the range of f(x) = x²?Answer

[0, ∞).

Find [3.9] and [−3.9].Answer

3 and −4.

What is the range of the signum function?Answer

{−1, 0, 1}.

If f(x) = x and g(x) = x + 1, find (fg)(x).Answer

x² + x.

Where is (f/g)(x) undefined?Answer

Wherever g(x) = 0.

PDF