TExcelTAD
Home › School Functions, Exponentials & Logarithms › One-to-One (Injective), Onto (Surjective), and Bijective Functions

One-to-One (Injective), Onto (Surjective), and Bijective Functions

A mathematical function f:A→Bf: A \to B is much more than an equation. It is a precise correspondence between an input set (the domain AA) and a target set (the codomain BB).

To determine whether a function can be inverted, paired up into perfect one-to-one partnerships, or solved uniquely, mathematicians classify functions into three fundamental categories: injective (one-to-one), surjective (onto), and bijective (one-to-one and onto).


1. Concepts & Paper Visuals

Mapping Diagram Comparison

Visualize two sets AA (inputs) and BB (outputs) linked by directed arrows:

    INJECTIVE (1-to-1)          SURJECTIVE (Onto)             BIJECTIVE (Both)
      No collisions              No elements left out         Perfect 1-to-1 match

     A             B             A             B             A             B
   ┌───┐         ┌───┐         ┌───┐         ┌───┐         ┌───┐         ┌───┐
   │ 1 ├───┐     │ a │         │ 1 ├───┐     │ a │         │ 1 ├────────►│ a │
   │ 2 ├───┼────►│ b │         │ 2 ├───┼────►│   │         │ 2 ├────────►│ b │
   │ 3 ├───┼────►│ c │         │ 3 ├───┼────►│ b │         │ 3 ├────────►│ c │
   └───┘   │     │ d │         └───┘   │     └───┘         └───┘         └───┘
           └────►│   │                 └────►(shared)
                 └───┘
    (d is untouched;           (b has 2 inputs;           (Every y in B has
     no two share an output)    nothing in B is missed)    exactly one x in A)

The Graphical Test: Horizontal Line Test (HLT)

While the Vertical Line Test checks whether a curve represents a valid function, the Horizontal Line Test examines whether that function is one-to-one:

  Vertical Line Test (Function?)             Horizontal Line Test (One-to-One?)
  Does every vertical line x = c             Does every horizontal line y = k
  intersect the graph AT MOST once?          intersect the graph AT MOST once?

          y                                          y
          │   ╭───╮                                  │   ╭───╮
          │  ╭╯   ╰╮                               ──┼───●───●─── y = k (Crosses TWICE!
          │  │  │  │                                 │  ╭╯   ╰╮       NOT injective)
          └──┼──┼──┼───► x                           └──┼─────┼───► x
                x = c                                   x₁    x₂
  • Injective: Every horizontal line intersects the curve at most once (≤1\le 1 point).
  • Surjective: Every horizontal line at height y∈By \in B intersects the curve at least once (≥1\ge 1 point).
  • Bijective: Every horizontal line at height y∈By \in B intersects the curve at exactly one point (=1= 1 point).

2. Formula Box & Formal Definitions

┌─────────────────────────────────────────────────────────────────────────────┐
│                 INJECTIVE, SURJECTIVE, AND BIJECTIVE RULES                  │
│                                                                             │
│  Given a function f : A → B:                                                │
│                                                                             │
│  1. Injective (One-to-One):                                                 │
│     ∀ x₁, x₂ ∈ A :  f(x₁) = f(x₂) ⟹ x₁ = x₂                                │
│     Equivalently: x₁ ≠ x₂ ⟹ f(x₁) ≠ f(x₂)                                   │
│                                                                             │
│  2. Surjective (Onto):                                                      │
│     ∀ y ∈ B, ∃ x ∈ A such that f(x) = y                                     │
│     Equivalently: Range(f) = Codomain B                                     │
│                                                                             │
│  3. Bijective (One-to-One Correspondence):                                  │
│     f is BOTH Injective and Surjective.                                     │
│     A function has a two-sided inverse f⁻¹ : B → A if and only if it is     │
│     bijective!                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

3. Step-by-Step Paper Notebook Method

Method A: Proving Injectivity on Paper

  1. Write the assumption: "Assume f(x1)=f(x2)f(x_1) = f(x_2) for arbitrary x1,x2∈Ax_1, x_2 \in A."
  2. Substitute x1x_1 and x2x_2 into the algebraic expression for ff.
  3. Use rigorous algebraic operations (clearing denominators, factoring, cancelling like terms).
  4. Arrive directly at the equality x1=x2x_1 = x_2.
  5. If you find a case where x1=−x2x_1 = -x_2 or multiple branches exist, the function is not injective. Provide a specific numerical counterexample: f(a)=f(b)f(a) = f(b) with a≠ba \neq b.

