In my course advanced system Theory I had the following question:
Prove the following equivalence for the pair $(A,B)$ $\in$ $\mathbb{R}^{nxn}$ x $\mathbb{R}^{nxm}$:
$(A,B)$ is uncontrollable $\Longleftrightarrow$ $\exists P$ $\in$ $\mathbb{R}^{nxn}$, $P \neq 0$: $PA - AP = 0$, $PB=0$.
Hence, in terms of alternatives, either the pair $(A,B)$ is controllable, or there exists a nonzero matrix $P$ such that $PA-AP=0$ and $PB=0$.
I proved this as shown in the attachment. I think that my prove is 100% complete. My teacher, however, disagreed with this and explained that I only prove this statement from left to right and not from right to left. I did not understand his explanation about why my prove is incomplete. I even think that my proof is correct.
Can someone explain me whether my proof is complete. If it is incomplete, then can someone also explain me what I am missing and how to prove the part that I miss?
Page 1:

Page 2:

$P$ doesn't have to be constructed using $P=e_r e_\ell$ as your professor stated. There may be some $P$ that do satisfy the conditions and not has the form $P=e_r e_\ell$. You need to prove that any nonzero $P$ cannot satisfy $PA-AP=0$ and $PB=0$ if $(A,B)$ is controllable.
Here is that part of the proof: