One-to-One Functions: Questions and Solutions

Definition, horizontal line test, algebraic proofs, and practice — with fully worked solutions

Definition of a One-to-One Function

A function \( f(x) \) is one-to-one (injective) if different inputs always produce different outputs. Formally, for any \( A \) and \( B \) in the domain of \( f \):

\[ A \neq B \;\Rightarrow\; f(A) \neq f(B) \]

The contrapositive form is far more convenient for algebraic proofs:

\[ f(A) = f(B) \;\Rightarrow\; A = B \]

We will use both this contrapositive approach and the horizontal line test to determine whether each function below is one-to-one.

Questions with Solutions

Question 1 — Ordered pairs with a repeated output

Is the function \( f \) defined by the following set of ordered pairs one-to-one?

\[ f = \{(1,2), (3,4), (5,6), (8,6), (10,-1)\} \]
View Solution

Answer: No.

Two distinct inputs, \( 5 \) and \( 8 \), produce the same output of \( 6 \): \( f(5) = 6 \) and \( f(8) = 6 \). Therefore, \( f \) is not one-to-one.

Question 2 — Ordered pairs with all-distinct outputs

Is the function \( g \) defined by the following set of ordered pairs one-to-one?

\[ g = \{(-1,2), (0,4), (2,-4), (5,6), (10,0)\} \]
View Solution

Answer: Yes.

Every \( x \)-value in the domain maps to a distinct \( y \)-value (2, 4, −4, 6, 0), so \( g \) is one-to-one.

Question 3 — A cubic that fails the horizontal line test

Is the function \( f(x) = -x^3 + 3x^2 - 2 \) one-to-one?

View Solution

Answer: No.

The graph below, combined with the horizontal line test, settles the question.

Graph of f(x) = −x³ + 3x² − 2 showing a horizontal line intersecting the curve at three points

A horizontal line can meet the graph at three different points, meaning three distinct inputs \( x_1, x_2, x_3 \) give the same output. Hence \( f \) is not one-to-one.

Question 4 — Every non-constant linear function is one-to-one

Show that every linear function \( f(x) = ax + b \) with \( a \neq 0 \) is one-to-one.

View Solution

Use the contrapositive. Assume \( f(A) = f(B) \):

\[ aA + b = aB + b \]

Subtract \( b \):

\[ aA = aB \]

Divide by \( a \neq 0 \):

\[ A = B \]

Since \( f(A) = f(B) \) forces \( A = B \), the function is one-to-one.

Question 5 — A quadratic restricted to x ≥ h is one-to-one

Show that every function \( f(x) = a(x - h)^2 + k \) with domain \( x \ge h \) (and \( a \neq 0 \)) is one-to-one.

View Solution

Assume \( f(A) = f(B) \):

\[ a(A - h)^2 + k = a(B - h)^2 + k \]

Subtract \( k \) and divide by \( a \):

\[ (A - h)^2 = (B - h)^2 \]

Taking square roots gives two possible cases:

\[ A - h = B - h \quad \text{or} \quad A - h = -(B - h) \]

The first case gives \( A = B \). For the second case, note that the domain restriction \( x \ge h \) guarantees \( A - h \ge 0 \) and \( B - h \ge 0 \). The equation \( A - h = -(B - h) \) therefore forces both sides to be zero, i.e. \( A - h = 0 \) and \( B - h = 0 \), so again \( A = B \).

In every case, \( f(A) = f(B) \) implies \( A = B \), so \( f \) is one-to-one.

Question 6 — A rational function that is not one-to-one

Is \( f(x) = \dfrac{1}{(x - 2)^2} \) one-to-one?

View Solution

Answer: No.

Evaluate at \( x = 0 \) and \( x = 4 \):

\[ f(0) = \frac{1}{(0 - 2)^2} = \frac{1}{4}, \qquad f(4) = \frac{1}{(4 - 2)^2} = \frac{1}{4} \]

