Showing the Riemann integral is a linear operator over step functions Given an interval $[a,b]$, let $S[a,b]$ be the set of all step functions for all possible finite partitions of $[a,b]$. Given a partition $x_0,\dots, x_n$ of $[a,b]$, define $\chi_i$ as the characteristic function on $[x_{i-1},x_i)$.
For the step function $\sum_{i=1} ^ns_i\chi_i(x)$, define $I\Big(\sum_{i=1} ^ns_i\chi_i(x)\Big)=\sum_{i=1} ^ns_i(x_i-x_{i-1})$. I am having difficulty showing $I$ is linear. Given two partitions $x_0,\ldots, x_n$ and $y_0,\ldots, y_m$, how can I show $$I\Big(\alpha\sum_{i=1}^ns_i\chi_i(x)+\beta\sum_{i=1}^mt_i \chi_i(x)\Big)=\alpha I\Big(\sum_{i=1}^ns_i\chi_i(x) \Big)+\beta I\Big(\sum_{i=1}^m t_i\chi_i(x)\Big)$$
I tried to write  $\alpha\sum_{i=1}^ns_i\chi_i(x)+\beta\sum_{i=1}^mt_i \chi_i(x)$ as a single sum $\delta\sum_{i=1}^lr_i\chi_i(x)$, but I don't see how to relate $\gamma$ to $\alpha, \beta$, how to relate $l$ to $m,n$, etc.
 A: Hint/Outline:
First, you need to prove this $I$ operator is well-defined. It is entirely possible to have two different $[x_0,\dots,x_n]$ and different $s_i$ and get the same step function - if, say, $s_i=s_{i+1}$ in one, so you can drop $x_i$.
Your notation is going to cause you trouble, because the $\chi_i$ for $s$ is different than the $\chi_i$ for $t$. 
You might want to say "but I can just take the smallest partition!" No, it makes it much easier if you prove this first.
Why? Because if you have $s(x)$ defined for $x_0=a,\dots,x_n=b$ and $t(x)$ define for $y_0,\dots,y_m$ then you can take a "common refinement" of $z_0=a,\dots,z_k=b$ where $\{x_i\}\cup\{y_j\}\in \{z_{\ell}\}$.
Once you have $s$ and $t$ defined on the same partition, it is very easy.
(Note, you need this notion of common partition to even prove that $S[a,b]$ is a vector space, because you need to prove that $s+t\in S[a,b]$ if $s,t\in S[a,b]$.)
Example:
Let $[a.b]=[0,6]$ and define: 
$$\begin{align}
s(x)&=\begin{cases}1&0\leq x<3\\2&3\leq x\leq 6\end{cases}\\
t(x)&=\begin{cases}3&0\leq x<2\\2&2\leq x< 4\\1&4\leq x\leq 6\end{cases}
\end{align}$$
Then you need to partition $0<2<3<4<6$ to get them into the same partition, and
$$\alpha s(x)+\beta t(x) = \begin{cases}
\alpha+3\beta&x<2\\
\alpha+2\beta&2\leq x<3\\
2\alpha+2\beta&3\leq x<4\\
2\alpha+3\beta&4\leq x\leq 6
\end{cases}$$
Outline for proving well-defined
So, how do we prove $I$ is well-defined? We do so by induction. 
First, take an example of $\pi=\{a=x_0,\dots,b=x_n\}$ is a partition, and $1<j<n$ with $s_{i+1}=s_i$, we can define  $\pi'$ by removing $x_i$ from the sequence, and then defining a new $t_i'$ on the new intervals. Then show that $I$ applied to these two different representations is the same.
Next, show that every representation of $s$ can be gotten by taking the minimal representation, then adding elements to the partition.
Therefore, $I$ applied to $s$ as defined by any partition can be inductively seen to be the same as $I$ applied to $s$ defined on its minimal partition representation. So $I$ is well-defined.
If you want to make this absolutely rigorous, it will be painful. You have to define things with care. It helps if you know what a "direct limit" is. 
A: First we need to see that any refinement of the initial partition has the same integral. 
$$
{Let\space  be\quad  \Pi_n \space a \space partition\space of \space [a,b]\space such \space that} \\
{a = x_0 < x_1 < x_2 < \ldots < x_n = b}\\~\\{Then,\space for\quad z\in [x_{i-1},x_i) \quad we \space have:}\\
s_i(x_i- x_{i-1})=s_i(x_i-z) + s_i(z- x_{i-1})\\~\\
This \space means \space that \quad \Pi_{n+1} \space such \space that\\
{a = x_0 < x_1 < \ldots < x_{i-1}<z<x_i<\ldots<x_n = b}\\~\\has \space the \space same\space integral \space value\space(as\space any \space refinement).\\~\\Now\space we \space can \space use\space a \space refinement\space of \space both\space partitions.\\~\\If \quad \Pi_1= \{a = x_0 ,x_1 , x_2 , \ldots , x_n = b\} \quad and \quad \Pi_2= \{a = y_0 ,y_1 , y_2 , \ldots , y_m = b\}\\~\\We \space define \quad \Pi^{'}=\Pi_1 \cup \Pi_2= \{a = z_0 ,z_1 , z_2 , \ldots , z_k = b\} ,\\~\\{noticing \space that\quad \Pi^{'} \quad is \space a \space refinement\space of \space both\space partitions.}\\~\\We \space also \space need \space to \space reassignate\space the \space  heights\space of \space the \space step\space functions\quad{(s_i^{'}=\alpha s_i \quad and \quad t_i^{'}=\beta t_i).}\\~\\Thus\\~\\
I\Big(\alpha\sum_{i=1}^ns_i\chi_i(x)+\beta\sum_{i=1}^mt_i \chi_i(x)\Big)=I\Big(\sum_{i=1}^ns_i^{'} \chi_i(x)+\sum_{i=1}^m t_i^{'} \chi_i(x)\Big)\\~\\=I\Big(\sum_{i=1}^k s_i^{'} \chi_i(x)+\sum_{i=1}^k t_i^{'} \chi_i(x)\Big)\\~\\=I\Big(\sum_{i=1}^k[{ s_i^{'} \chi_i(x)+ t_i^{'} \chi_i(x)}]\Big)\\~\\=I\Big(\sum_{i=1}^k{( s_i^{'} + t_i^{'}) \chi_i(x)}\Big)\\~\\=I\Big(\sum_{i=1}^k{r_i \chi_i(x)}\Big)\quad (a \space sum \space of \space step\space functions \space is \space also \space a \space step\space function)\\~\\=\sum_{i=1}^k r_i (z_i - z_{i-1})\\~\\=\sum_{i=1}^k ( s_i^{'} + t_i^{'})  (z_i - z_{i-1})\\~\\=\sum_{i=1}^k s_i^{'} (z_i - z_{i-1}) + \sum_{i=1}^k t_i^{'} (z_i - z_{i-1})\\~\\=\alpha({\sum_{i=1}^k s_i (z_i - z_{i-1})}) + \beta({\sum_{i=1}^k t_i (z_i - z_{i-1})})\\~\\=\alpha({\sum_{i=1}^n s_i (x_i - x_{i-1})}) + \beta({\sum_{i=1}^m t_i (y_i - y_{i-1})})\\~\\=\alpha \space I\Big(\sum_{i=1}^n{ s_i \chi_i(x)}\Big) + \beta \space I\Big(\sum_{i=1}^m{ t_i \chi_i(x)}\Big)
$$
