This is written in my textbook, with respect to the exchange lemma.
Assume that $B=\langle \vec B_1, ... , \vec B_n \rangle$ is a basis for a vector space and that for the vector $\vec v$ the relationship $\vec v = c_1 \vec B_1 + c_2 \vec B_2 + ... + c_n \vec B_n$ has $c_i \neq 0$. Then exchanging $\vec B_i$ for $\vec v$ yields another basis for the space.
PROOF: Call the outcome of the exchange $\hat B = \langle \vec B_1, ... ,\vec B_{i-1}, \vec v, \vec B_{i+1}, ..., \vec B_n \rangle$. We first show that $\hat B$ is linearly independent. Any relationship $d_1 \vec B_1 + ... + d_1 \vec v + ... + d_n \vec B_n = \vec 0$ among the members of $\hat B$, after substitution for $\vec v$,
$d_1 \vec B_1 + ... d_i (c_1 \vec B_1 + ... + c_i \vec B_i + ... + c_n \vec B_n) + d_n \vec B_n = \hat 0 $ (*)
gives a linear relationship among the members of B. The basis B is linearly independent so the coefficient $d_i c_i$ of $\vec B_i$ is zero. Because we assumed that $c_i$ is nonzero, $d_i$ = 0. Using this in equation (*) gives that all of the other d's are also zero. Therefore, $\hat B$ is linearly independent.
I have two problems with this proof. First of all, how can you just automatically assume that, after substitution, there suddenly exists a linear relationship among these new members of B with the d's in front of them? Secondly, even if you COULD assume this linear relationship, why does $d_i$ = 0 suddenly imply that the rest of the ds are 0? I don't know if it's just the wording of the proof, or if there is some mathematical concept I'm not getting, but I just can't seem to wrap my head around this proof. Thanks in advance.
After you substitute $v$ for $(c_1B_1 + \dots + c_iB_i + \dots + c_nB_n)$ you just multiply the bracket out and get the relation $$(d_1+d_ic_1)B_1 + \dots + (d_{i-1} + d_ic_{i-1})B_{i-1} + d_ic_iB_i + \dots + (d_n + c_id_n)B_n=0$$ Then because the $(B_1, \dots, B_n)$ are linearly independent this implies that all coefficients in the last line have to be $0$. Because $c_i \ne 0$ looking at the coefficient of $B_i$ yields that $d_i=0$, otherwise the product $d_ic_i$ wouldn't be $0$. This means that all terms with $d_i$ will cancel and we are left with $$d_1B_1 + \dots d_{i-1}B_{i-1} + 0 B_i + \dots + d_nB_n=0$$ which is again a linear combination of $(B_1, \dots, B_n)$ which sums to $0$. But because this set is a basis and hence linearly independent this is only possible if all coefficients of the last line are $0$, which implies that $d_1=d_2= \dots = d_n=0$.