How do you show a function is surjective?
What is the example of injective function?
The identity function X → X is always injective. If function f: R→ R, then f(x) = 2x is injective. If function f: R→ R, then f(x) = 2x+1 is injective. If function f: R→ R, then f(x) = x2 is not an injective function, because here if x = -1, then f(-1) = 1 = f(1).
How do you know how many functions are surjective?
If a set A has m elements and set B has n elements, then the number of onto functions from A to B = nm – nC1(n-1)m + nC2(n-2)m – nC3(n-3)m+…. – nCn–1 (1)m. Note that this formula is used only if m is greater than or equal to n.