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.