suppose V = R^{3}, and set:

U_{1}= span({(1,1,0)})

U_{2}= span({(1,0,0)})

U_{3}= span({(0,1,0)}).

then dim(U_{1}+U_{2}+U_{3}) = 2

but dim(U_{1}) + dim(U_{2}) + dim(U_{3}) - dim(U_{1}∩U_{2}) - dim(U_{1}∩U_{3}) - dim(U_{2}∩U_{3}) + dim(U_{1}∩U_{2}∩U_{3})

= 1 + 1 + 1 - 0 - 0 - 0 + 0 = 3