# Proof $\dim(\text{im}(f)\cap\ker(g)) = \dim(\text{im}(f))-\dim(\text{im}(gf))$

In one of the exercises in my textbook we had to prove the following:

Consider $$3$$ $$K$$-vectorspaces $$U$$, $$V$$ and $$W$$ and $$2$$ maps:

• $$f\in\text{Hom}_K(U,V)$$
• $$g\in\text{Hom}_K(V,W)$$

then : $$$$\dim(\text{im}(f)\cap\ker(g)) = \dim(\text{im}(f))-\dim(\text{im}(gf))$$$$

This proof wasn't addressed during the lectures so I tried to understand it at home but I don't understand most of the steps. The proof is as follows:

We consider the map $$g|_{f(U)}:f(U)\rightarrow W$$ which is the restriction of $$g$$ to the image $$\text{im}(f)\leqslant V$$.

$$$$\begin{split} \dim(\text{im}(f)) & = \dim(\ker(g|_{f(U)})) + \dim(\text{im}(g|_{f(U)})) \\ & = \dim(\{v\in\text{im}(f)\;|\;g(v) = 0\}) + \dim(\{g(v)\;|\; v\in\text{im}(f)\}) \\ & = \dim(\text{im}(f)\cap\ker(g)) + \dim(\{(gf)(w)\;|\;w\in U\}) \\ & = \dim(\text{im}(f)\cap\ker(g)) + \dim(\text{im}(gf)) \end{split}$$$$

And then the formula follows from this.

My guess is that in the firs step they use the following:

$$$$\dim(V) = \dim(\ker(f))+\dim(\text{im}(f))$$$$

But I don't quite get why they use $$g|_{f(U)}$$ as the function in this equation and where it comes from. I also need some help understanding the transition between step 1 and 2 and between 2 and 3. The last step I do understand. Would someone be able to explain this?

• yes, the definition of kernel is: $\ker(f) := \{v\in V\;|\;f(v) = 0\}$ so you could say that after the function the kernel is all the vectors that do not have an image so their image is the nullspace, and the image is: $\text{im}(f) := \{f(v)\;|\; v\in V\}$ if $f:V\rightarrow W$ is a linear map between $2$ $K$-vectorspaces so i guess the image is what isn't in the kernel en vice versa. – Viktor Jan 12 at 15:31