Suppose that I have two matrices $A$ and $B$, and I want them to share a common eigenvector $x$. For simplicity let's just assume that the eigenvalue associated with $x$ is $1$ for both matrices, so $Ax=x$ and $Bx=x$. Is there a simple condition on $A$ and $B$ which is both necessary and sufficient for this to occur?


Edit: loup blanc's answer covers the case where the eigenvalues are not known, which is generally much more interesting than the case I was asking about, which is when both eigenvalues are 1. The solution to my case is just that $\ker(A-I) \cap \ker(B-I) \ne 0$. I would still be interested if someone found an even simpler condition which is equivalent to this, though.



Condition for two matrices to share at least one eigenvector?
Let $A,B$ be two $n\times n$ matrices with entries in a field $K$.
Then $A,B$ have a common eigenvector iff
$\cap\_{k,l=1}^{n-1}\ker([A^k,B^l])\not=\{0\}$.


This result is due to 
D. Shemesh. Common eigenvectors of $2$ matrices. Linear algebra and appl., 62, 11-18, 1984.


