[proofplan]
We construct the complement $W$ by extending a basis for $U$ to a basis for $V$ using the [Extension of Independent Sets to Bases](/theorems/3270), then taking $W$ to be the span of the appended vectors. We verify the direct sum conditions $U + W = V$ and $U \cap W = \{0\}$ directly from the basis structure. The dimension formula then follows from the [Dimension of a Direct Sum](/theorems/3273).
[/proofplan]
[step:Extend a basis for $U$ to a basis for $V$]
Let $k := \dim U$ and $n := \dim V$. Since $U$ is a subspace of the finite-dimensional space $V$, we have $k \le n$. Let $\{u_1, \ldots, u_k\}$ be a basis for $U$. Since this is a linearly independent subset of $V$ with $k \le n$ elements, the [Extension of Independent Sets to Bases](/theorems/3270) provides vectors $v_{k+1}, \ldots, v_n \in V$ such that
\begin{align*}
\mathcal{B} := \{u_1, \ldots, u_k, v_{k+1}, \ldots, v_n\}
\end{align*}
is a basis for $V$.
[/step]
[step:Define $W = \operatorname{span}(v_{k+1}, \ldots, v_n)$ and verify $V = U + W$]
Define the subspace
\begin{align*}
W := \operatorname{span}(v_{k+1}, \ldots, v_n).
\end{align*}
We show $V = U + W$. Let $v \in V$. Since $\mathcal{B}$ is a basis for $V$, there exist scalars $a_1, \ldots, a_k, b_{k+1}, \ldots, b_n$ with
\begin{align*}
v = a_1 u_1 + \cdots + a_k u_k + b_{k+1} v_{k+1} + \cdots + b_n v_n.
\end{align*}
The first sum $a_1 u_1 + \cdots + a_k u_k$ lies in $U$ (as a linear combination of basis vectors of $U$), and the second sum $b_{k+1} v_{k+1} + \cdots + b_n v_n$ lies in $W$ (by definition of $W$). Therefore $v \in U + W$, and since $v$ was arbitrary, $V = U + W$.
[/step]
[step:Verify $U \cap W = \{0\}$ to establish the direct sum]
Let $z \in U \cap W$. Since $z \in U$, there exist scalars $a_1, \ldots, a_k$ with $z = a_1 u_1 + \cdots + a_k u_k$. Since $z \in W$, there exist scalars $b_{k+1}, \ldots, b_n$ with $z = b_{k+1} v_{k+1} + \cdots + b_n v_n$. Equating:
\begin{align*}
a_1 u_1 + \cdots + a_k u_k - b_{k+1} v_{k+1} - \cdots - b_n v_n = 0.
\end{align*}
Since $\mathcal{B} = \{u_1, \ldots, u_k, v_{k+1}, \ldots, v_n\}$ is a basis for $V$, it is linearly independent. Therefore $a_1 = \cdots = a_k = 0$ and $b_{k+1} = \cdots = b_n = 0$, giving $z = 0$.
We have shown $U \cap W = \{0\}$. Combined with $V = U + W$, this gives $V = U \oplus W$.
[guided]
The argument exploits the fact that the vectors $u_1, \ldots, u_k, v_{k+1}, \ldots, v_n$ together form a basis $\mathcal{B}$ for $V$, and a basis is in particular linearly independent.
Any vector $z \in U \cap W$ has two representations: one as a combination of the $u_i$ (because $z \in U$ and $\{u_1, \ldots, u_k\}$ is a basis for $U$) and one as a combination of the $v_j$ (because $z \in W = \operatorname{span}(v_{k+1}, \ldots, v_n)$). Subtracting these two expressions:
\begin{align*}
a_1 u_1 + \cdots + a_k u_k - b_{k+1} v_{k+1} - \cdots - b_n v_n = 0.
\end{align*}
This is a linear combination of the $n$ vectors in $\mathcal{B}$ that equals zero. The linear independence of $\mathcal{B}$ forces every coefficient to vanish, so $z = 0$. This is the only place where the linear independence of the full basis $\mathcal{B}$ is used -- the spanning property was consumed in the previous step.
[/guided]
[/step]
[step:Derive the dimension formula for the complement]
Since $V = U \oplus W$, the [Dimension of a Direct Sum](/theorems/3273) gives
\begin{align*}
\dim V = \dim U + \dim W.
\end{align*}
Rearranging: $\dim W = \dim V - \dim U = n - k$.
This formula holds for any complement $W$ of $U$, not just the one constructed above: if $V = U \oplus W'$ for any subspace $W'$, then the [Dimension of a Direct Sum](/theorems/3273) applied to the decomposition $V = U \oplus W'$ yields $\dim W' = \dim V - \dim U$.
[/step]