Functions

1. Definition / Introduction

A function (or mapping) $f$ from a set $A$ to a set $B$ is a rule that assigns to each element $x\in A$ exactly one element $y\in B$. We write $f:A\to B$ and $y=f(x)$.

Formal: $f$ is a function $f:A\to B$ if $\forall x\in A\, \exists! \,y\in B$ such that $y=f(x)$.

Example: $f:\mathbb{R}\to\mathbb{R}$ defined by $f(x)=x^2$ assigns to each real number its square.

2. Domain, Co-domain and Range

Domain of $f:A\to B$ is the set $A$ (all allowable inputs).
Co-domain is the set $B$ (the target set where outputs lie).
Range (image) of $f$ is $f(A)=\{f(x):x\in A\}\subseteq B$ (actual outputs).

Note: Range $\subseteq$ Co-domain; they may be equal or not.

3. Types / Classification of Functions

Below each type: brief definition, formula and a small plotted example (canvas).

3.1 Polynomial Function

Definition: $f(x)=a_nx^n+\dots+a_1x+a_0$, where $n$ is a non-negative integer.

Example: $f(x)=x^3-2x$

3.2 Algebraic Function

Definition: Built using algebraic operations (polynomials, roots). Example: $f(x)=\sqrt{x+1}$ (domain $x\ge-1$).

Example: $f(x)=\sqrt{x+1}$

3.3 Rational Function

Definition: Ratio of two polynomials $f(x)=\dfrac{p(x)}{q(x)}$, where $q(x)\neq0$.

Example: $f(x)=\dfrac{1}{x-1}$ (vertical asymptote at $x=1$).

3.4 Constant Function

Definition: $f(x)=c$ for all $x$ in domain.

Example: $f(x)=3$

3.5 Identity Function

Definition: $f(x)=x$.

Example: $f(x)=x$

3.6 Absolute Value Function

Definition: $f(x)=|x|$.

Example: $f(x)=|x|$

3.7 Signum Function

Definition: $\mathrm{sgn}\left({x}\right)=\begin{cases}{−\mathrm{1}}&{{x}<\mathrm{0}}\\{\mathrm{0}}&{{x}=\mathrm{0}}\\{\mathrm{1}}&{{x}>\mathrm{0}}\end{cases} $

Example: signum plot

3.8 Greatest Integer Function (GIF)

Definition: $\lfloor{x}\rfloor=\mathrm{greatest}\:\mathrm{integer}\:\leqslant\:{x}$. (Step function)

Example: $\lfloor{x}\rfloor$

3.9 Fractional Part Function

Definition: $\{x\}=x-\lfloor x\rfloor$, value in $[0,1)$.

Example: $\{x\}$

4. Algebraic Operations on Functions

If $f$ and $g$ are functions with domains where the operations make sense, we define:

Example: Let $f(x)=x^2$, $g(x)=x+1$. Then

5. Important Properties & Types (brief)

Example: $f(x)=x^3$ is odd and bijective (as $f:\mathbb{R}\to\mathbb{R}$). $f(x)=x^2$ is even and not injective on $\mathbb{R}$.

6. Rules

7. Examples

  1. Find domain and range: $f(x)=\dfrac{1}{x-2}$. Domain: $x\ne2$. Range: $y\ne0$ (since $1/(x-2)$ attains every real except 0).
  2. Composition: $f(x)=x^2,\ g(x)=x+1$. Then $(f\circ g)(x)=(x+1)^2$, domain all reals.
  3. Inverse existence: $f(x)=x^3$ is bijective on $\mathbb{R}$; inverse $f^{-1}(x)=\sqrt[3]{x}$.

8. Quick reminders

Cheat-sheet:Domain → set of $x$.   Co-domain → set of possible $y$.   Range → actual $y=f(x)$.Composition: $(f\\circ g)(x)=f(g(x))$.   Inverse exists iff bijective.