Mathematical-Reasoning ยท Unit 21 ยท Video 2 ยท Interactive Practice

Equal Functions: Why xโต mod 5 Is the Identity on Rโ‚…

IKey Formulas

FormulaMeaning
Rn={0,1,2,โ€ฆ,nโˆ’1}R_n = \{0, 1, 2, \ldots, n - 1\}The set of remainders on division by nn; every integer is congruent modulo nn to exactly one element of RnR_n
aโ€Šmodโ€Šn=ra \bmod n = r, where aโ‰กr(modn)a \equiv r \pmod n and 0โ‰คr<n0 \le r \lt nโ€Šmodโ€Š\bmod is an operation that returns a number, 19โ€Šmodโ€Š6=119 \bmod 6 = 1; a congruence such as 19โ‰ก7(mod6)19 \equiv 7 \pmod 6 is a statement, true or false
f=gf = g provided dom(f)=dom(g)\text{dom}(f) = \text{dom}(g), codom(f)=codom(g)\text{codom}(f) = \text{codom}(g), and f(x)=g(x)f(x) = g(x) for every xx in the domainEquality of functions: the definition never mentions formulas
IA:Aโ†’AI_A : A \to A, IA(x)=xI_A(x) = x for every xโˆˆAx \in AThe identity function on a nonempty set AA: every arrow goes straight across

Key Insight: A formula is only one way to describe a function's outputs. On R5R_5 the formulas x5โ€Šmodโ€Š5x^5 \bmod 5 and xx look nothing alike yet describe the same function, while the diagonal count dd and f(x)=x(xโˆ’3)2f(x) = \frac{x(x - 3)}{2} share a formula and are still different functions, because their domains differ.

IIBuilding a Function out of Remainders

Reducing mod nn gives each input in RnR_n exactly one output in RnR_n, though some remainders may never be outputs.

IIISame Formula, Different Functions

The diagonal count dd and f(x)=x(xโˆ’3)2f(x) = \frac{x(x - 3)}{2} share a formula, but only ff accepts every real input.

IVDifferent Formulas, Same Function?

Equality checks three things only: the domain, the codomain, and the output at every input.

VQuiz Questions

Problem 1 ยท The Range of a Remainder Function

Given: f:R8โ†’R8f : R_8 \to R_8, f(x)=x2โ€Šmodโ€Š8f(x) = x^2 \bmod 8. Find the range of ff.

โœ… Correct! The eight outputs are 0,1,4,1,0,1,4,10, 1, 4, 1, 0, 1, 4, 1, so only three remainders are ever reached.
โŒ Not quite. These are the squares x2x^2, before the remainder is taken. The operation โ€Šmodโ€Š8\bmod 8 always returns an element of R8R_8; for example f(3)=9โ€Šmodโ€Š8=1f(3) = 9 \bmod 8 = 1.
โŒ Not quite. R8R_8 is the codomain, the set the outputs are allowed to lie in. The range contains only the outputs that actually occur, and 22 is never one of them.
โŒ Close, butโ€ฆ 00 is an output too: f(0)=0f(0) = 0, and f(4)=16โ€Šmodโ€Š8=0f(4) = 16 \bmod 8 = 0 because 16=8โ‹…2+016 = 8 \cdot 2 + 0.
Show solution

Compute x2x^2 for each xโˆˆR8x \in R_8 and take its remainder on division by 88:

xxx2x^2x2=8q+rx^2 = 8q + rf(x)f(x)
00008โ‹…0+08 \cdot 0 + 000
11118โ‹…0+18 \cdot 0 + 111
22448โ‹…0+48 \cdot 0 + 444
33998โ‹…1+18 \cdot 1 + 111
4416168โ‹…2+08 \cdot 2 + 000
5525258โ‹…3+18 \cdot 3 + 111
6636368โ‹…4+48 \cdot 4 + 444
7749498โ‹…6+18 \cdot 6 + 111

