# Prove that $\operatorname{rank} (f) + \operatorname{rank} (g) -\dim W\leq \operatorname{rank}(g\circ f)$.

Prove that $\operatorname{rank} (f) + \operatorname{rank} (g) -\dim W\leq \operatorname{rank}(g\circ f)$, where $f:V\to W$ and $g:W\to X$ with both $f$ and $g$ being linear maps.

My attempt: The inequality is equivalent to proving that $\dim \ker (f)+\dim \ker(g)\geq \dim \ker(g\circ f).$ To prove this we can show that the set $\ker(g\circ f )\subset \ker(f)+\ker(g).$ Let $\ker(f)+\ker(g)=\{v+w:f(v)=0\text{ and } g(w)=0\}.$ So let $x\in V$ be an element of the $\ker(g\circ f).$ Then $g(f(x))=0.$ If $x\in \ker f$ then $f(x)=0_W$ and so we can represent $x$ as $x+0_W\in \ker(f)+\ker(g).$ I am not sure how to proceed further.

I know why this inequality must be true. There are some elements in $W$ not equal to $0$ that are included in the kernel of $g.$ If even one does not have a pre-image in $V$ then we get a strict inequality and if all them have a preimage then we get an inequality. I am just not able to verbalize this in a formal proof. Any insights would be much appreciated.

• There is a problem with your approach here : $\ker(f)$ and $\ker(g)$ are suspaces of different spaces ($V$ and $W$, respectively), so you can't take their sum. They have a direct sum, but it would not be a subspace of $V$ and thus it couldn't contain $\ker(g\circ f)$. Oct 30 '17 at 15:29
• Oh ok! Thanks for pointing that out. I am now trying to prove the inequality using the basis of $V$.
– nls
Oct 30 '17 at 15:33
• Jul 9 '20 at 4:09

Hint : The restriction of $g$ to the image of $f$ is a linear map $\operatorname{im}(f)\to W$, whose image is the image of $g\circ f$, and whose kernel is $\ker(g)\cap \operatorname{im}(f)$. What does the rank-nullity theorem tells you for this linear map?

• So we have $\text{rank} (f)=\dim \ker (g')+\dim \Im (g')\leq \dim \ker (g)+\text{rank} (g\circ f )\leq \dim W-\text{rank}(g)+\text{rank}(g\circ f).$ And so we are done. Here $g':\Im(f)\to W.$
– nls
Oct 30 '17 at 16:00
• The equality occurs when $\Im (f)\subset \ker(g).$
– nls
Oct 30 '17 at 16:02
• Is this correct?
– nls
Oct 30 '17 at 16:02
• You got it (although the second inequality in your first comment is actually an equality). For the equality, it should be the reverse inclusion; the equality occurs when $\ker(g)\cap\operatorname{im}(f)=\ker(g)$, which is equivalent to $\ker(g)\subset\operatorname{im}(f)$. Oct 30 '17 at 16:04
• But why is $\dim \ker(g') =\dim \ker (g)$? It could be the case that I have elements in $W$ not included in the image of $f$ that are mapped to the zero element by $g$ in $X$.
– nls
Oct 30 '17 at 16:13