# Verifying that we can write a unique linear combination iff the a set of vectors are linearly independent.

I am trying to deepen my understanding of linear independence and uniqueness of linear combination.

I want to prove this statement: Assume $\{v_1,v_2,...v_n\}$ span a vector space $S$. $x \in S$ can be written as a unique linear combination of vectors $x = c_1v_1 + c_2v_2+...c_nv_n$ iff $\{v_1,v_2,...v_n\}$ are linearly independent.

Proof that if any $x \in S$ can be written as a unique linear combination of vectors $x = c_1v_1 + c_2v_2+...c_nv_n$, then $\{v_1,v_2,...v_n\}$ are linearly independent by contradiction:

Assume the negation: that we can write $x = c_1v_1 + c_2v_2+...c_nv_n$, and $\{v_1,v_2,...v_n\}$ are linearly dependent. Thus, theres exist at least one non-zero constant $d_k$ such that $0 = d_1v_1 + d_2v_2+...d_kv_k$. Hence, we can also say that $x = c_1v_1 + c_2v_2+...c_nv_n + d_1v_1 + d_2v_2+...d_kv_k$. Since there exists at least one $d_k$ that is nonzero, we contradicted the assumption that we could write $x$ uniquely.

Assume that $\{v_1,v_2,...v_n\}$ are linearly independent but there exists some $x \in S$ such that $x = c_1v_1 + c_2v_2+...c_nv_n$ and $x = d_1v_1 + d_2v_2+...d_nv_n$ such that for at least one $k$, $d_k \neq c_k$.

Then, we can rewrite as $$\vec{0} = c_1v_1 + c_2v_2+...c_nv_n - (d_1v_1 + d_2v_2+...d_nv_n) = (c_1-d_1)v_1 + (c_2-d_2)v_2 + (c_n-d_n)v_n$$

However, since for at least one $k$, $d_k \neq c_k$, one of these terms is non-zero, which by definition contradicts the assumption that $\{v_1,v_2,...v_n\}$ are linearly independent.

Is this a valid proof? If not, is are there any suggestions on how to improve it?

Just a minor typo in the forward direction. I think you meant to say $$0=d_1v_1+d_2v_2+\ldots +d_nv_n$$