Proof (ordinary homology to rational homology)

Consider the natural $\Z$-module homomorphism $C_n(K)\hookrightarrow C_n(K; \Q)$. Because $B_n(K) \hookrightarrow B_n(K; \Q)$ and $Z_n(K) \hookrightarrow Z_n(K; \Q)$, this induces $H_n(K) \to H_n(K; \Q)$.

Since $H_n(K; \Q)$ is a finite-dimensional $\Q$-vector space, $H_n(K; \Q) \isom \Q^{e}$. We want to show $d = e$.

Let $b_1 + B_n(K), \ldots, b_d + B_n(K)$ be a basis for the $\Z^d$ component of $H_n(K)$.

$e\leq d$

For any $x\in Z_n(K; \Q)$, $x$ is a rational linear combination of oriented $n$-simplices, so by multiplying a common denominator $m$ of the coefficients, we get $mx \in Z_n(K)$.

Therefore every element of $Z_n(K; \Q)$ is a rational multiple of $Z_n(K)$. Taking a quotient, every element of $H_n(K; \Q)$ is a rational multiple of $H_n(K)\isom \Z^d \oplus F$, so a $\Q$-linear combination of $b_1 + B_n(K; \Q), \ldots, b_d + B_n(K; \Q)$ and an torsion element of $F$.

However any torsion element $y+B_n(K)$ is zero in $H_n(K; \Q)$ (i.e. $y\in B_n(K; \Q)$, because if $ry \in B_n(K)$ for some non-zero $r\in \Z$, then $ry\in B_n(K; \Q)$, so $y\in B_n(K; \Q)$). Thus $H_n(K; \Q)$ has dimension at most $d$.

$d\leq e$

We want to show $b_1 + B_n(K; \Q), \ldots, b_d + B_n(K; \Q)$ are $\Q$-linearly independent. Suppose $\sum_{i=1}^{d} λ_i b_i \in B_n(K; \Q)$ for some $λ_i\in \Q$. Say this equals $d_{n+1}(z)$ for some $z\in C_{n+1}(K; \Q)$. Multiplying by a common denominator $m$ of the $λ_i$'s and coefficients in $z$, we obtain $\sum_{i=1}^{d} (mλ_i) b_i = d_n(mz)\in B_n(K)$, so $\sum_{i=1}^{d} (mλ_i)(b_i + B_n(K)) = 0$ in $H_n(K)$. However $b_1, \ldots, b_d$ freely generates $H_n(K)$, so we have $mλ_i = 0$ i.e. $λ_i = 0$ for all $i$.