Unit 1Functions
Unit 1Functions
1. Definitions of Functions
A function ff from a set AA (domain) to a set BB (codomain) is
denoted as:
f:A→Bf:A→B
a∈Aa∈A, there is exactly one
For each element
element b∈Bb∈B such that f(a)=bf(a)=b.
Example
Consider the function:
f(x)=x2f(x)=x2
Domain: All real numbers RR.
Range: All non-negative real numbers [0,∞)[0,∞).
3. Types of Functions
One-to-One Function (Injective)
A function f:A→Bf:A→B is one-to-one if different elements in the
f(a1)=f(a2) ⟹ a1=a2f(a1)=f(a2)⟹a1=a2
domain map to different elements in the codomain. Formally:
Example
Let:
f(x)=2x+1f(x)=2x+1
This function is one-to-one because if 2a1+1=2a2+12a1+1=2a2+1,
then a1=a2a1=a2.
∀b∈B,∃a∈A:f(a)=b∀b∈B,∃a∈A:f(a)=b
has at least one pre-image in the domain. Formally:
Example
Let:
g(x)=x3g(x)=x3
This function is onto when considering the codomain as all real
numbers because every real number has a cube root.
Bijective Function
A function is bijective if it is both injective and surjective. This
means there is a one-to-one correspondence between elements of
the domain and codomain.
4. Inverse Function
The inverse function f−1f−1 of a function ff reverses the mapping
of ff. For an inverse to exist, ff must be bijective.
Definition
Iff:A→Bf:A→B, then its inverse is defined as:
Example
For the function:
f(x)=3x+2f(x)=3x+2
To find the inverse:
1. Replace f(x)f(x) with yy:
y=3x+2y=3x+2
2. Solve for xx:
x=y−23x=3y−2
3. Thus, the inverse is:
f−1(y)=y−23f−1(y)=3y−2
5. Composition of Functions
The composition of two
functions f:A→Bf:A→B and g:B→Cg:B→C is denoted as:
(g∘f)(x)=g(f(x))(g∘f)(x)=g(f(x))
Example
Let:
f(x)=x+1f(x)=x+1
g(x)=2x−3g(x)=2x−3
Then,
(g∘f)(x)=g(f(x))=g(x+1)=2(x+1)−3=2x−1(g∘f)
(x)=g(f(x))=g(x+1)=2(x+1)−3=2x−1
Example of a Sequence
The sequence defined by:
an=n2,n=1,2,3,…an=n2,n=1,2,3,…
gives us the sequence:
a1=1,a2=4,a3=9,a4=16,...a1=1,a2=4,a3=9,a4=16,...
Summation
The sum of elements in a sequence can be expressed using
summation notation:
Sn=∑i=1naiSn=i=1∑nai
Example
For the sequence defined above,
Sn=12+22+...+n2=n(n+1)(2n+1)/6Sn=12+22+...+n2=n(n+1)(2n+1)/6
7. Growth of Functions
The growth rate of functions describes how they behave as their
input grows larger. Common types include:
Constant Growth: Functions that do not change.
Linear Growth: Functions that grow proportionally
(e.g., f(x)=mx+bf(x)=mx+b).
Polynomial Growth: Functions that grow at rates proportional to
powers of their input (e.g., f(x)=xnf(x)=xn).
Exponential Growth: Functions that grow at rates proportional to
their current value (e.g., f(x)=ax,a>1f(x)=ax,a>1).
Diagrams
Hasse Diagram for Function Mapping
Here’s how you can visualize mappings for functions:
text
Domain A Codomain B
{1} {a}
| |
| |
{2} {b}
| |
| |
{3} {c}
In this diagram:
Each element from domain A maps to an element in codomain B.
Conclusion
Understanding functions in discrete mathematics involves grasping
their definitions, properties, types, compositions, sequences,
summations, and growth rates. These concepts are foundational for
further studies in mathematics and its applications across various
fields such as computer science, statistics, and engineering. By
exploring these topics with examples and diagrams, we gain deeper
insights into how functions operate within mathematical
frameworks.