Two distinct inputs give the same output, so \( f \) is not one-to-one.

Question 7 — Rational functions of the form 1/(ax + b) are one-to-one

Show that every function \( f(x) = \dfrac{1}{ax + b} \) with \( a \neq 0 \) is one-to-one.

View Solution

Assume \( f(A) = f(B) \):

\[ \frac{1}{aA + b} = \frac{1}{aB + b} \]

Both denominators are nonzero because neither \( A \) nor \( B \) equals \( -\tfrac{b}{a} \) (that value is excluded from the domain). Cross-multiplying gives:

\[ aB + b = aA + b \]

Subtract \( b \):

\[ aB = aA \]

Divide by \( a \neq 0 \):

\[ B = A \]

Hence \( f(A) = f(B) \) implies \( A = B \), so \( f \) is one-to-one.

Quick Reference: Common One-to-One Properties

Summary of function types and whether they are one-to-one
Function Type One-to-One? Reason
Linear \( ax + b \), \( a \neq 0 \)YesDividing by \( a \) gives \( A = B \)
ConstantNoEvery input gives the same output
Quadratic \( x^2 \) on all realsNo\( f(-1) = f(1) \)
Quadratic on \( x \ge h \)YesMonotone on that half-line
\( 1/(ax + b) \)YesReduces to \( A = B \)
\( 1/(x - h)^2 \)No\( f(h - t) = f(h + t) \)
Odd-degree polynomialUsually, not alwaysDepends on local extrema (e.g. \( -x^3 + 3x^2 - 2 \) is not 1-1)

Practice Exercises

Decide whether each function is one-to-one, then expand the answer below to check your reasoning.

  1. \( f = \{(12,2), (15,4), (19,-4), (25,6), (78,0)\} \)
  2. \( g = \{(-1,2), (0,4), (9,-4), (18,6), (23,-4)\} \)
  3. \( h(x) = x^2 + 2 \)
  4. \( i(x) = \dfrac{1}{2x - 4} \)
  5. \( j(x) = -5x + \tfrac{1}{2} \)
  6. \( k(x) = \dfrac{1}{|x - 4|} \)
View Answers
  1. \( f \) is one-to-one — all five outputs (2, 4, −4, 6, 0) are distinct.
  2. \( g \) is not one-to-one — \( g(9) = g(23) = -4 \).
  3. \( h \) is not one-to-one — \( h(-1) = h(1) = 3 \).
  4. \( i \) is one-to-one — follows the proof in Question 7 (with \( a = 2, b = -4 \)).
  5. \( j \) is one-to-one — follows the proof in Question 4 (with \( a = -5, b = \tfrac{1}{2} \)).
  6. \( k \) is not one-to-one — \( k(3) = k(5) = 1 \).

Frequently Asked Questions

What is a one-to-one function?

A function \( f \) is one-to-one (injective) if every distinct input produces a distinct output. Equivalently, \( f(A) = f(B) \) implies \( A = B \) for all \( A, B \) in the domain.

What is the horizontal line test for one-to-one functions?

A function is one-to-one if and only if every horizontal line intersects its graph at most once. If any horizontal line crosses the graph two or more times, the function is not one-to-one.

Is f(x) = x² a one-to-one function?

No. Because \( f(-1) = f(1) = 1 \), two distinct inputs give the same output. Restricting the domain to \( x \ge 0 \) would make it one-to-one.

Are all linear functions one-to-one?

Every non-constant linear function \( f(x) = ax + b \) with \( a \neq 0 \) is one-to-one. A constant function (\( a = 0 \)) is not.

Why is the contrapositive definition useful when proving a function is one-to-one?

The contrapositive form "\( f(A) = f(B) \Rightarrow A = B \)" gives a concrete equation to manipulate algebraically, whereas the direct statement "\( A \neq B \Rightarrow f(A) \neq f(B) \)" is harder to prove directly.

Explore More

Last updated: October 17, 2026