Under which conditions: dim(W1 + W2 + W3) = dim(W1) + dim(W2) + dim(W3) − dim(W1 ∩ W2) − dim(W2 ∩ W3) − dim(W3 ∩ W1) + dim(W1 ∩ W2 ∩ W3) Let $V$ be a finite dimensional vector space over a field $K$, and let $W_1$, $W_2$ and $W_3$ be subspaces of $V$. By analogy with the inclusion-exclusion principle for sets, and taking into account the dimension formula for a sum of 2 subspaces, we can ask whether the following equality holds:
$$\dim(W_1 + W_2 + W_3) = \dim(W_1) + \dim(W_2) + \dim(W_3) − \dim(W_1 \cap W_2) − \dim(W_2 \cap W_3) − \dim(W_3 \cap W_1) + \dim(W_1 \cap W_2 \cap W_3)$$ (†) it is false for the sum of 3 subspaces.
This formula does not always hold: for example take three distinct lines in $\mathbb R^2$ as $U$, $V$, $W$. All intersections have 0 dimensions. The LHS is $2$, the RHS is $3$.
I would like to state general assumptions on the subspaces of $W_1$, $W_2$, $W_3$ which guarantee that the formula does hold and prove it under these assumptions.
But for which triples of (finite-dimensional) subspaces does this hold? Do you have any reference for reading? I studied a few books but could not seem to find anything. To sum up, my question I am trying to prove that the formula is True even though it is False.
Many thanks
 A: The idea of PseudoNeo's comment settles the converse of my statement modulo that he missed four cases.
According to the theory of indecomposable modules of the Dynkin quiver $D_4$ with all arrows pointing to the central node there are $12$ cases corresponding to the $12$ positive roots of the Lie algebra of type $D_4$. These cases for $(V;W_1,W_2,W_3)$ are

*

*$(0;K,0,0), (0;0,K,0), (0;0,0,K)$,

*$(K;0,0,0), (K;K,0,0), (K;0,K,0), (K;0,0,K), (K;K,K,0), (K;K,0,K),(K;0,K,K),(K;K,K,K)$

*$(K^2,K,K,K)$
All maps $W_i\to V$ in the first group are not injective. So, they are irrelevant. The second group consists precisely of those cases, where there is a basis of $V$ such that all $W_i$ are spanned by a subset of the basis.
The last is case is causing the problems. In this case the difference $\mathrm{LHS}-\mathrm{RHS}=-1$. So we arrive at the following statement:
In the formula, one always has $\mathrm{LHS}\le \mathrm{RHS}$ with equality if and only if $V$ has a basis such that all $W_i$ are spanned by a subset of that basis.
