[step:Show that a maximal linearly independent set spans $V$]We claim $B$ spans $V$. Let $v \in V$. We split into two cases.
**Case 1: $v \in B$.** Then $v \in \operatorname{span}(B)$, since $v = 1 \cdot v$ is a linear combination of elements of $B$.
**Case 2: $v \notin B$.** Consider the set $B \cup \{v\} \subseteq V$. We have $B \subsetneq B \cup \{v\}$ (strict inclusion since $v \notin B$), so by maximality of $B$ in $X$, the set $B \cup \{v\}$ is **not** in $X$ — that is, $B \cup \{v\}$ is linearly **dependent**. Hence there exist distinct vectors $w_1, \ldots, w_n \in B \cup \{v\}$ and scalars $\mu_1, \ldots, \mu_n \in k$, not all zero, with
\begin{align*}
\mu_1 w_1 + \cdots + \mu_n w_n = 0.
\end{align*}
The vector $v$ must appear among $w_1, \ldots, w_n$: otherwise all $w_j \in B$, giving a non-trivial relation in $B$, which contradicts $B$ being linearly independent. Relabel so $w_1 = v$, and write the relation as
\begin{align*}
\mu_1 v + \mu_2 w_2 + \cdots + \mu_n w_n = 0,
\end{align*}
where now $w_2, \ldots, w_n \in B$. Moreover $\mu_1 \neq 0$: if $\mu_1 = 0$, then $\mu_2 w_2 + \cdots + \mu_n w_n = 0$ would be a relation in $B$, forcing $\mu_2 = \cdots = \mu_n = 0$ by linear independence of $B$, contradicting "not all zero". So $\mu_1 \neq 0$ is invertible in the field $k$, and we solve:
\begin{align*}
v = -\mu_1^{-1}(\mu_2 w_2 + \cdots + \mu_n w_n) = \sum_{j=2}^n (-\mu_1^{-1}\mu_j) w_j \in \operatorname{span}(B).
\end{align*}
In either case $v \in \operatorname{span}(B)$, so $V = \operatorname{span}(B)$. Combined with linear independence of $B$, this shows $B$ is a basis of $V$.[/step]