Does every linearly independent set of n vectors in $R^n$ forms a basis in $R^n$? [duplicate]

Suppose you can find a set of $n$ linearly independant vectors in $R^n$ that don't span $R^n$, then take a vector not in the span of those vectors and add it to the previous set to get $n+1$ linearly independant vectors, this contradicts the replacement theorem.

The replacement theorem says if $k$ vectors span a vector space $V$ then a set of $k+1$ vectors or more must be linearly dependant.

Proof of the replacement theorem:

Suppose vectors $v_1,v_2\dots v_k$ span $V$, Let $m>k$, we shall prove the set $u_1,u_2\dots u_m$ is linearly dependant.

The proof is by contradiction, assume they are independant, then in particular the vectors $u_1,u_2\dots u_k$ are also independant, let us prove they span $V$, this shall imply the vectors $u_1,u_2\dots u_m$ are dependant.

Since the vectors $v_1,v_2\dots v_k$ span this means the equation $u_1=a_1v_1+a_2v_2+\dots a_kv_k$ has a solution, without loss of generality suppose $a_1$ is nonzero, this then means $v_1$ is a linear combination of the set $v_2,v_3\dots u_k$, so the set $v_2,v_3\dots v_k,u_1$ also spans $V$. since this set spans $V$ the equation $u_2=b_1u_1+b_2v_2+\dotsb_kv_k$ has solutions, one of the coefficients to the left of the letters $v$ must be non zero because otherwise $u_2$ would be a multiple of $u_1$ contradicting the assumption the set of letters $u$ is independent. without loss of generality assume the nonzero coefficient is $b_2$, then $v_2$ isa linear combination of the set $u_1,u_2,v_3\dots v_k$. so this set also spans.

We use the afforementioned algortihm untill we "replace" all the $v's$ by $u's$, proving the set $u_1,u_2\dots u_k$ spans $V$, implying the set $u_1,u_2\dots u_k,u_{k+1}\dots u_m$ is linearly dependant.


If it wasn't true then there would exist a proper subspace of dimension $n$ of $\Bbb R^n$ ,which can't happen.

This doesn't hold for spaces with infinite dimension.