Injective, Surjective and Bijective
"Injective, Surjective and Bijective" tell you about how a function behaves.
You can think of a function as a way of matching the members of a set "A" to a set "B":
"Injective" means that every member of "A" has only one matching member in "B" (but it doesn't tell you if every "B" has a matching "A")
"Surjective" means that every "B" has at least one matching "A" (maybe more than one).
"Bijective" means Injective and Surjective together. So there is a perfect "one-to-one correspondence" between the members of the sets.
Formal Definitions
Injective
A function f is injective if and only if whenever f(x) = f(y), x = y.
Example: f(x) = x2 from the set of natural
numbers to is an injective function.
(But f(x) = x2 is not injective when it is from the set of integers (which include negative
numbers) because you could have, for example, both
Note: Injective is also called "One-to-One", but this can be confusing because it makes it sound like it is actually bijective which has "one-to-one correspondence".
Surjective (Also Called "Onto")
A function f (from set A to B) is surjective if and only for every y in B, there is at least one x in A such that f(x) = y, in other words f is surjective
if and only if
f(A) = B.
So, every element of the range corresponds to at least one member of the domain.
Bijective
A function f (from set A to B) is bijective if, for every y in B, there is exactly one x in A such that f(x) = y
Alternatively, f is bijective if it is a one-to-one correspondence between those sets, in other words both injective and surjective.
Example: The function f(x) = x2 from the set of positive real
numbers to positive real
numbers is injective and surjective.
Thus it is also bijective.
(But not from the set of real numbers because you could have, for example, both
|