Dimension sum formula for subspaces of a infinite dimensional vector space Let $ \, K \, $ be a field, $X \, $ a $ \, K$-vector space and $ \, V \, $ and $ \, W \, $ subspaces of $ \, X$. I wonder if the (Hamel - algebraic) dimension formula of the sum $ \ V+W \ $ still holds for infinite dimensional case. Namely

$dim_K (V+W) + dim_K (V \cap W) = dim_K(V) + dim_K(W) \ . $

Specifically, let $ \, B \, $ be a basis for $ \ V \cap W$, $B_V \ $ be a basis for $ \, V$, $B_W \ $ be a basis for $ \, W \, $ and $ \, \overline{B_V} \, $ and $ \, \overline{B_W} \, $ be basis for $ \ V+W \ $ such that $$B \subset B_V \subset \overline{B_V} \qquad \text{and} \qquad B \subset B_W \subset \overline{B_W} \ \ \ . $$ I would like to find a bijection $$\overline{B_V} \sqcup B \to B_V \sqcup B_W \ \ , $$ if this is possible.
If not, then a counterexample would help. But I would still want to know if at least the inequality $$dim_K (V+W) \leq dim_K(V) + dim_K(W)$$ is valid. That is, find an injection $$\overline{B_V} \to B_V \sqcup B_W$$ or a surjection $$B_V \sqcup B_W \twoheadrightarrow \overline{B_V} \ \ . $$
Thanks in advance.
 A: Consider the linear map $T\colon V\oplus W\to X$ given by $T(v,w):=v+w$. Then $\dim{V\oplus W}=\dim{\ker{T}}+\dim{(V+W)}$.
Now, the linear map $\psi\colon V\cap W\to V\oplus W$ defined by $\psi(x):=(x,-x)$ is such that


*

*$\psi(x)\in\ker{T}$ for all $x\in V\cap W$,

*$\psi$ is onto $\ker{T}$, for if $(v,w)\in\ker{T}$, then $v+w=0$, then $v=-w\in V\cap W$ and $\psi(v)=(v,-v)=(v,w)$, and

*$\psi$ is $1-1$.


Hence $\dim{\ker{T}}=\dim{V\cap W}$, and we are done.
A: The following proof works for both finite and infinite vector spaces.
Let $\mathcal B$ be a basis for $V\cap W$. There exists a basis $\mathcal C$ of $V$ such that $\mathcal B\subset \mathcal C$. Similarly, there exists a basis $\mathcal D$ of $W$ such that $\mathcal B\subset \mathcal D$.
CLAIM: $\mathcal C\cup \mathcal D$ is a basis for $V+W$.
We will use this claim to prove the equality. By the definitions of cardinal sum and of dimension:
$$\dim(V+W)+\dim(V\cap W)=|\mathcal C\cup \mathcal D|+|\mathcal B|=|(\mathcal C\setminus \mathcal B)\cup \mathcal B\cup(\mathcal D\setminus \mathcal B)|+|\mathcal B|$$
$$|\mathcal C\setminus \mathcal B|+|\mathcal B|+|\mathcal D\setminus \mathcal B|+|\mathcal B|=|(\mathcal C\setminus \mathcal B)\cup \mathcal B|+|(\mathcal D\setminus \mathcal B)\cup \mathcal B|=|\mathcal C|+|\mathcal D|=\dim V+\dim W.$$
PROOF OF THE CLAIM: Indeed, notice that $\mathcal C\cup \mathcal D=\mathcal C'\cup \mathcal B\cup \mathcal D'$, where $\mathcal C'=\mathcal C\setminus \mathcal B$ and $\mathcal D'=\mathcal D\setminus \mathcal B$, and that $\mathcal B, \mathcal C', \mathcal D'$ are pairwise disjoint.
$\mathcal C\cup \mathcal D$ generates $\mathcal V+W$: given $v \in V$ and $w \in W$, there exists finite sets $I \subset \mathcal C$, $J\subset \mathcal W$ and scalars $(a_x: x \in I)$, $(b_y: y \in J)$ such that:
$$v=\sum_{x \in I}a_x x, \, w=\sum_{y \in J}b_y y$$
Therefore:
$$v+w=\sum_{z \in I\cup J}c_z z$$
Where $c_z=a_z$, if $z \in \mathcal C'$, $c_z=a_z$, if $z \in \mathcal C'$ $c_z=b_z$, if $z \in \mathcal D'$ and  $c_z=a_z+b_z$, if $z \in \mathcal B$.
It remains to see that $\mathcal C\cup \mathcal D$ is linearly independent. Suppose $I\subset \mathcal F\cup \mathcal D$ is finite and:
$$0=\sum_{z \in F}c_z z$$
We must see that each $c_z$ is zero. Let:
$I=F\cap \mathcal C'$, $J=F\cap \mathcal D'$, $K=F\cap \mathcal B$. Notice that $I\cup J\cup K=F$ and that $I, J, K$ are pairwise disjoint. Then:
$$0=\sum_{z \in I}c_z z+\sum_{z \in J}c_z z+\sum_{z \in K}c_z z$$
Therefore,
$$-\sum_{z \in I}c_z z=\sum_{z \in J}c_z z+\sum_{z \in K}c_z z$$
This implies that $-\sum_{z \in I}c_z \in V\cap W$, so there exists a finite subset $L$ of $\mathcal B$ and scalars $d_z$ for $z \in L$ such that:
$-\sum_{z \in I}c_z z=\sum_{z \in L}d_z z$.
Therefore:
$$\sum_{z \in L}d_z z=\sum_{z \in J}c_z z+\sum_{z \in K}c_z z$$
So by defining $e_z$ for $L\cup J\cup K$ such that $e_z=c_z$ for $z \in J$, $e_z= c_z$ for $z \in K\setminus L$, $e_z=-d_z$ for $ z \in L\setminus K$ and $e_z=-d_z+c_z$ for $z \in K\cap L$, it follows that:
$\sum_{z \in L\cup K\cup J}e_z z=0$
Since $L\cup K\cup J\subset \mathcal D$ is linearly independent, all $e_z$ are zero. Therefore for all $z \in J$, $e_z=c_z=0$.
Now recall that:
$$0=\sum_{z \in I}c_z z+\sum_{z \in J}c_z z+\sum_{z \in K}c_z z$$
So,
$$0=\sum_{z \in I}c_z z+\sum_{z \in K}c_z z$$
Since $I\cup K$ is linearly independent and $I, K$ are disjoint, it follows that all the other $c_z$ are also zero. This proves the claim.
A: I started to write this before the analogous answer by Vinicius Rodrigues above. My notation is somewhat different, so I decided to post it anyway :-)

