You might guess, by analogy with the formula for the number of elements in the union of three subsets of a finite set, that if U1,U2,U3U_1,U_2,U_3 subspaces of a finite-dimensional vector space, then

dim(U1+U2+U3)=  dimU1+dimU2+dimU3  dim(U1U2)dim(U1U3)dim(U2U3)+  dim(U1U2+U3)\begin{aligned} \dim(U_1 + U_2 + U_3) =\; &\dim U_1 + \dim U_2 + \dim U_3 \\ -\; &\dim(U_1 \cap U_2) - \dim(U_1 \cap U_3) - \dim(U_2 \cap U_3) \\ +\; &\dim(U_1 \cap U_2 + \cap U_3) \end{aligned}

Prove this or give a counterexample.


We know subspace addition is associative (see 1c/17) so we can prove this by applying the two subspace case repeatadly

dim((U1+U2)+U3)=  dim(U1+U2)+dimU3  dim((U1+U2)U3)\begin{aligned} \dim((U_1 + U_2) + U_3) =\; &\dim(U_1 + U_2) + \dim U_3 \\ -\; &\dim((U_1+U_2) \cap U_3) \\ \end{aligned}

Since (U1+U2)U3=(U1U3)+(U2U3)(U_1 + U_2) \cap U_3 = (U_1 \cap U_3)+ (U_2 \cap U_3) we can write

dim((U1+U2)U3)=dim((U1U3)+(U2U3))=dimU1U3+dimU2U3dimU1U2U3\begin{aligned} \dim((U_1+U_2)\cap U_3) &= \dim((U_1\cap U_3) + (U_2 \cap U_3)) \\ &= \dim U_1 \cap U_3 + \dim U_2 \cap U_3 \\ &- \dim U_1\cap U_2 \cap U_3 \end{aligned}

In the last line I used

(U1U3)(U2U3))=U1U2U3(U_1\cap U_3) \cap (U_2 \cap U_3)) = U_1 \cap U_2 \cap U_3

Anyway, combine this with the previous result to get

dim(U1+U2+U3)=  dimU1+dimU2+dimU3  dim(U1U2)dim(U1U3)dim(U2U3)+  dim(U1U2+U3)\begin{aligned} \dim(U_1 + U_2 + U_3) =\; &\dim U_1 + \dim U_2 + \dim U_3 \\ -\; &\dim(U_1 \cap U_2) - \dim(U_1 \cap U_3) - \dim(U_2 \cap U_3) \\ +\; &\dim(U_1 \cap U_2 + \cap U_3) \end{aligned}

As desired