Injective and Surjective Functions
An injective function (or one-to-one function) is a type of function where each element in the domain maps to a unique element in the codomain. This means that no two different inputs produce the same output. For example, if f(x) = x + 1 , then f(1) = 2 and f(2) = 3 , showing that each input has a distinct output.
A surjective function (or onto function) is a function where every element in the codomain is mapped by at least one element from the domain. In other words, the function covers the entire codomain. For instance, if g(x) = x^2 defined from the real numbers to the non-negative real numbers is surjective, as every non-negative number has a corresponding input that produces it.