Another partial answer (a proof for the formula, but not showing a bijection) goes this way: forget about $ \, \overline{B_V} \, $ and $ \, \overline{B_W} \, $ and let's prove that $ \ B_V \cup B_W \ $ is a basis for $ \ V+W$.


PRELUDE

If $ \ V \subset W \ $ or $ \ W \subset V \, $, then the formula holds trivially. Let $ \ V \not\subset W \ $ and $ \ W \not\subset V \, $. So, $ \ B_V \not\subset B_W \ $ and $ \ B_W \not\subset B_V \, $.
Note that $ \ B = B_V \cap B_W \ $. In fact, it is straightforward that $ \ B \subset B_V \cap B_W \ $. If it was the case that $ \ B_V \cap B_W \not\subset B \, $, then there would be some $ \ x \in B_V \cap B_W \subset V \cap W \ $ such that $ \ x \notin B$. So, $ \, x \, $ would be a nonzero linear combination of elements from $ \ B \subset (B_V \setminus \left\{ x \right\} )$, which is absurd.
Thus $ \ B_V \setminus B \neq \varnothing \ $ and $ \ B_W \setminus B \neq \varnothing \, $.
We have a union $$B_V \cup B_W = B \cup (B_V \setminus B) \cup (B_W \setminus B)$$ in which $ \ B \cap (B_V \setminus B) = \varnothing \, $, $ \ B \cap (B_W \setminus B) = \varnothing \ $ and $ \ (B_V \setminus B) \cap (B_W \setminus B) = \varnothing \, $. In fact, $ \ (B_V \setminus B) \cap (B_W \setminus B) = (B_V \cap B_W) \setminus B = B \setminus B$.


PROOF THAT $ \ B_V \cup B_W \ $ IS A BASIS FOR $ \ V+W$.

