It is a well-known theorem that in an arbitrary field $F$, if $A$ is an $m\times m$ square matrix and $B$ is an $n\times n$ square matrix, then there is a unique $m\times n$ solution $X$ to the equation $$AX=XB$$ if and only if $A$ and $B$ share no eigenvalues.
My question is this: what can be said about the number of solutions $X\in \mathbb F_2$ to the above equation? Is the number of nonzero solutions equal to the number of common eigenvalues? If so, how can one prove this?
Suppose $X_1$ and $X_2$ are both solutions. Then $A(X_1+X_2)=AX_1+AX_2=X_1B+X_2B=(X_1+X_2)B$. Thus, $X_1+X_2$ is a solution. So the number of solutions can be $0$, $1$, or infinity. This is a common situation in linear algebra: you either have no solutions, a unique solution, or infinite solutions.