The identity and constant functions
Most rules do something to their input. What do the two laziest rules look like, the one that hands back exactly what it was given and the one that hands back the same number whatever it was given?
Where you are 3 in Parent functions
Why this exists
A function is a rule that takes an input and hands back exactly one output, as relations and functions sets out. Most rules do some work: double the input, add 3, square it. Two rules sit right at the bottom, doing the least a rule can do. One hands back exactly what it was given. The other ignores what it was given and always hands back the same number.
The first is the “do nothing” of functions, playing the part that 0 plays for adding and 1 for multiplying, the identity elements. Its graph, the line y = x, is the parent that every other line is a tilted and lifted copy of, and the mirror that swaps inputs with outputs. The second is the flat line. It settles a question that tables keep raising: may different inputs share an output? They may, and a constant function is the extreme case, where every input shares one.
Definition
The identity function hands back its input unchanged. For every real number x,
A constant function hands back one fixed number c for every input. For every real number x,
Both accept every real number as an input, so each has all real numbers as its domain, unless a situation limits the inputs. Their ranges, the sets of outputs they actually produce, are very different. The identity function produces every real number, since any number r comes out when r goes in. A constant function produces only c, so its range is the set with one member, written \{c\}.
Intuition
A photocopier set to 100\% behaves like the identity function. A drawing 15 centimeters wide goes in, and a copy 15 centimeters wide comes out; whatever width goes in, the same width comes out. A table for f(x) = x shows the same thing: the bottom row repeats the top row.
| x | -4 | -2 | 0 | 1 | 3 |
|---|---|---|---|---|---|
| f(x) | -4 | -2 | 0 | 1 | 3 |
Each column becomes a point with two equal coordinates, (a, a), and all of them lie on one straight line through the origin. Moving 1 to the right adds 1 to the input, so it adds 1 to the output too: the line rises 1 for every 1 across, which is a Slope of 1. On a grid with the same scale on both axes, that is the diagonal through the corners of the squares.
A subscription box sold at one fixed price behaves like a constant function: whatever goes into the box, the month’s charge is the same. A table for g(x) = 3 has a bottom row that never moves.
| x | -4 | -1 | 2 | 4 |
|---|---|---|---|---|
| g(x) | 3 | 3 | 3 | 3 |
Every point sits at height 3, so the graph is the horizontal line 3 units above the x-axis. Moving to the right changes the input but not the output: the rise is always 0, so the slope is 0.
Both rules are straight lines, so both are linear functions, of the form y = mx + b described in slope-intercept form. The identity is y = 1x + 0, with m = 1 and b = 0. The constant function is y = 0x + c, with m = 0 and b = c.
Results
The identity function. f(x) = x has domain all real numbers and range all real numbers. Its graph is the line y = x: every point (a, a), a line through the origin with slope 1. It is the linear function with m = 1 and b = 0.
A constant function. g(x) = c has domain all real numbers and range \{c\}. Its graph is the horizontal line y = c, which crosses the y-axis at (0, c) and has slope 0. It is the linear function with m = 0 and b = c. When c = 0 the graph is the x-axis itself.
Function or not. Every constant function is a function: each input has exactly one output, and nothing forbids inputs from sharing it. A vertical line x = k is not the graph of a function: the one input k is paired with every real number, which is what the vertical line test detects.
The mirror. Swapping the two coordinates of a point (a, b) gives (b, a), its reflection in the line y = x. A point with a = b lies on the line and stays where it is.
Why it is true
The identity graph is a line with slope 1. Take any two different points on the graph, (a, a) and (d, d). The slope between them is
The same slope between every pair of points means the points lie on one straight line, and (0, 0) is one of them, since f(0) = 0.
Its range is every real number. Pick any number r. The input r gives the output f(r) = r, so r is reached. Nothing is missed.
The constant graph is a horizontal line. Any two different points on it are (a, c) and (d, c), and the slope between them is
Slope 0 everywhere means a horizontal line, and (0, c) is on it. The only output ever produced is c, and it is produced (by the input 0, for one), so the range is exactly \{c\}.
Why swapping is reflecting. For a \ne b, the segment from (a, b) to (b, a) has slope -1, so it meets the slope-1 line y = x at 90^\circ, and its halfway point \displaystyle \left(\frac{a + b}{2}, \frac{a + b}{2}\right) lies on that line; a line crossing a segment square on at its halfway point is the mirror that carries one end to the other, just as in reflecting over an axis.
Worked examples
Evaluating the identity and testing points
Let f(x) = x. (a) Find f(-7), \displaystyle f\left(\frac{2}{3}\right), \displaystyle f(\sqrt{5}) and f(a + 1). (b) Which of the points (6, 6), (-2, 2), (0.4, 0.4) and (5, -5) lie on the graph of f?
Solution(a) The rule says the output is whatever was put in, so
For f(a + 1) the whole expression a + 1 is the input, as in evaluating a function at an expression, so it is also the output: f(a + 1) = a + 1.
(b) A point (x, y) is on the graph exactly when y = f(x), which here means y = x: the two coordinates must be equal. So (6, 6) and (0.4, 0.4) are on the graph. (-2, 2) is not, since f(-2) = -2, not 2; and (5, -5) is not, since f(5) = 5.
A constant function from table to graph
Let g(x) = -3. (a) Make a table for the inputs -5, 0, 2 and 10. (b) Give the domain and range. (c) Find the slope between two points of the graph, and describe the graph.
Solution(a) The rule has no x in it to substitute into, so every input gives -3.
| x | -5 | 0 | 2 | 10 |
|---|---|---|---|---|
| g(x) | -3 | -3 | -3 | -3 |
(b) Any real number may be put in, so the domain is all real numbers. Only -3 ever comes out, so the range is \{-3\}.
(c) Take (-5, -3) and (10, -3) from the table:
The graph is the horizontal line y = -3, three units below the x-axis. It crosses the y-axis at (0, -3) and never crosses the x-axis, because the output is never 0. In slope-intercept form it is y = 0x - 3: m = 0 and b = -3.
Identity or constant in disguise
Simplify each rule to the form y = mx + b. Then say whether it is the identity function, a constant function, or neither.
(a) y = 3(x + 2) - 2x - 6 \qquad (b) y = 4x - 2(2x - 3) \qquad (c) y = x(x + 1) - x^2 \qquad (d) y = 2x - (x - 1)
Solution(a) Multiply out with the distributive property, then collect like terms: 3x + 6 - 2x - 6 = x. So y = x, with m = 1 and b = 0: the identity function.
(b) -2(2x - 3) = -4x + 6, so y = 4x - 4x + 6 = 6. The x terms cancel, leaving m = 0 and b = 6: a constant function.
(c) x(x + 1) = x^2 + x, so y = x^2 + x - x^2 = x. The squared terms cancel: the identity function, even though the rule started with a square in it.
(d) Subtracting the bracket subtracts each term: 2x - x + 1 = x + 1. So y = x + 1, with m = 1 and b = 1: neither. The slope matches the identity’s, but the graph is the line y = x lifted one unit.
A constant function and its swapped partner
Decide whether each table describes a function.
| x | -2 | 0 | 1 | 3 |
|---|---|---|---|---|
| y | 5 | 5 | 5 | 5 |
Table P (above), and Table Q, which is Table P with each input and output swapped:
| x | 5 | 5 | 5 | 5 |
|---|---|---|---|---|
| y | -2 | 0 | 1 | 3 |
Table P: each input appears once, and all four share the output 5, which is allowed. Table P is a function, the constant function h(x) = 5 on these four inputs, lying on the line y = 5.
Table Q: the single input 5 appears with four different outputs. Table Q is not a function. Its points lie on the vertical line x = 5, which fails the vertical line test.
Swapping coordinates reflects in y = x, so swapping a constant function’s inputs and outputs always gives a vertical line, never a function. A vertical line has no slope at all: its run is 0, and division by 0 is not defined.
The line y = x as a mirror
Show that the line y = x passes through the halfway point of the segment from (1, 4) to (4, 1) and crosses it square on. Do the same for (-2, 3) and (3, -2).
SolutionFrom (1, 4) to (4, 1) is 3 to the right and 3 down. Half of that lands on (2.5, 2.5), whose coordinates are equal, so the halfway point is on y = x. The segment’s slope is \displaystyle \frac{-3}{3} = -1: it falls at 45^\circ while y = x climbs at 45^\circ, so they meet at 90^\circ.
From (-2, 3) to (3, -2) is 5 right and 5 down. Halfway is (0.5, 0.5), again on y = x, and the slope is again \displaystyle \frac{-5}{5} = -1. So each point of a pair is the reflection of the other in y = x.
A copier and a subscription box
(a) Elspeth sets a photocopier to 100\% and copies a drawing w centimeters wide. The copier takes paper up to 21 cm wide. Write the copy’s width C(w) as a function, give its domain and range, find C(14.8), and say what copying the copy does. (b) Dov’s snack subscription box costs 19 dollars a month however many snacks it holds, and a box holds from 4 to 9 snacks. Write the month’s charge B(n) for a box of n snacks, give its domain and range, and describe its graph. (c) Is the total T(m) Dov pays over m months also a constant function?
Solution(a) The copy is exactly as wide as the original, so C(w) = w, the identity rule. The situation limits the inputs to widths from 0 to 21 cm, so the domain is 0 < w \le 21, and since every output equals its input the range is the same set. C(14.8) = 14.8 cm. Copying the copy gives C(C(w)) = C(w) = w: doing nothing twice is still doing nothing.
(b) The charge does not depend on n, so B(n) = 19. A box holds a whole number of snacks from 4 to 9, so the domain is \{4, 5, 6, 7, 8, 9\} and the range is \{19\}. The graph is six separate dots in a row at height 19, not a solid line, because a box cannot hold 5.5 snacks.
(c) No. One month costs 19, two cost 38, three cost 57: the total changes with m, so T(m) = 19m, a linear function with slope 19. The charge is constant in the number of snacks, not in the number of months.
Boundaries
A rule that gives x almost everywhere is not the identity. The rule \displaystyle y = \frac{x^2}{x} gives x for every x \ne 0, but at x = 0 it asks for \displaystyle \frac{0}{0}, which is undefined. Its domain leaves out 0, so its graph is the line y = x with the origin missing, drawn with an open circle. A function is its rule together with its domain, so a different domain makes a different function.
Constant means constant on the whole domain. A function that equals 3 for x \le 0 and x + 3 for x > 0 is flat for a stretch and then climbs. It is not a constant function. And a vertical line x = 5 is not one either: it fixes the input, not the output.
The 45^\circ picture needs equal scales. The slope of y = x is 1 on any grid, but the line only looks like the diagonal of the squares when one unit across and one unit up are drawn the same length. If each square counts 2 across and 1 up, one square across is two squares up, so the same line looks steeper.
Where this goes next
Multiplying the identity’s output by m tilts the line y = x, and adding b lifts it, which gives y = mx + b, the family studied in linear functions. The other parent functions, such as the squaring and cubing functions, are each the plainest member of their family in the same way.
The identity’s job as the “do nothing” returns in combining and composing functions: doing f and then the identity, or the identity and then f, is just doing f. Swapping inputs and outputs, the reflection in y = x, leads to inverse functions, where a function and its inverse undo each other to give back the identity. A constant function has no inverse: its swapped partner is the vertical line of Example 4.
Exercises
Evaluating
- Let f(x) = x. Find f(-9), f(0.35), \displaystyle f\left(-\frac{4}{7}\right) and f(\pi).
- Let g(x) = -6. Find g(0), g(-6), g(11) and \displaystyle g\left(\frac{1}{2}\right).
- Let f(x) = x. Find f(2t - 5), f(f(8)) and f(3) + f(-3).
Points, graphs, domain and range
- Which of these points lie on the graph of f(x) = x? (7, 7), (-3, 3), (0, 0), \displaystyle \left(\frac{1}{2}, 0.5\right), (2, -2).
- Which of these points lie on the graph of g(x) = -6? (0, -6), (-6, 0), (100, -6), (-6, -6).
- The graph of a constant function passes through (8, -1). Write the function, find its value at -20, and give its y-intercept.
- Give the domain and range of (a) f(x) = x, (b) g(x) = 9, (c) the identity rule used only on the inputs -1, 0, 1 and 2.
As linear functions
- Simplify, then say whether each is the identity function, a constant function or neither. (a) y = 5(x - 1) - 4x + 5 (b) y = 3(2 - x) + 3x (c) y = 2(x + 3) - x (d) \displaystyle y = \frac{6x - 6}{6} + 1
- The rule y = (k - 2)x + (k - 3) depends on a number k. Find the k that makes it the identity function, and the k that makes it a constant function, naming that constant.
Function or not, and the mirror
- Is each a function? (a) y = -2.5 (b) x = -2.5 (c) \{(1, 4), (2, 4), (3, 4)\} (d) \{(4, 1), (4, 2), (4, 3)\}
- Reflect each point in the line y = x: (2, 7), (-5, 1), (6, 6), (0, -3).
- Swap the input and output of every point on the graph of g(x) = 2. What graph results, and is it the graph of a function?
In context
- Osric copies a photo 12.5 cm wide on a photocopier set to 100\%, then copies the copy. How wide is each copy, and what is the rule? He then switches to 200\%: is the new rule still the identity?
- Amaryllis’s craft subscription box costs 22 dollars a month for any box holding 3 to 8 items. Write the month’s charge B(n) for a box of n items, with its domain and range. Then write the total T(m) paid over m months, find T(5), and say whether T is constant.
Reasoning
- Hartwin says g(x) = 7 cannot be a function, because every input gives the same output. Explain what is wrong with his reasoning, and describe a graph that really does fail to be a function.
- Fintan says that if a linear function f(x) = mx + b has f(0) = 0 and f(1) = 1, it must be the identity function. Prove that he is right.
Answers
- f(-9) = -9, f(0.35) = 0.35, \displaystyle f\left(-\frac{4}{7}\right) = -\frac{4}{7}, f(\pi) = \pi.
- All four are -6: \displaystyle g(0) = g(-6) = g(11) = g\left(\frac{1}{2}\right) = -6. The rule ignores the input, even when the input happens to be -6.
- f(2t - 5) = 2t - 5. f(8) = 8, so f(f(8)) = f(8) = 8. f(3) + f(-3) = 3 + (-3) = 0.
- (7, 7), (0, 0) and \displaystyle \left(\frac{1}{2}, 0.5\right), since \displaystyle \frac{1}{2} = 0.5. The other two have unequal coordinates.
- (0, -6), (100, -6) and (-6, -6). Not (-6, 0), since g(-6) = -6.
- Every output equals the output at 8, so the function is g(x) = -1. Then g(-20) = -1, and the y-intercept is (0, -1).
- (a) Domain and range all real numbers. (b) Domain all real numbers, range \{9\}. (c) Domain \{-1, 0, 1, 2\}, range \{-1, 0, 1, 2\}: the outputs are the inputs.
- (a) 5x - 5 - 4x + 5 = x: the identity. (b) 6 - 3x + 3x = 6: constant, output 6. (c) 2x + 6 - x = x + 6: neither (slope 1, but lifted 6). (d) x - 1 + 1 = x: the identity.
- The identity needs k - 2 = 1 and k - 3 = 0; both give k = 3. A constant function needs k - 2 = 0, so k = 2, and then y = 0x + (2 - 3), the constant function y = -1.
- (a) Yes, a constant function. (b) No: the input -2.5 has every real number as an output. (c) Yes: three inputs share the output 4, which is allowed. (d) No: the input 4 has three outputs.
- (7, 2), (1, -5), (6, 6) (on the line, so it stays), (-3, 0).
- Every point (x, 2) becomes (2, x), so the result is the vertical line x = 2. It is not the graph of a function: the input 2 has every real number as an output.
- Both copies are 12.5 cm wide; the rule is C(w) = w, the identity. At 200\% the rule is C(w) = 2w, so the photo gives a copy 25 cm wide: not the identity.
- B(n) = 22, domain \{3, 4, 5, 6, 7, 8\}, range \{22\}. T(m) = 22m, so T(5) = 110 dollars. T is not constant: it is linear with slope 22.
- A function needs each input to have exactly one output, not different inputs to have different outputs. In g(x) = 7 each input has the single output 7, so g is a function. A vertical line such as x = 7 fails: the one input 7 is paired with every real number.
- f(0) = m(0) + b = b, so f(0) = 0 forces b = 0. Then f(1) = m(1) + 0 = m, so f(1) = 1 forces m = 1. The function is f(x) = 1x + 0 = x, the identity.