# Let $f: V_n \to V_n$ be an endomorphism, prove $\text{dim}(\text{Ker}f \cap \text{Im} f) = r(f) – r(f^2)$

My problem

Let $f: V_n \to V_n$ be an endomorphism. Prove that

$\text{dim}(\text{Ker}f \cap \text{Im} f) = r(f) – r(f^2)$

• where $r$ is the rank of $f$

My solution

I am slightly confuse what $\text{dim}(\text{Ker}f \cap \text{Im} f)$ is at all, I know it’s an endomorphism, but I can’t imagine it. I found that if $f^2 = 0$, then $\text{Ker} f=\text{Im} f$ and I think I might use rank-nullity theorem: $r(f) + n(f) = n$.

#### Solutions Collecting From Web of "Let $f: V_n \to V_n$ be an endomorphism, prove $\text{dim}(\text{Ker}f \cap \text{Im} f) = r(f) – r(f^2)$"

You want to apply the rank nullity theorem not to $f$, but to the restriction of $f$ to the image of $f$. Then you will also recognise the sign error in your statement:

Let $g\colon \mathop{\rm im} f\to\mathop{\rm im} f$ be defined by $g(v)=f(v)$. Since $g$ is an endomorphism on $\mathop{\rm im} f$, we have that
$$\dim\ker g+ \dim\mathop{\rm im}g= \dim\mathop{\rm im} f.$$
Now we only have to note that $$\mathop{\rm im}g=\{g(w)\colon w\in\mathop{\rm im f}\}=\{g(f(v))\colon v\in V_n\}=\{f^2(v)\colon v\in V_n\}=\mathop{\rm im}f^2$$ and $$\ker g=\{w\in\mathop{\rm im}f\colon g(w)=0\}=\{w\in\mathop{\rm im}f\colon f(w)=0\}=\ker f\cap\mathop{\rm im}f.$$
And of course the rank of an endomorphism is (by definition?) the dimension of its image.

If $f$ is an isomorphism, then it is obvious. Assume that $f$ is not an
isomorphism, and hence we can express
$V_n$ as a direct sum of the generalised eigenspaces of $f$.
$$V_n=W({\lambda_1})\oplus\cdots\oplus W({\lambda_k}),$$
where $\lambda_1,\ldots,\lambda_k$ are the eigenvalues. As one of the is zero, set $\lambda_1=0$. Thus we can express $V_n$ as
$$W(0)\oplus \hat{W},$$
where $\hat{W}$ is the direct sum of the remaining generalised eigenspaces. Note that $f[W(0)]\subset W(0)$ and $f[\hat{W}]\subset\hat{W}$, $f$ is an isomorphism when restricted in $\hat{W}$ and $\,\mathrm{Ker}\,f\subset W(0)$.

Hence, it suffices to consider the case in which the only eigenvalue of $f$ is $0$. In such case $f$ can be represented, with respect to a suitable basis, in a diagonal block form
$$A=\mathrm{diag}(J_0,J_1,\ldots,J_m),$$
where $J_0=0\in\mathbb R^{n_0\times n_0}$ and
$$J_s=\left(\begin{array}{ccccc} 0&1&0&0&\cdots&0&0 \\ 0&0&1&0&\cdots&0&0 \\ 0&0&0&1&\cdots&0&0 \\ \vdots&\vdots&\vdots&\vdots&&\vdots&\vdots \\ 0&0&0&0&\cdots&0&1 \\ 0&0&0&0&\cdots&0&0 \\ \end{array}\right)\in\mathbb R^{n_s\times n_s}$$
It in not hard to show that:
$\mathrm{Ker}\,A\cap \mathrm{Im}\,A$
is spanned by exactly $m$ vectors. One for eauch block.
Also
$$r(A)=(n_1-1)+(n_2-1)+\cdots+(n_m-1) \quad\text{and}\quad r(A)=(n_1-2)+(n_2-2)+\cdots+(n_m-2)$$
Hence $r(A)-r(A^2)=m=\dim\,(\mathrm{Ker}\,A\cap \mathrm{Im}\,A)$.

And what about $dimKer(f) + dimIm(f) = dimV = dimKer(f^2) + dimIm(f^2)$, then

$r(f) – r(f^2) = n(f^2) – n(f) = dim(Kerf \cap Imf)$.