# Let $A\in M_n(\Bbb{C})$ such that $\text{Im}(A)\cap\text{Ker}(A)=\theta$

The actual question looks like-
Let $$A\in M_n(\Bbb{C})$$ such that $$\text{Im}(A)\cap \text{Ker}(A)=\{\theta\}$$, where $$\text{Im}(A)=\{AX \mid X\in\Bbb{C^n}\}$$ and $$\text{Ker}(A)=\{X\in\Bbb{C}^n\mid AX=\theta$$}, then prove that there exists non-singular matrices $$P$$ and $$D$$ of orders $$n\times n$$ and $$\text{rank}(A)\times\text{rank}(A)$$ respectively such that $$A=P \begin{pmatrix} D & 0 \\ 0 & 0 \\ \end{pmatrix} P^{-1}$$ Can anybody suggest me a proper solution to that question?
You can consider a basis of $$\mathbb{C}^n$$ using the decomposition $$\mathbb{C}^n = Im(A) \oplus Ker(A)$$.