linear independent set - $|Z|=|W|$ Let $V$ a nonzero vector space on a field $F$.
Let $W$ and $Z$ two basis of $V$. If $|W|<\infty$, then $|Z|=|W|$.
A hint is given by a certain textbook : Show that if $E$ is a basis on $V$ and $X=\{x_1,\dots, x_n\} \subset V$ is a linear independent set, then we can replace $n$ elements of $E$ by $x_1, \dots , x_n$ and find a new basis of $V$ which has the same cardinality of $E$
Here I think we have $E=Z$ and $X=W$, and we have to use the hint to show that $E$ contained at least $n$ elements. However, I don't know how to "replace $n$ elements of $E$ by $x_1, \dots , x_n$ and find a new basis of $V$ which has the same cardinality of $E$".
Is anyone could help me at this point?
 A: We are surely able to substitute zero elements from $\{x_1,\dots,x_n\}$ in $E$ so that we still have a basis.
So, assume we have been able to substitute $k$ elements from $E$ with $x_1,\dots,x_k$, so we still have a basis. To be more precise, we have found a subset $F_k$ of $E$ so $|F_k|=k$ and
$$
E_k=\{x_1,\dots,x_k\}\cup(E\setminus F_k)
$$
is a basis of $V$. If $k=n$, we are done.
Assume $k<n$ and let $E\setminus F_k=\{v_{k+1},\dots,v_m\}$ (where $m=|E|$). Then
$$\tag{1}
x_{k+1}=
\alpha_1x_1+\dots+\alpha_kx_k+\alpha_{k+1}v_{k+1}+\dots+\alpha_mv_m
$$
because $E_k$ is a basis. One of the coefficients
$$
\alpha_{k+1},\dots,\alpha_m
$$
must be nonzero, otherwise we contradict $\{x_1,\dots,x_n\}$ being linearly independent. Without loss of generality, we can assume $\alpha_{k+1}\ne0$, so that
$$
v_{k+1}=
\beta_1x_1+\dots+\beta_kx_k+\beta_{k+1}x_{k+1}+
\beta_{k+2}v_{k+2}+\dots+\beta_mv_m
$$
(compute the coefficients). Set $F_{k+1}=F_k\cup\{v_{k+1}\}$ and show that
$$
E_{k+1}=\{x_1,\dots,x_k,x_{k+1}\}\cup(E\setminus F_{k+1})
$$
is a basis of $V$.
This is rather easy: since $\{x_1,x_2,\dots,x_k,x_{k+1},v_{k+1},\dots,v_m\}$ is a spanning set for $V$ and $v_{k+1}$ is a linear combination of the remaining elements, also $E_{k+1}$ is a spanning set.
Suppose
$$
\gamma_1x_1+\dots+\gamma_kx_k+\gamma_{k+1}x_{k+1}+
\gamma_{k+2}v_{k+2}+\dots+\gamma_mv_m=0
$$
Then, by $(1)$, we can write
$$
\gamma_1x_1+\dots+\gamma_kx_k+\gamma_{k+1}(\alpha_1x_1+\dots+\alpha_kx_k+\alpha_{k+1}v_{k+1}+\dots+\alpha_mv_m)+
\gamma_{k+2}v_{k+2}+\dots+\gamma_mv_m=0
$$
and, rearranging the terms and using the fact that $E_k$ is a basis, we conclude $\gamma_{k+1}\alpha_{k+1}=0$. Since $\alpha_{k+1}\ne0$, we get $\gamma_{k+1}=0$. But then, from
$$
\gamma_1x_1+\dots+\gamma_kx_k+
\gamma_{k+2}v_{k+2}+\dots+\gamma_mv_m=0
$$
and again by the fact that $E_k$ is a basis, we obtain also
$$
\gamma_1=\dots=\gamma_k=\gamma_{k+2}=\dots=\gamma_m=0
$$
This algorithm then stops at $k=n$, as was to be shown.
Therefore $n\le m$. Now exchange the roles of $S$ and $T$.
