True for every function (each input has exactly one output), so proving it shows nothing about injections
Key Insight: To disprove, exhibit one pair of different inputs with the same output. To prove, list every output when A is finite; when A is infinite, assume f(x1โ)=f(x2โ) and derive x1โ=x2โ. Elements of B that are never outputs do not affect injectivity.
IIOne Pair Is Enough
Every input of h(x)=x2โ3x except 23โ shares its output with the input 3โx.
IIIFinite Domains: List Every Output
On a finite domain, one repeated output disproves injectivity, and a list with no repeats proves it.
IVThe Contrapositive Proof, Step by Step
The same contrapositive algebra either forces the inputs to be equal or exposes the pairs that break injectivity.
Claim. For all m,nโZ, if F(m)=F(n), then m=n.
(1) Let m,nโZ and assume F(m)=F(n).
(2) By the rule for F:
3m+2=3n+2
(3) Subtract 2 from both sides:
3m=3n
(4) Divide both sides by 3, allowed because 3๎ =0:
m=n
So F is an injection. โ
Attempt. For all x1โ,x2โโR, if h(x1โ)=h(x2โ), then x1โ=x2โ.
(1) Let x1โ,x2โโR and assume h(x1โ)=h(x2โ).
(4) So x1โ=x2โ or x1โ+x2โ=3. The second case allows x1โ๎ =x2โ: with x1โ=0 and x2โ=3, h(0)=h(3)=0. The proof cannot be completed, and this pair shows h is not an injection.
Claim. For all m,nโN, if q(m)=q(n), then m=n.
(1) Let m,nโN and assume q(m)=q(n).
(2) By the rule for q:
m2=n2
(3) Move everything to one side and factor:
m2โn2=0(mโn)(m+n)=0
(4) Since mโฅ1 and nโฅ1, m+nโฅ2, so m+n๎ =0. Hence mโn=0, that is, m=n, and q is an injection. โ
VQuiz Questions
Problem 1 ยท Cubes on R7โ
Given:R7โ={0,1,2,3,4,5,6} and f:R7โโR7โ, f(x)=x3mod7. Which statement is correct?
โ Correct! Two different inputs with the same output satisfy the negation of the definition, and one such pair is enough.
โ Not quite. "Each input has exactly one output" says only that f is a function. Injectivity asks whether two different inputs can share an output โ and f(1)=f(2).
โ Not quite. Every function AโB has its outputs in B; that is part of being a function, not injectivity. Compute the outputs: 23=8 leaves remainder 1, the same as 13.
โ Right verdict, wrong reason. Elements of the codomain that receive no arrow do not affect injectivity โ an injection may leave part of the codomain unused. The reason is a repeated output: f(1)=f(2)=1.
Show solution
The domain is finite, so list every output:
x
0
1
2
3
4
5
6
x3
0
1
8
27
64
125
216
f(x)
0
1
1
6
1
6
6
For example 8=7โ 1+1, so f(2)=1=f(1) while 1๎ =2. This pair satisfies โx1โ,x2โโR7โ,ย (x1โ๎ =x2โโงf(x1โ)=f(x2โ)), so f is not an injection. (Other pairs work too, such as f(3)=f(5)=6.)
Problem 2 ยท Opening the Proof
Given:g:Rโ{3}โR, g(x)=xโ3x+1โ. Which opening sets up a valid proof that g is an injection?
โ Correct! That is the contrapositive form: its hypothesis g(x1โ)=g(x2โ) is an equation we can work on with algebra.
โ Not quite. "If x1โ=x2โ, then g(x1โ)=g(x2โ)" is the converse of the contrapositive. It holds for every function, because each input has exactly one output, so proving it shows nothing about injections.
โ Not quite. That is the opening for proving g is a surjection (every element of the codomain is an output) โ a different property. It would fail here anyway: xโ3x+1โ=1 gives x+1=xโ3, which no x satisfies. Injectivity is about two inputs sharing an output.
โ Not quite. The domain is infinite. Checking a few inputs says nothing about the inputs you did not check; a proof must handle all x1โ,x2โ at once.
Show solution
Proof. Let x1โ,x2โโRโ{3} and assume g(x1โ)=g(x2โ), that is,
x1โโ3x1โ+1โ=x2โโ3x2โ+1โ.
Since x1โ๎ =3 and x2โ๎ =3, both denominators are nonzero, so we may multiply both sides by (x1โโ3)(x2โโ3):
Dividing by 4 gives x1โ=x2โ. Hence for all x1โ,x2โโRโ{3}, if g(x1โ)=g(x2โ), then x1โ=x2โ, and g is an injection. โ
Problem 3 ยท When the Algebra Splits
Given:r:Rโ{0}โR, r(x)=x+x1โ. Assume r(x1โ)=r(x2โ), multiply both sides by x1โx2โ (nonzero), and move every term to one side.
Which factored equation do you reach?
What does it show about r?
โ Correct! The factor x1โx2โโ1 can vanish with x1โ๎ =x2โ, and any reciprocal pair such as 2 and 21โ is a counterexample.
โ Not quite. That is the factoring of x12โโx22โ, not of this equation. Here the terms are x12โx2โโx1โx22โ+x2โโx1โ=x1โx2โ(x1โโx2โ)โ(x1โโx2โ).
โ Check the sign.x1โx2โ(x1โโx2โ)โ(x1โโx2โ) factors as (x1โโx2โ)(x1โx2โโ1): the second term is subtracted.
โ Not quite. Factoring x1โโx2โ out of x1โx2โ(x1โโx2โ)โ(x1โโx2โ) leaves a second factor, x1โx2โโ1, which can also be zero.
โ Not quite. The product is zero when either factor is zero. The factor x1โx2โโ1 is zero for x1โ=2, x2โ=21โ, so the proof cannot force x1โ=x2โ, and that pair is a counterexample.
โ Check the values.r(1)=1+1=2 but r(โ1)=โ1โ1=โ2. The colliding pairs satisfy x1โx2โ=1, and 1โ (โ1)=โ1.
โ Check the values.r(2)=25โ but r(โ2)=โ25โ. The colliding pairs satisfy x1โx2โ=1, and 2โ (โ2)=โ4.
Show solution
Let x1โ,x2โโRโ{0} and assume r(x1โ)=r(x2โ):
x1โ+x1โ1โ=x2โ+x2โ1โ.
Multiply both sides by x1โx2โ๎ =0 and move every term to the left:
So x1โ=x2โorx1โx2โ=1. The second case allows different inputs: take x1โ=2, x2โ=21โ. Then
r(2)=2+21โ=25โ,r(21โ)=21โ+2=25โ,
with 2๎ =21โ. This pair satisfies the negation of the definition, so r is not an injection.
Problem 4 ยท Which One Is One-to-One?
Given: four functions R6โโR6โ, where R6โ={0,1,2,3,4,5}. Which one is an injection?
โ Correct! The outputs of f1โ are 1, 0, 5, 4, 3, 2 โ six inputs, six different outputs.
โ Not quite.f2โ(0)=1 and f2โ(3)=7mod6=1, with 0๎ =3. Every output of 2x+1 is odd, so only 1, 3, 5 are reached and six inputs must share them.
โ Not quite.f3โ(1)=1 and f3โ(5)=25mod6=1, with 1๎ =5 โ the squares of x and 6โx always agree mod 6.
โ Not quite.f4โ(0)=2 and f4โ(2)=8mod6=2, with 0๎ =2: adding 2 to x adds 6 to 3x+2.
Show solution
The domain is finite, so list every output of each function:
x
0
1
2
3
4
5
verdict
f1โ
1
0
5
4
3
2
no repeats: injection
f2โ
1
3
5
1
3
5
f2โ(0)=f2โ(3)
f3โ
0
1
4
3
4
1
f3โ(1)=f3โ(5)
f4โ
2
5
2
5
2
5
f4โ(0)=f4โ(2)
For f1โ: 5โ 2+1=11=6โ 1+5, 5โ 3+1=16=6โ 2+4, and so on; the six outputs are all different, so no two inputs share an output and f1โ is an injection. Each of the others has a pair of different inputs with the same output, so none of them is an injection.