Subspace supplement with a prescribed intersection (source code)

= Subspace supplement with a prescribed intersection
{title2=$W\cap W'=U,\quad W+W'=V$}

For <vector subspaces> $U\subseteq W\subseteq V$ of a finite-dimensional <vector space>, such a $W'$ always exists. Extend a <basis> of $U$ to one of $W$, then extend again to one of $V$. Let $W'$ be spanned by the original <basis> of $U$ together with the vectors added in the second extension. Uniqueness of coordinates gives the displayed intersection and sum. Equivalently, choose a <direct sum> complement $C$ with $V=W\oplus C$ and put $W'=U\oplus C$. Necessarily $\dim W'=\dim V-\dim W+\dim U$. In $M_2(\mathbb R)$, the skew-symmetric subspace $U$ inside the traceless subspace $W$ admits $W'=\operatorname{span}\{I,\begin{pmatrix}0&1\\-1&0\end{pmatrix}\}$.