I'm following a lecture note about functions of bounded variation. Below is an exposition of my understanding. I have no question, but I'm very happy to receive your suggestion.
Let $f:[a, b] \to \mathbb R$. We define the variation of $f$ on $[a, b]$ by $$ \operatorname{Var}_{[a, b]} f := \sup \left \{ \sum_{i=1}^{n-1} |f(x_{i+1}) - f(x_i) | : a=x_1 \le x_2 \le \cdots \le x_n = b \right \}. $$
If $\operatorname{Var}_{[a, b]} f < \infty$, $f$ is said to have bounded variation. Clearly, $\operatorname{Var}_{[a, b]} f \ge |f(b)-f(a)|$.
Lemma $\operatorname{Var}_{[a, b]} f = \operatorname{Var}_{[a, x]} f + \operatorname{Var}_{[x, b]} f$ for all $x \in [a, b]$.
Proof Let $a=x_1 \le x_2 \le \cdots \le x_n = b$. We assume that $x_j \le x \le x_{j+1}$ for some $j \in \{1, 2, \ldots, n\}$. Then $$ \begin{align} & \sum_{i=1}^{n-1} |f(x_{i+1}) - f(x_i) | \\ \le &\left [ \sum_{i=1}^{j-1} |f(x_{i+1}) - f(x_i) | + |x-x_j | \right ]+ \left [ |x_{j+1}-x| + \sum_{i=j+1}^{n-1} |f(x_{i+1}) - f(x_i) | + |x-x_j | \right ] \\ \le &\operatorname{Var}_{[a, x]} f + \operatorname{Var}_{[x, b]} f. \end{align} $$
It follows that $\operatorname{Var}_{[a, b]} f \le \operatorname{Var}_{[a, x]} f + \operatorname{Var}_{[x, b]} f$. Let's prove the reverse inequality. Fix $\varepsilon >0$. There exist $$ a=x_1 \le x_2 \le \cdots \le x_n = x=x'_1 \le x'_2 \le \cdots \le x'_m = b $$ such that $$ \begin{align} \operatorname{Var}_{[a, x]} f &\le \varepsilon + \sum_{i=1}^{n-1} |f(x_{i+1}) - f(x_i) |, \\ \operatorname{Var}_{[x, b]} f &\le \varepsilon + \sum_{i=1}^{m-1} |f(x'_{i+1}) - f(x'_i) | . \end{align} $$
Clearly, $\{x_1, \ldots, x_n = x_1', \ldots, x'_m\}$ forms a partition of $[a, b]$. Hence $$ \sum_{i=1}^{n-1} |f(x_{i+1}) - f(x_i) | + \sum_{i=1}^{m-1} |f(x'_{i+1}) - f(x'_i) | \le \operatorname{Var}_{[a, b]} f. $$
So $$ \operatorname{Var}_{[a, x]} f + \operatorname{Var}_{[x, b]} f \le 2 \varepsilon +\operatorname{Var}_{[a, b]} f. $$
The claim then follows by taking the limit $\varepsilon \downarrow 0$. $\tag*{$\blacksquare$}$
Now comes our main theorem that characterizes functions of bounded variation.
Theorem Let $f:[a, b] \rightarrow \mathbb{R}$. Then $f$ is of bounded variation if and only if there exists non-decreasing functions $f_1, f_2:[a, b] \rightarrow \mathbb{R}$ such that $f=f_1-$ $f_2$. Moreover, $f_1, f_2$ can be chosen such that $$ \operatorname{Var}_{[a, b]} f = f_1(b)-f_1(a)+f_2(b)-f_2(a). $$
Proof For $a \le x \le y \le b$, we have by the Lemma that $$ \begin{align} \operatorname{Var}_{[a, y]} f \pm f(y) &= \operatorname{Var}_{[a, x]} f + \operatorname{Var}_{[x, y]} f \pm f(y) \\ &\ge \operatorname{Var}_{[a, x]} f + |f(y) - f(x)| \pm f(y) \\ &\ge \operatorname{Var}_{[a, x]} \pm f (x). \end{align} $$
Let $f$ be of bounded variation. Let $f_1 (x) := \frac{\operatorname{Var}_{[a, x]} f + f(x)}{2}$ and $f_2 (x) := \frac{\operatorname{Var}_{[a, x]} f - f(x)}{2}$ for all $x \in [a, b]$. Then $f_1, f_2$ are real-valued and non-decreasing. The claim then follows easily.
Let $f_1, f_2:[a, b] \rightarrow \mathbb{R}$ be non-decreasing such that $f=f_1-$ $f_2$. We have $$ \begin{align} \operatorname{Var}_{[a, b]} f &= \operatorname{Var}_{[a, b]} (f_1-f_2) \\ &\le \operatorname{Var}_{[a, b]} f_1 + \operatorname{Var}_{[a, b]} f_2 \\ &= (f_1 (b) - f_1 (a)) + (f_2 (b) - f_2 (a)) < \infty. \end{align} $$
This completes the proof. $\tag*{$\blacksquare$}$