Unclear theorem about vector spaces Can anyone explain the following theorem? When I try to understand it, it seems like a contradiction of a basis.

Is the vector v mentioned in the theorem not a linear combination of all the vectors in S, given the way v is derived? If it is a linear combination it can't be a basis, right? There is some part I don't understand correctly, I suppose.
 A: What this theorem is saying, essentially, is that, given one basis of a finite-dimensional space, you can swap out one of the basis vectors for another, provided the new vector is a linear combination of the old set: the new set will still be a basis. You'll notice this is a Lemma, not a Theorem: I expect the authors are moving towards some theorems involving change-of-basis, which is quite important in linear algebra. This particular Lemma is not that important by itself except as a stepping-stone to change-of-basis.
Remember what a basis is: a set of linearly independent vectors such that any arbitrary vector is a linear combination of vectors in the set. 
A: The key part of the lemma is that the $i$th component of $v$ must be nonzero. This ensures that $v$ is outside the span of the  other $w$s. Since the $w$s form a basis, it follows that $v$ is linearly independent from the other $w$s, and therefore replacing $w_i$ by $v$ yields a basis. The $i$ in the equation $\gamma_i \neq 0$ is the specific $i$ mentioned earlier in the lemma.
