# A question about the codimension of the vector space.

Let $K$ be a field and $V$ be a vector space on $K$, $U$ and $W$ be two subspaces of $V$. Then if $\operatorname{codim}U$ and $\operatorname{codim}W$ are both finite, then prove the formula: $$\operatorname{codim}(U\cap W)+\operatorname{codim}(U+W)= \operatorname{codim}U +\operatorname{codim}W.$$

Here the dimension of the space $V$ is without restriction, that's to say, the dimension of space $V$ could be infinite or finite.

(I think if we think about the quotient space, then the problem will be easy, but I still can not solve it.)

The hypothesis means that $V/U$ and $V/W$ are finite dimensional.
Now you can consider the map $$T\colon V\to (V/U)\oplus(V/W) \qquad v\mapsto (v+U,v+W)$$ which is linear and has kernel $U\cap W$. Therefore $V/(U\cap W)$ is isomorphic to a subspace of $(V/U)\oplus(V/W)$, so it is finite dimensional.
Thus you can use Grassmann's formula in $V'=V/(U\cap W)$ for $U'=U/(U\cap W)$ and $W'=W/(U\cap W)$ and $U'+W'=(U+W)/(U\cap W)$.