Let $V$ be a vector space and $S$ a subset of $V$ with the property that whenever $v_1,v_2,\ldots v_n\in S$ and $a_1v_1+a_2v_2+\ldots a_nv_n=0$, then $a_1=a_2=\ldots=a_n=0$. Prove that every vector in the span of $S$ can be expressed uniquely as a linear combination of the vectors of $S$.
My attempt: Let $v\in Span(S)$.
$\Rightarrow v= a_1v_1+a_2v_2+\ldots a_nv_n$
If $a_1v_1+a_2v_2+\ldots a_nv_n=0$, then $a_1=a_2=\ldots=a_n=0$ and the linear combination is unique.
What about when $a_1=a_2=\ldots=a_n\neq 0$?
I can see that in this case $v$ is the linear combination of some $v_i$'s such that not all $a_i$'s are zero. How do I prove the uniqueness?