# Understanding a proof of the uniqueness lemma for bases

I'm having trouble understanding this proof about the uniqueness of bases, specifically, a line in the forward direction (highlighted in the image). I feel like I'm missing something obvious, and any clarification would be appreciated.

• This is almost exactly the same as the proof that prime factorisations, if they exist, are unique. $S$ is analogous to the primes, $a_1 u_1$ is analogous to $p_1^{n_1}$, $+$ is analogous to $\times$, and $\bar{0}$ is analogous to $1$. So if you understand that, then you can translate it over to this setting. – Patrick Stevens Jan 19 at 13:12

Suppose $$v = a_1u_1+...+a_nu_n = b_1w_1+...+b_kw_k$$ with $$u_i,w_i \in S$$ and $$a_i,b_i \in \mathbb{F}\setminus\{0\}$$. Then we have that $$a_1u_1+...+a_nu_n -b_1w_1-...-b_kw_k = 0$$ Suppose $$a_1 \neq b_l$$ and $$u_1 \neq w_l$$ for all values of $$l$$. This implies the existence of a nontrivial relation, since $$a_1 \neq 0$$ by assumption. Since $$u_1,...,u_n, w_1,...,w_k \in S$$ and $$S$$ is linearly independent, this yields a contradiction. This lets you 'pair off' $$a_1u_1$$ with $$b_lw_l$$ for some value of $$l$$, also implying that $$n = k$$. As with so many things, you can formalize this with induction.
Since $$S$$ is linearly independent, the linear dependence relation would normally force all those scalars to be zero; however, by assumption, these scalars are all nonzero. So, $$a_1 = b_l$$ for some $$l$$.
Another thing that follows, for the same reason, is that $$m = k$$. This should’ve been mentioned in the proof, as it is not obvious.