Let $W, V$ inner product spaces, and $T: V \to W$. Let $T^*: W\to V$ the conjugate transpose of $T$, which means: $$ \left<Tv,w\right>=\left<v,T^*w\right>,\forall v\in V,w\in W $$ I need to prove the following equality: $$ \dim\ker T^*=\dim\ker T+\dim W-\dim V $$
So I defined the following: $$ T^*T: V \to V \\ TT^*: W \to W $$ We know that: $$ \dim V=\dim \ker T^*T + \dim \text{Im}T^*T\\ \dim W=\dim \ker TT^* + \dim \text{Im}TT^* $$
Now let $v \in \ker T^*T$. Then $T^*Tv=0 \Rightarrow Tv\in\ker T^*$. So we conclude: $$ 0=\left<T^*Tv,v\right> = \left<Tv,Tv\right> \Rightarrow Tv=0 \Rightarrow v\in \ker T \\ \Rightarrow\ker T^*T\subseteq \ker T $$ Let $v\in\ker T$, then $T^*Tv=T^*(0)=0 \Rightarrow v\in\ker T^*T \Longrightarrow \ker T^*T=\ker T$. The same goes for $\ker TT^*=\ker T^*$.
Combining all together: $$ \dim V=\dim \ker T + \dim \text{Im}T^*T\\ \dim W=\dim \ker T^* + \dim \text{Im}TT^* $$
All that is left to show is that $$ \dim \text{Im}T^*T = \dim \text{Im}TT^* $$
But this is where I struggle, I couldn't find a way to prove that last equality.