Method B: Proving Surjectivity on Paper

  1. Let yy be an arbitrary element in the declared codomain BB.
  2. Set up the equation y=f(x)y = f(x).
  3. Solve this equation algebraically for the input variable xx in terms of yy: x=g(y)x = g(y).
  4. Verify two requirements:
    • Does this formula for xx produce a real value for every y∈By \in B? (Check for division by zero or negative square roots).
    • Does the resulting xx actually belong to the domain AA?
  5. If yes, ff is surjective. If any y∈By \in B yields no valid x∈Ax \in A, name that yy as a counterexample.

4. Step-by-Step Notebook Examples

Example 1: A Linear Function on R\mathbb{R}

Problem: Let f:R→Rf: \mathbb{R} \to \mathbb{R} be defined by f(x)=3x−7f(x) = 3x - 7.
Prove that ff is bijective on paper.


Step 1: Prove ff is Injective

  • Assume f(x1)=f(x2)f(x_1) = f(x_2) for x1,x2∈Rx_1, x_2 \in \mathbb{R}:
    3x1−7=3x2−73x1=3x2(add 7 to both sides)x1=x2(divide by 3)\begin{aligned} 3x_1 - 7 &= 3x_2 - 7 \\ 3x_1 &= 3x_2 \quad (\text{add } 7 \text{ to both sides}) \\ x_1 &= x_2 \quad (\text{divide by } 3) \end{aligned}
  • Since f(x1)=f(x2)  ⟹  x1=x2f(x_1) = f(x_2) \implies x_1 = x_2, ff is injective.

Step 2: Prove ff is Surjective

  • Let y∈Ry \in \mathbb{R} be an arbitrary target value. Set y=f(x)y = f(x):
    y=3x−7y+7=3xx=y+73\begin{aligned} y &= 3x - 7 \\ y + 7 &= 3x \\ x &= \frac{y + 7}{3} \end{aligned}
  • For every real number y∈Ry \in \mathbb{R}, the value x=y+73x = \frac{y + 7}{3} is a well-defined real number (x∈Rx \in \mathbb{R}).
  • Check the output:
    f(x)=f(y+73)=3(y+73)−7=(y+7)−7=yf(x) = f\left(\frac{y + 7}{3}\right) = 3\left(\frac{y + 7}{3}\right) - 7 = (y + 7) - 7 = y
  • Thus, every y∈Ry \in \mathbb{R} has a valid pre-image x∈Rx \in \mathbb{R}. ff is surjective.

Conclusion:

Since ff is both injective and surjective, ff is bijective.


Example 2: The Quadratic Function f(x)=x2f(x) = x^2 Across Different Sets

Problem: Analyze the injectivity, surjectivity, and bijectivity of the squaring rule under three different domain/codomain declarations:

  1. f1:R→R,f1(x)=x2f_1: \mathbb{R} \to \mathbb{R}, \quad f_1(x) = x^2
  2. f2:R→[0,∞),f2(x)=x2f_2: \mathbb{R} \to [0, \infty), \quad f_2(x) = x^2
  3. f3:[0,∞)→[0,∞),f3(x)=x2f_3: [0, \infty) \to [0, \infty), \quad f_3(x) = x^2

Case 1: f1:R→R,f1(x)=x2f_1: \mathbb{R} \to \mathbb{R}, f_1(x) = x^2

  • Injectivity: Not injective.
    Counterexample: Choose x1=2x_1 = 2 and x2=−2x_2 = -2.
    f1(2)=22=4f_1(2) = 2^2 = 4 and f1(−2)=(−2)2=4f_1(-2) = (-2)^2 = 4.
    Since f1(2)=f1(−2)f_1(2) = f_1(-2) but 2≠−22 \neq -2, f1f_1 fails the one-to-one test.
  • Surjectivity: Not surjective.
    The codomain is R\mathbb{R}. Take y=−9∈Ry = -9 \in \mathbb{R}. The equation x2=−9x^2 = -9 has no real solution (x∉Rx \notin \mathbb{R}).
  • Conclusion: f1f_1 is neither injective nor surjective.

Case 2: f2:R→[0,∞),f2(x)=x2f_2: \mathbb{R} \to [0, \infty), f_2(x) = x^2

  • Injectivity: Still not injective for the same reason (f2(−2)=f2(2)=4f_2(-2) = f_2(2) = 4).
  • Surjectivity: For any y∈[0,∞)y \in [0, \infty), we can solve x2=y  ⟹  x=±yx^2 = y \implies x = \pm\sqrt{y}, both of which are real numbers in R\mathbb{R}. Every non-negative number is reached!
    Thus, f2f_2 is surjective.
  • Conclusion: f2f_2 is surjective but not injective.