The outputs are 0,1,4,1,0,1,4,10, 1, 4, 1, 0, 1, 4, 1, so range(f)={0,1,4}\text{range}(f) = \{0, 1, 4\}, a proper subset of the codomain R8R_8. The output 11 has four preimages, 11, 33, 55 and 77, which a function allows.

Problem 2 ยท Same Rule, Different Codomain

Given: f:R4โ†’R4f : R_4 \to R_4 and g:R4โ†’Zg : R_4 \to \mathbb{Z}, both defined by the rule (x2+x)โ€Šmodโ€Š4(x^2 + x) \bmod 4. Which statement is true?

โœ… Correct! Conditions 1 and 3 hold, but condition 2 fails, and all three are required.
โŒ Not quite. Equal functions need equal codomains as well. Here codom(f)=R4\text{codom}(f) = R_4 and codom(g)=Z\text{codom}(g) = \mathbb{Z}, so condition 2 fails even though the outputs all match.
โŒ Not quite. The rule takes a remainder, so every output of gg lies in R4R_4; in fact gg outputs only 00 and 22. The functions differ, but for another reason.
โŒ Not quite. gg uses the same rule, โ€Šmodโ€Š4\bmod 4 included: g(3)=12โ€Šmodโ€Š4=0=f(3)g(3) = 12 \bmod 4 = 0 = f(3). The outputs agree everywhere; look at the codomains.
Show solution

Check the three conditions of the definition.

1. Domains: dom(f)=R4=dom(g)\text{dom}(f) = R_4 = \text{dom}(g). โœ“

2. Codomains: codom(f)=R4\text{codom}(f) = R_4 but codom(g)=Z\text{codom}(g) = \mathbb{Z}, and R4โ‰ ZR_4 \ne \mathbb{Z} (for instance 5โˆˆZ5 \in \mathbb{Z} but 5โˆ‰R45 \notin R_4). โœ—

3. Outputs: x2+xx^2 + x takes the values 0,2,6,120, 2, 6, 12 at x=0,1,2,3x = 0, 1, 2, 3, with remainders 0,2,2,00, 2, 2, 0 on division by 44. Both functions use this rule, so f(x)=g(x)f(x) = g(x) for every xโˆˆR4x \in R_4. โœ“

Condition 2 fails, so fโ‰ gf \ne g. Matching outputs are not enough on their own; the definition also compares the codomains.

Problem 3 ยท Two Formulas on R7R_7

Given: f,g:R7โ†’R7f, g : R_7 \to R_7 with f(x)=2xโ€Šmodโ€Š7f(x) = 2x \bmod 7 and g(x)=9xโ€Šmodโ€Š7g(x) = 9x \bmod 7.

Is f=gf = g?

What is the range of ff?

โœ… Correct! ff and gg are one function, and its outputs 0,2,4,6,1,3,50, 2, 4, 6, 1, 3, 5 fill all of R7R_7.
โŒ Not quite. 2727 is not an output: g(3)=27โ€Šmodโ€Š7=6g(3) = 27 \bmod 7 = 6, since 27=7โ‹…3+627 = 7 \cdot 3 + 6. That equals f(3)=6f(3) = 6.
โŒ Not quite. The definition of equal functions never mentions formulas. Compare the outputs: g(1)=9โ€Šmodโ€Š7=2=f(1)g(1) = 9 \bmod 7 = 2 = f(1), and so on at every input.
โŒ Not quite. They agree everywhere, for example f(1)=2f(1) = 2 and g(1)=9โ€Šmodโ€Š7=2g(1) = 9 \bmod 7 = 2. Remember to reduce 9x9x before comparing.
โŒ Not quite. Compare f(x)f(x) and g(x)g(x) at each of the seven inputs.
โŒ Not quite. 2x2x is even, but its remainder need not be: f(4)=8โ€Šmodโ€Š7=1f(4) = 8 \bmod 7 = 1.
โŒ Not quite. These are the values of 2x2x, before reduction. Every output of ff lies in R7R_7; for example f(6)=12โ€Šmodโ€Š7=5f(6) = 12 \bmod 7 = 5.
โŒ Close, butโ€ฆ f(0)=0f(0) = 0, so 00 is in the range too.
โŒ Not quite. List f(x)f(x) for x=0,1,โ€ฆ,6x = 0, 1, \ldots, 6.
Show solution

