1.1 Definition of a Function
A function f:A→Bf: A \rightarrow Bf:A→B is a rule that assigns each
element in set A (domain) exactly one element in set B (codomain).
Example
Let A={1,2,3}A = \{1,2,3\}A={1,2,3} and B={2,4,6}B = \
{2,4,6\}B={2,4,6}.
Define f(x)=2xf(x) = 2xf(x)=2x.
Then
f(1)=2,f(2)=4,f(3)=6.f(1)=2, f(2)=4, f(3)=6.f(1)=2,f(2)=4,f(3)=6.
1.2 Domain, Co-domain, Range
Domain: Input set
Codomain: Possible output
Range: Actual output values
Example
f(x)=x−1f(x) = \sqrt{x-1}f(x)=x−1
Domain → x≥1x \ge 1x≥1
Range → y≥0y \ge 0y≥0
1.3 Types of Functions
1. One-One (Injective)
Each element in A maps to a unique element in B.
2. Onto (Surjective)
Every element of B gets mapped.