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?
$A$ and $B$ are real but not symmetric. I don't mind assuming for the moment that they are diagonalizable.
Side note: in my problem, $A$ is a positive matrix, and I want this shared eigenvector to be the Frobenius-Perron eigenvector of $A$. If this makes the problem easier, that's great, but if not, then ignore it for now.
Any ideas are welcome. Thanks!