Let S = {v1, v2,...vn} be a set of nonzero vectors in a vector space V such that every vector in V, can be written in one and only one way as a linear combination of the vectors in S. Prove that S is a basis for V.

What I have so far is that if every vector in V can be written as a linear combination of the vectors in S, then S spans V. If S spans V then

v = a1v1 + a2v2 + ... + anvn

Now all I would have to do is prove that it is linearly independent right? I'm not sure how to go on after this.

Would I have to find a v = b1v1 +...+ bnvn so that v - v = 0? That would show the linear independence. That means a1 = b1 ... an = bn. I'm not sure if I'm going about this in a backwards way. Thanks.