It is clear that $ \ B_V \cup B_W \ $ spans $ \ V+W$. Let's prove that $ \ B_V \cup B_W \ $ is a linearly independent set. Let $ \ \alpha_1,...,\alpha_r \in K \ $ and $ \ u_1,...,u_r \in B_V \cup B_W \ $ be such that $$\sum_{j=1}^{r} \alpha_j \ u_j = 0_X \ \ . $$ If $ \ \left\{ u_1,...,u_r \right\} \subset B_V \ $ or $ \ \left\{ u_1,...,u_r \right\} \subset B_W$, then it is clear that $ \ \left\{ \alpha_1 , ... , \alpha_r \right\} = \left\{ 0_K \right\}$, because $ \, B_V \, $ and $ \, B_W \, $ are linearly independent sets. The other case is $ \ \left\{ u_1,...,u_r \right\} \cap (B_V \setminus B) \neq \varnothing \ $ and $ \ \left\{ u_1,...,u_r \right\} \cap (B_W \setminus B) \neq \varnothing \ $.
The first possibility is $ \ \left\{ u_1,...,u_r \right\} \cap B = \varnothing \, $, that is, $ \ \left\{ u_1,...,u_r \right\} \subset (B_V \cup B_W) \setminus B \, $. Say $ \ \left\{ u_1,...,u_r \right\} \cap (B_V \setminus B) = \left\{ v_1,...,v_m \right\} \ $ and $ \ \left\{ u_1,...,u_r \right\} \cap (B_W \setminus B) = \left\{ w_1,...,w_q \right\} \ $. Hence
$\begin{array}{cccr}
\qquad \qquad & \qquad \qquad & \displaystyle 0_X = \sum_{j=1}^{r} \alpha_j \ u_j = \sum_{j=1}^{m} \beta_j \ v_j + \sum_{j=1}^{q} \gamma_j \ w_j \ \ , & \qquad \qquad \qquad (1)
\end{array}$
where $ \ \left\{ \alpha_1 , ... , \alpha_r \right\} = \left\{ \beta_1 , ... , \beta_m , \gamma_1 , ... , \gamma_q \right\} \ $ and $ \ r = m+q \, $. That is, the betas and gammas are other convenient names (and indexes) for the alphas. We can state this defining $ \ \beta_j = \alpha_{\ell} \ $ if, and only if, $ \ v_j = u_{\ell} \, $, $\forall j \in \left\{ 1, ..., m \right\}$, $\forall \ell \in \left\{ 1, ..., r \right\} \, $, and $ \ \gamma_i = \alpha_{k} \ $ if, and only if, $ \ w_i = u_{k} \, $, $\forall i \in \left\{ 1, ..., q \right\}$, $\forall k \in \left\{ 1, ..., r \right\}$. Therefore $$\sum_{j=1}^{m} \beta_j \ v_j = - \sum_{j=1}^{q} \gamma_j \ w_j \in V \cap W \ \ . $$ Consequently, since $ \, B \, $ is a basis for $ \ V \cap W$, there exists $ \ \lambda_1 , ... , \lambda_p \in K \ $ and $ \ b_1 , ... , b_p \in B \ $ such that $$\sum_{j=1}^{m} \beta_j \ v_j = \sum_{j=1}^{p} \lambda_j \ b_j \ \ . $$ Substituting in $(1)$ we have $$0_X = \sum_{j=1}^{p} \lambda_j \ b_j + \sum_{j=1}^{q} \gamma_j \ w_j \ \ . $$ But $ \ b_1 , ... , b_p , w_1 , ... , w_q \in B_W \ $ and $ \, B_W \, $ is a linearly independent set. Thus $$\lambda_1 = \ ... \ = \lambda_p = \gamma_1 = \ ... \ = \gamma_q = 0_K \ \ . $$ Substituting in $(1)$ again we have $ \displaystyle \ 0_X = \sum_{j=1}^{m} \beta_j \ v_j \ $. Now since $ \ v_1 , ... , v_m \in B_V \ $ and $ \, B_V \, $ is a linearly independent set, we conclude that $ \ \beta_1 = \ ... \ = \beta_m = 0_K \ $. Ergo $$\left\{ \alpha_1 , ... , \alpha_r \right\} = \left\{ \beta_1 , ... , \beta_m , \gamma_1 , ... , \gamma_q \right\} = \left\{ 0_K \right\} \ . $$
The second possibility is $ \ \left\{ u_1,...,u_r \right\} \cap B \neq \varnothing \ $. Say $ \ \left\{ u_1,...,u_r \right\} \cap B = \left\{ x_1,...,x_n \right\} \ $, $ \ \left\{ u_1,...,u_r \right\} \cap (B_V \setminus B) = \left\{ v_1,...,v_m \right\} \ $ and $ \ \left\{ u_1,...,u_r \right\} \cap (B_W \setminus B) = \left\{ w_1,...,w_q \right\} \ $. Defining as before $ \ \beta_j = \alpha_{\ell} \ $ if, and only if, $ \ v_j = u_{\ell} \, $, $\forall j \in \left\{ 1, ..., m \right\}$, $\forall \ell \in \left\{ 1, ..., r \right\} \, $, $ \ \gamma_i = \alpha_{k} \ $ if, and only if, $ \ w_i = u_{k} \, $, $\forall i \in \left\{ 1, ..., q \right\}$, $\forall k \in \left\{ 1, ..., r \right\} \, $ and $ \ \rho_s = \alpha_{t} \ $ if, and only if, $ \ x_s = u_{t} \, $, $\forall s \in \left\{ 1, ..., n \right\}$, $\forall t \in \left\{ 1, ..., r \right\} \, $, we have $$\left\{ \alpha_1 , ... , \alpha_r \right\} = \left\{ \beta_1 , ... , \beta_m , \gamma_1 , ... , \gamma_q, \rho_1 , ... , \rho_n \right\}$$ and $ \ r = m+q+n \, $. That is, the betas, gammas and rho's are other convenient names (and indexes) for the alphas. Hence
$\begin{array}{ccr}
\qquad \qquad & \qquad \displaystyle 0_X = \sum_{j=1}^{r} \alpha_j \ u_j = \sum_{j=1}^{m} \beta_j \ v_j + \sum_{j=1}^{q} \gamma_j \ w_j + \sum_{j=1}^{n} \rho_j \ x_j \ \ . & \qquad \qquad (2)
\end{array}$
And we have $$\sum_{j=1}^{m} \beta_j \ v_j = - \sum_{j=1}^{q} \gamma_j \ w_j - \sum_{j=1}^{n} \rho_j \ x_j \in V \cap W \ \ .$$ Like before, since $ \, B \, $ is a basis for $ \ V \cap W$, there exists $ \ \lambda_1 , ... , \lambda_p \in K \ $ and $ \ b_1 , ... , b_p \in B \ $ such that $$\sum_{j=1}^{m} \beta_j \ v_j = \sum_{j=1}^{p} \lambda_j \ b_j \ \ . $$ Substituting in $(2)$ we have $$0_X = \sum_{j=1}^{p} \lambda_j \ b_j + \sum_{j=1}^{q} \gamma_j \ w_j + \sum_{j=1}^{n} \rho_j \ x_j \ \ . $$ But $ \ b_1 , ... , b_p , w_1 , ... , w_q, x_1, ..., x_n \in B_W \ $ and $ \, B_W \, $ is a linearly independent set. Thus $$\lambda_1 = \ ... \ = \lambda_p = \gamma_1 = \ ... \ = \gamma_q = \rho_1 = \ ... \ = \rho_n = 0_K \ \ . $$ Substituting in $(2)$ again we have $ \displaystyle \ 0_X = \sum_{j=1}^{m} \beta_j \ v_j \ $. Now since $ \ v_1 , ... , v_m \in B_V \ $ and $ \, B_V \, $ is a linearly independent set, we conclude that $ \ \beta_1 = \ ... \ = \beta_m = 0_K \ $. It follows that $$\left\{ \alpha_1 , ... , \alpha_r \right\} = \left\{ \beta_1 , ... , \beta_m , \gamma_1 , ... , \gamma_q , \rho_1 , ... , \rho_n \right\} = \left\{ 0_K \right\} \ . $$ Since all the possibilities imply $ \ \alpha_j = 0_K \, $, $\forall j \in \left\{ 1,...,r \right\}$, we proved that $ \ B_V \cup B_W \ $ is a linearly independent set. Therefore, $ \ B_V \cup B_W \ $ is a basis for $ \ V \cup W \, $.

Finally
\begin{eqnarray*}
dim_K (V+W) + dim_K (V \cap W) & = & |B_V \cup B_W| + |B| \\ & = & |B \cup (B_V \setminus B) \cup (B_W \setminus B)| + |B| \\ & = & |B \sqcup (B_V \setminus B) \sqcup (B_W \setminus B)| + |B| \\ & = & |B \sqcup (B_V \setminus B) \sqcup (B_W \setminus B) \sqcup B| \\ & = & |B \sqcup (B_V \setminus B)| + |(B_W \setminus B) \sqcup B| \\ & = & |B \cup (B_V \setminus B)| + |(B_W \setminus B) \cup B| \\ & = & |B_V| + |B_W| \\ & = & dim_K(V) + dim_K(W) \ \, .
\end{eqnarray*}
