~/writing/math-foundations-for-reasoning-models $ ls
Sets, Relations, and Functions
Injective Function
An injective function never sends two different inputs to the same output.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Injective Function
Definition
A function is injective when different inputs always produce different outputs.
Basic form:
if a is not b
then f(a) is not f(b)
Equivalent form:
if f(a) = f(b)
then a = b
Injective function = no output is reused by two different inputs.
Simple Example
Suppose:
f(x) = x + 1
Domain: {1, 2, 3}
Then:
1 -> 2
2 -> 3
3 -> 4
Each input produces a different output.
So the function is injective.
Injective functions preserve input distinction in the outputs.
Non-Example
Suppose:
f(x) = x * x
Domain: {-2, -1, 0, 1, 2}
Then:
-2 -> 4
2 -> 4
-1 -> 1
1 -> 1
0 -> 0
Different inputs can produce the same output.
So the function is not injective.
A function is not injective when distinct inputs collapse into the same output.
Injective vs Function
Every injective mapping is still a function, so each input has exactly one output.
Injective adds an extra requirement:
different inputs must not share an output
Function requirement:
one input -> one output
Injective requirement:
different inputs -> different outputs
Injective is stricter than being a function.
Why Injectivity Matters
Injectivity tells us whether output still identifies the input.
If a function is injective, seeing the output is enough to know which input produced it.
If it is not injective, information may be lost.
Example:
square output: 4
possible inputs: -2 or 2
Injectivity is about preserving distinctions.
Final Summary
- An injective function maps different inputs to different outputs.
- No output is reused by two different inputs.
f(x) = x + 1is injective over integers.f(x) = x * xis not injective over integers.- Injectivity preserves distinctions between inputs.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Surjective Function