Analysis Basics
Function
Definition
Given two sets $A$ and $B$, a function from $A$ to $B$ is a rule or
mapping that takes each element $x \in A$ and associates with it a
single element of $B$. We write $f : A \rightarrow B$. Given an element
$x \in A$, the expression $f(x)$ is used to represent the element of $B$
associated with $x$ by $f$.
The set $A$ is called the domain of $f$.
The range of $f$ is not necessarily equal to $B$ but refers to the
subset of $B$ given by $\{y \in B : y = f(x) \quad \text{for some} \quad
x \in A \}$.
Dirichlet function
The Dirichlet function is defined as:
$$ f\left( x \right) =\begin{cases}1& \text{if} \quad x\in \mathbb{Q} \\ 0&\text{if} \quad x\notin \mathbb{Q}\end{cases} $$The domain is $\mathbb{R}$.
Absolute value function
The absolute value function is defined as:
$$ f\left( x \right) =\begin{cases}x& \text{if} \quad x \geq 0 \\ -x&\text{if} \quad x \leq 0\end{cases} $$The domain is $\mathbb{R}$.