Finding an Explicit Basis for a Free Abelian Group Let $A$ be the free abelian group generated by the intervals $[a,b] \subseteq \mathbb{R}$, with $a,b \in{\mathbb{Q}}$.
Let $B$ by the group obtained by quotienting out by the relations $[a,b] + [b,c] = [a,c]$ for each $a,b,c \in \mathbb{Q}$.
Show that $B$ is a free abelian group by finding an explicit basis (in other words, a $\mathbb{Z}$-linearly independent spanning set, if we view $B$ as a $\mathbb{Z}$-module).
I'm not sure how to do this by hand. The reason that this question is set is that it relates to the relative homology group $H_{1}(\mathbb{R}, \mathbb{Q})$, and I guess gives a proof that it is a free abelian group? Any help with this would be much appreciated!
 A: I am not sure if $[a, a]$ counts as an interval, so I will leave it out. If this is a homework question then I assume you will give appropriate credit.
Let $S$ be the set of all intervals of the form $[0, a]$ or $[-a, 0]$ where $a \in \mathbb{Q}$ and $a > 0$. Every interval $[a, b]$ with $a, b \in \mathbb{Q}$ and $a < b$ is equivalent to a sum or difference of elements of $S$.
$$[a, b] \equiv \left\lbrace\begin{array}{lr}
[0, b] - [0, a] & \text{if } 0 < a < b, \\
[a, 0] + [0, b] & \text{if } a < 0 < b, \\
[a, 0] - [b, 0] & \text{if } a < b < 0.
\end{array}\right.
$$
Therefore the image of $S$ in $B$, which we denote as $\overline{S}$, 
is a spanning set for $B$. It remains to prove that $\overline{S}$
is linearly independent over $\mathbb{Z}$.
For any $x \in \mathbb{R}\setminus\mathbb{Q}$, define $\pi_x([a,b])$ as follows:
$$
\pi_x([a, b]) = \left\lbrace\begin{array}{lr}
1 & \text{if } x\in [a, b],\\
0 & \text{if } x\not\in [a, b].
\end{array}\right.
$$
This function extends to a unique homomorphism from $A$ to $\mathbb{Z}$. 
It also induces a homomorphism $\overline{\pi}_x$ from $B$ to $\mathbb{Z}$,
since it preserves the defining relations.
Suppose that $\overline{S}$ is not linearly independent. Then there exists
a non-trivial linear relation with a minimal number of terms:
$$\sum_{i=1}^m c_i [a_i, 0] + \sum_{j=1}^n d_j [0, b_j] \equiv 0,$$
where $0 \ne c_i \in \mathbb{Z}$, $0 \ne d_j \in \mathbb{Z}$, and 
$$a_1 < \cdots < a_m < 0 < b_1 < \cdots b_n.$$
It is allowed that $m = 0$ or $n = 0$, but not both.
Supposing that $n \neq 0$, choose $x \in \mathbb{R}\setminus\mathbb{Q}$ so that $0 < x < b_n$, but $x > b_{n-1}$ if $n>1$. Applying the homomorphism $\overline{\pi}_x$ gives
$$\sum_{i=1}^m c_i\,\pi_x([a_i, 0]) + \sum_{j=1}^n d_j\,\pi_x([0, b_j]) = 0$$
which implies that $d_n = 0$, which is a contradiction. A similar argument applies if $m \ne 0$.