Case 3: f3:[0,∞)→[0,∞),f3(x)=x2f_3: [0, \infty) \to [0, \infty), f_3(x) = x^2

  • Injectivity: Let x1,x2∈[0,∞)x_1, x_2 \in [0, \infty) with f3(x1)=f3(x2)f_3(x_1) = f_3(x_2):
    x12=x22  ⟹  x12−x22=0  ⟹  (x1−x2)(x1+x2)=0x_1^2 = x_2^2 \implies x_1^2 - x_2^2 = 0 \implies (x_1 - x_2)(x_1 + x_2) = 0
    Since x1,x2≥0x_1, x_2 \ge 0, the sum x1+x2x_1 + x_2 can only be 00 if x1=x2=0x_1 = x_2 = 0. In all other cases, x1+x2>0x_1 + x_2 > 0, forcing x1−x2=0  ⟹  x1=x2x_1 - x_2 = 0 \implies x_1 = x_2.
    Thus, f3f_3 is injective.
  • Surjectivity: For any y∈[0,∞)y \in [0, \infty), the unique non-negative pre-image is x=y∈[0,∞)x = \sqrt{y} \in [0, \infty). Thus, f3f_3 is surjective.
  • Conclusion: f3f_3 is bijective! (This is why the square root function f3−1(y)=yf_3^{-1}(y) = \sqrt{y} exists on [0,∞)[0, \infty)).

Example 3: A Linear Fractional (Rational) Function

Problem: Let A=R∖{2}A = \mathbb{R} \setminus \{2\} and B=R∖{1}B = \mathbb{R} \setminus \{1\}.
Define f:A→Bf: A \to B by f(x)=x+3x−2f(x) = \frac{x + 3}{x - 2}.
Prove rigorously on paper that ff is bijective.


Step 1: Injectivity Proof

Assume f(x1)=f(x2)f(x_1) = f(x_2) for x1,x2∈Ax_1, x_2 \in A:

x1+3x1−2=x2+3x2−2\frac{x_1 + 3}{x_1 - 2} = \frac{x_2 + 3}{x_2 - 2}

Cross-multiply on paper:

(x1+3)(x2−2)=(x2+3)(x1−2)x1x2−2x1+3x2−6=x1x2−2x2+3x1−6\begin{aligned} (x_1 + 3)(x_2 - 2) &= (x_2 + 3)(x_1 - 2) \\ x_1 x_2 - 2x_1 + 3x_2 - 6 &= x_1 x_2 - 2x_2 + 3x_1 - 6 \end{aligned}

Subtract x1x2−6x_1 x_2 - 6 from both sides:

−2x1+3x2=−2x2+3x13x2+2x2=3x1+2x15x2=5x1x2=x1\begin{aligned} -2x_1 + 3x_2 &= -2x_2 + 3x_1 \\ 3x_2 + 2x_2 &= 3x_1 + 2x_1 \\ 5x_2 &= 5x_1 \\ x_2 &= x_1 \end{aligned}

Hence, x1=x2x_1 = x_2, so ff is injective.

Step 2: Surjectivity Proof

Let y∈B=R∖{1}y \in B = \mathbb{R} \setminus \{1\}. Set y=x+3x−2y = \frac{x + 3}{x - 2} and solve for xx:

y(x−2)=x+3yx−2y=x+3yx−x=2y+3x(y−1)=2y+3x=2y+3y−1\begin{aligned} y(x - 2) &= x + 3 \\ yx - 2y &= x + 3 \\ yx - x &= 2y + 3 \\ x(y - 1) &= 2y + 3 \\ x &= \frac{2y + 3}{y - 1} \end{aligned}

Now verify that x∈Ax \in A (meaning xx is real and x≠2x \neq 2):

  1. Because y∈By \in B, y≠1y \neq 1, so the denominator y−1≠0y - 1 \neq 0. Thus, xx is a well-defined real number.
  2. Could xx ever equal 22? Let's test:
    2y+3y−1=2  ⟹  2y+3=2(y−1)=2y−2  ⟹  3=−2(impossible)\frac{2y + 3}{y - 1} = 2 \implies 2y + 3 = 2(y - 1) = 2y - 2 \implies 3 = -2 \quad (\text{impossible})
    So x≠2x \neq 2 is guaranteed! Thus x∈Ax \in A.

Therefore, every y∈By \in B has a pre-image x∈Ax \in A. ff is surjective.

Conclusion:

Since ff is both injective and surjective, ff is bijective.


5. Common Mistakes & Paper Traps

[!WARNING]

Trap 1: Ignoring the Codomain When Checking Surjectivity

