MethodMath

How to prove a function is injective, surjective, or bijective?

I'm studying discrete mathematics and I need to understand the three types of functions.

Definitions:

  • Injective (one-to-one): f(x1)=f(x2)    x1=x2f(x_1) = f(x_2) \implies x_1 = x_2
  • Surjective (onto): For every yy in the codomain, there exists xx such that f(x)=yf(x) = y
  • Bijective: Both injective and surjective

I understand the definitions but I struggle with the proof techniques. For example, how would I prove that f:RRf: \mathbb{R} \to \mathbb{R} defined by f(x)=3x+2f(x) = 3x + 2 is bijective? And how would I disprove injectivity or surjectivity for something like f(x)=x2f(x) = x^2?

Also, what is the relationship between bijections and inverse functions?

1 answers142 views
Loading comments...

1 Answer

AO
Amara OkaforMay 6, 2026 Accepted
Here are systematic proof techniques for each type. **Proving Injectivity:** Assume $f(x_1) = f(x_2)$ and show $x_1 = x_2$ using algebraic manipulation. **Example:** $f(x) = 3x + 2$ on $\mathbb{R}$. Assume $3x_1 + 2 = 3x_2 + 2$: $$3x_1 = 3x_2 \implies x_1 = x_2$$ Thus $f$ is injective. **Disproving Injectivity:** Find two distinct inputs that give the same output (a counterexample). **Example:** $f(x) = x^2$ on $\mathbb{R}$. $f(2) = 4$ and $f(-2) = 4$, but $2 \ eq -2$. Therefore $f$ is not injective. **Proving Surjectivity:** For an arbitrary $y$ in the codomain, solve $f(x) = y$ for $x$ and show the solution lies in the domain. **Example:** $f(x) = 3x + 2$ on $\mathbb{R}$. Given any $y \in \mathbb{R}$, solve $3x + 2 = y$: $$x = \frac{y - 2}{3} \in \mathbb{R}$$ Thus every $y$ has a preimage, so $f$ is surjective. **Disproving Surjectivity:** Find a $y$ in the codomain with no $x$ such that $f(x) = y$. **Example:** $f: \mathbb{R} \ o \mathbb{R}$, $f(x) = x^2$. $y = -1$ has no real solution $x$ such that $x^2 = -1$. Therefore $f$ is not surjective. **Bijection and Inverse Functions:** A function is bijective iff it has an **inverse function** $f^{-1}$ satisfying: - $f^{-1}(f(x)) = x$ for all $x$ in the domain - $f(f^{-1}(y)) = y$ for all $y$ in the codomain For $f(x) = 3x + 2$, the inverse is $f^{-1}(y) = \frac{y - 2}{3}$. **Summary Table:** | Property | How to Prove | How to Disprove | |---|---|---| | Injective | Assume $f(a) = f(b)$, show $a = b$ | Find $a \ eq b$ with $f(a) = f(b)$ | | Surjective | For any $y$, solve $f(x) = y$ | Find $y$ with no $x$ solution | | Bijective | Prove both injective and surjective | Show either fails |
Loading comments...
Login or Register to post an answer