Logic, Sets & the Language of Proof

injection

A function f : A → B is an injection, or one-to-one, when it never collapses two different inputs to the same output: distinct x's always have distinct f(x)'s. Imagine assigning seats so that no two people share a seat — that allocation is injective. The image of an injection is a faithful copy of the domain, with nothing glued together.

Two equivalent precise formulations are used constantly. The direct form: if x1 ≠ x2 then f(x1) ≠ f(x2). The contrapositive form, usually easier to apply in proofs: if f(x1) = f(x2) then x1 = x2. To prove a function injective you typically assume f(x1) = f(x2) and manipulate the equation until you are forced to conclude x1 = x2.

Injectivity is exactly the condition that lets a function be inverted on its image: an injective f : A → B has a well-defined inverse f⁻¹ : f(A) → A. For real functions, a strictly monotone function (strictly increasing or strictly decreasing) is automatically injective, which is why monotonicity is the standard route to invertibility in calculus. The converse fails: an injective real function need not be monotone if it is allowed to be discontinuous.

f(x) = 2x + 1 on R is injective: f(x1) = f(x2) gives 2x1 + 1 = 2x2 + 1, so x1 = x2. But g(x) = x^2 on R is NOT injective: g(2) = g(−2) = 4 with 2 ≠ −2.

Distinct outputs for distinct inputs (left) versus a collision (right).

Also called
one-to-one function一对一函数一對一函數