Students often declare f(x)=2xf(x) = 2x is "always onto".
But if the function is defined on integers: f:Z→Z,f(x)=2xf: \mathbb{Z} \to \mathbb{Z}, f(x) = 2x, its range is only the even integers {…,−4,−2,0,2,4,… }\{\dots, -4, -2, 0, 2, 4, \dots\}. The odd integer 3∈Z3 \in \mathbb{Z} has no integer pre-image (2x=3  ⟹  x=1.5∉Z2x = 3 \implies x = 1.5 \notin \mathbb{Z}).
Always read the arrow A→BA \to B carefully!

[!CAUTION]

Trap 2: Concluding x12=x22  ⟹  x1=x2x_1^2 = x_2^2 \implies x_1 = x_2

Remember that taking the square root gives x1=±x2x_1 = \pm x_2. If the domain contains negative numbers, x1=−x2x_1 = -x_2 is a valid second solution, which breaks injectivity.

[!TIP]

Trap 3: Confusing Domain with Codomain in Fractional Functions

When solving y=ax+bcx+dy = \frac{ax+b}{cx+d} for xx, the value that makes the new denominator zero indicates the single point excluded from the codomain (the horizontal asymptote value y=acy = \frac{a}{c}).


6. Pencil & Paper Practice

Practice 1

Determine whether f:R→Rf: \mathbb{R} \to \mathbb{R} given by f(x)=x3−4f(x) = x^3 - 4 is injective, surjective, or bijective. Write out the algebraic justification.

Practice 2

Let g:R→Rg: \mathbb{R} \to \mathbb{R} be defined by g(x)=∣x∣+2g(x) = |x| + 2.

  1. Is gg injective? Justify with a counterexample or proof.
  2. Is gg surjective? Justify with a counterexample or proof.

Worked Solutions

Solution to Practice 1:

  • Injectivity: Assume f(x1)=f(x2)f(x_1) = f(x_2):
    x13−4=x23−4  ⟹  x13=x23x_1^3 - 4 = x_2^3 - 4 \implies x_1^3 = x_2^3
    Taking the real cube root of both sides gives x1=x2x_1 = x_2 uniquely (cubing preserves signs). So ff is injective.
  • Surjectivity: Let y∈Ry \in \mathbb{R}. Solve y=x3−4  ⟹  x3=y+4  ⟹  x=y+43y = x^3 - 4 \implies x^3 = y + 4 \implies x = \sqrt[3]{y + 4}.
    The cube root of any real number is always a well-defined real number. Thus every yy has a pre-image in R\mathbb{R}. ff is surjective.
  • Conclusion: ff is bijective.

Solution to Practice 2:

  1. Injectivity: Let x1=3x_1 = 3 and x2=−3x_2 = -3.
    g(3)=∣3∣+2=5g(3) = |3| + 2 = 5 and g(−3)=∣−3∣+2=5g(-3) = |-3| + 2 = 5.
    Since g(3)=g(−3)g(3) = g(-3) but 3≠−33 \neq -3, gg is not injective.
  2. Surjectivity: Because ∣x∣≥0|x| \ge 0 for all real xx, g(x)=∣x∣+2≥2g(x) = |x| + 2 \ge 2.
    For any value y<2y < 2 (e.g., y=0∈Ry = 0 \in \mathbb{R}), g(x)=0  ⟹  ∣x∣=−2g(x) = 0 \implies |x| = -2, which has no real solution.
    Thus, gg is not surjective.

Test yourself

Which of the following functions f:R→Rf: \mathbb{R} \to \mathbb{R} is injective (one-to-one)?

  1. f(x)=x2−4f(x) = x^2 - 4
  2. f(x)=5−2xf(x) = 5 - 2x
  3. f(x)=∣x+1∣f(x) = |x + 1|
  4. f(x)=x4+3f(x) = x^4 + 3

Why is the function f:R→Rf: \mathbb{R} \to \mathbb{R} given by f(x)=x2+1f(x) = x^2 + 1 NOT surjective?

  1. Because f(0)=1f(0) = 1
  2. Because for y=−2y = -2, there is no real xx such that x2+1=−2x^2 + 1 = -2
  3. Because it fails the vertical line test
  4. Because f(1)=f(−1)f(1) = f(-1)

If a function f:A→Bf: A \to B is bijective, which statement is guaranteed to be TRUE?

  1. AA and BB must both be the set of all real numbers R\mathbb{R}
  2. f(x)f(x) must be a straight line
  3. Every horizontal line corresponding to y∈By \in B intersects the graph of ff exactly once
  4. f(x)=f(−x)f(x) = f(-x) for all x∈Ax \in A