Equality. Both functions have domain R7R_7 and codomain R7R_7, so conditions 1 and 2 hold. For condition 3, 9xโˆ’2x=7x9x - 2x = 7x is a multiple of 77, so 9xโ‰ก2x(mod7)9x \equiv 2x \pmod 7 for every integer xx. Congruent integers have the same remainder on division by 77, so 9xโ€Šmodโ€Š7=2xโ€Šmodโ€Š79x \bmod 7 = 2x \bmod 7, that is, g(x)=f(x)g(x) = f(x) for every xโˆˆR7x \in R_7. The table confirms it:

xx00112233445566
2x2x002244668810101212
f(x)f(x)00224466113355
9x9x009918182727363645455454
g(x)g(x)00224466113355

So f=gf = g.

Range. The outputs of ff are 0,2,4,6,1,3,50, 2, 4, 6, 1, 3, 5: every element of R7R_7 appears, so range(f)=R7\text{range}(f) = R_7, the whole codomain.

Problem 4 ยท Cubes and the Identity Function

Given: f:R3โ†’R3f : R_3 \to R_3, f(x)=x3โ€Šmodโ€Š3f(x) = x^3 \bmod 3, and g:R4โ†’R4g : R_4 \to R_4, g(x)=x3โ€Šmodโ€Š4g(x) = x^3 \bmod 4. Which statement is true?

โœ… Correct! ff sends 0,1,20, 1, 2 to 0,1,20, 1, 2, while gg sends 0,1,2,30, 1, 2, 3 to 0,1,0,30, 1, 0, 3.
โŒ Not quite. Check every input of gg: 23=8=4โ‹…2+02^3 = 8 = 4 \cdot 2 + 0, so g(2)=0g(2) = 0, while IR4(2)=2I_{R_4}(2) = 2. One mismatch is enough.
โŒ Not quite. 88 is not an output of ff, whose codomain is R3R_3: f(2)=8โ€Šmodโ€Š3=2f(2) = 8 \bmod 3 = 2, since 8=3โ‹…2+28 = 3 \cdot 2 + 2.
โŒ Not quite. A similar-looking rule is not enough: dom(f)=R3\text{dom}(f) = R_3 and dom(g)=R4\text{dom}(g) = R_4, so condition 1 fails (and the codomains differ too).
Show solution

ff versus IR3I_{R_3}. Both have domain and codomain R3R_3. The outputs: f(0)=0f(0) = 0, f(1)=1f(1) = 1, and f(2)=8โ€Šmodโ€Š3=2f(2) = 8 \bmod 3 = 2 because 8=3โ‹…2+28 = 3 \cdot 2 + 2. So f(x)=x=IR3(x)f(x) = x = I_{R_3}(x) for every xโˆˆR3x \in R_3, and f=IR3f = I_{R_3}.

gg versus IR4I_{R_4}. Both have domain and codomain R4R_4. The outputs: g(0)=0g(0) = 0, g(1)=1g(1) = 1, g(2)=8โ€Šmodโ€Š4=0g(2) = 8 \bmod 4 = 0 because 8=4โ‹…2+08 = 4 \cdot 2 + 0, and g(3)=27โ€Šmodโ€Š4=3g(3) = 27 \bmod 4 = 3 because 27=4โ‹…6+327 = 4 \cdot 6 + 3. At x=2x = 2, g(2)=0โ‰ 2=IR4(2)g(2) = 0 \ne 2 = I_{R_4}(2), so gโ‰ IR4g \ne I_{R_4}.

ff versus gg. Their domains R3R_3 and R4R_4 differ, so fโ‰ gf \ne g no matter how alike the rules look.

Solved: 0 / 4