"Conjugacy rank" of two matrices over field extension I have posted this elsewhere and got only a partial reply. I don't know whether this qualifies the question for an open-problem tag; if it does, please anyone insert it.

Let $L$ be a field, and $K$ a subfield of $L$. Let $n$ and $m$ be two nonnegative integers.
For any $n\times n$ matrix $A \in \operatorname{M}_n\left(K\right)$ and any $m\times m$-matrix $B \in \operatorname{M}_m\left(K\right)$, and any field $S$ containing $K$, we define
\begin{align}
\rho_{S}\left( A,B\right)
:= \max\left\{\operatorname{Rank} Q
\mid Q\in\operatorname{M}_{n,m}\left( S\right) ;
\ AQ = QB\right\}.
\end{align}
We can call this number $\rho_{S}\left( A,B\right)$ the "conjugacy rank" of the matrices $A$ and $B$ over the field $S$.

(Note that if $n = m$, then this conjugacy rank is directly connected with conjugacy -- i.e., similarity -- of matrices: Namely, in this case, we have $\rho_{S}\left( A,B\right) = n$ if and only if the matrices $A$ and $B$ are conjugate to each other in the ring $\operatorname{M}_{n}\left( S\right)$.)

My question is: Do we have $\rho_{K}\left( A,B\right) = \rho_{L}\left( A,B\right)$ for any two matrices $A \in \operatorname{M}_n\left(K\right)$ and $B \in \operatorname{M}_m\left(K\right)$ ?

This can be shown in the case of $n = m \leq \left\vert K\right\vert$ by a "polynomials which vanish everywhere must be identically $0$" argument. Besides, in the case of $\rho_{L}\left( A,B\right) = n = m$, it can be shown using the rational canonical form. I am interested in the most general case of the problem -- neither restricting $\left\vert K\right\vert$, nor $\rho_{L}\left( A,B\right)$, nor requiring $n = m$.
What also might be of help: For any field $S$ containing $K$, the space
$$R_{S}\left( A,B\right) = \left\{ Q\in\operatorname{M}_{n,m}\left( S\right) \mid AQ = QB\right\}$$
is a subspace of the vector space $\operatorname{M}_{n,m}\left(S\right)$.
Besides, every basis of the space $R_{K}\left( A,B\right)$ is also a basis of the space $R_{S}\left( A,B\right)$ for every field $S$ containing $K$. However, this alone is not enough; you can easily construct a subspace of $\operatorname{M}_{n}\left(\mathbb{F}_p\right)$ that consists of singular matrices only but loses this property when extended into $\operatorname{M}_{n}\left(\mathbb{F}_{p^2}\right)$.
 A: I think this is true, and can be proved by brute force: write an explicit formula for conjugacy rank. I'll prefer to restate the problem in terms of modules.
To an $n\times n$ matrix $A$ over a field $K$, associate the $K[x]$-module $M$ that is $K^n$
as a vector space, while $x$ acts as $A$. Everywhere below, all $K[x]$-modules are finite-dimensional as $K$-vector spaces. Then your definition becomes as follows:
Let $M$ and $N$ be two $K[x]$-modules. Define their conjugacy rank $\rho(M,N)$ to be
the maximal dimension (over $K$) of a $K[x]$-module that is simultaneously isomorphic to a submodule of $M$ and a quotient-module of $N$. We aim to prove that $\rho(M,N)$ is stable under field extensions of $K$.
By structure theorem for modules over PID, we can write $M\simeq\bigoplus K[x]/f_i$,
where invariant factors $f_i=f_i(M)\in K[x]$ satisfy  $f_{i+1}|f_i$. (We set $f_i = 1$ when $i$ is larger than the number of invariant factors.) It is easy to check the following claim:
Lemma: $M'$ is isomorphic to a quotient of $M$ if and only $f_i(M')|f_i(M)$. The same criterion holds for $M'$ being isomorphic to a submodule of $M$.
Corollary: There is unique up to isomorphism maximal-dimensional module $M'$ that is simultaneously isomorphic to a submodule of $M$ and a quotient-module of $N$; its invariant factors are given by $f_i(M')=gcd(f_i(M),f_i(N))$.
Since the formula for $M'$ is stable under field extensions of $K$, the claim follows.
A: Suppose that the field extension $L/K$ is separable and that $K$ is
infinite.
Let $A\in M_n(K)$, $B\in M_m(K)$ and suppose there exists a matrix $Q\in
M_{n,m}(L)$ is such that $QA=BQ$ and which has rank $Q=r$. We want to show there is a
matrix $Q'\in M_{n,m}(K)$ such that $Q'A=BQ'$ and which has rank at least $r$.
First, by replacing $L$ by the subfield of $L$ generated over $K$ by the
coefficients of $Q$ if we need to, we can suppose that $L/K$ is a finitely
generated extension. By using a maximal purely transcendental extension of
$K$ contained in $L$ as an intermediate step, we see that it is enough to
consider separately the cases in which (i) $L/K$ is purely transcendental or
(ii) $L/K$ is finite.
In case (i), let $S$ be a transcendence basis of $L/K$. Since the matrix $Q$
has rank $r$, it has an $r\times r$ minor $M$ with non-zero determinant. As the
entries of $Q$ are finitely many rational functions in a finite number of
elements of the indeterminates $S$, and since the field $K$ is infinite, we
assign values from $K$ to the indeterminates which appear in $Q$ in such a
way that we obtain a matrix $Q'\in M_{n,m}(K)$ (ie, we avoid zeroes in
denominators) and such that the minor of $Q'$ corresponding to $M$ still
has non-zero determinant. It is clear that $Q'A=BQ'$ and that the rank of
$Q'$ is at least $r$, so we are done in this case.
Let us now consider case (ii). Up to enlarging $L$, we can assume that
$L/K$ is Galois, with Galois group $G$. As before, the matrix $Q$ has an
$r\times r$ minor $M$ with non-zero determinant. Suppose the elements of
$G$ are $g_1=1_G,g_2,\dots,g_j$, and consider the polynomial
$f(X_1,\dots,X_j)=\det_M\left(\sum_{i=1}^j g_i(Q)X_i\right)\in
L[X_1,\dots,X_j]$; here the elements of $G$ act on the matrix $Q$ in the
obvious way, and $\det_M$ denotes the determinant of the minor of its
argument corresponding to $M$. Notice that $f$ is not the zero polynomial, because the coefficient of $X_1^r$ is precisely $\det_M Q\neq0$.
Since $L$ is infinite and the elements of $G$ are algebraically independent
(Lang, Algebra, VI, \S12, Theorem 12.2), the map
$$ x \in L \mapsto f(g_1(x),\dots,g_j(x))\in L$$
is not identically identically zero.
It follows that there exists a $\xi\in L$ such that
the matrix $Q'=\sum_{i=1}^j g_i(\xi)g_i(Q)$ has $\det_M Q'\neq0$; in
particular, the rank of $Q'$ is at least $r$. Since the extension $L/K$ is
Galois and $Q'$ is fixed by all elements in $G$, we see that $Q'\in
M_{n,m}(K)$. Finally, since the matrices $A$ and $B$ have their coefficients in
$K$, $Q'A=BQ'$.
A: Edit: As pointed out in comment, there's a flaw in this argument.
Rewrite the equation $AQ-QB = 0$ using Kronecker's product (i.e. regard Q as a column vector), then we are to solve the equation 
$(I \otimes A - B^T \otimes I)Q = 0$
and we are to find the maximal rank of the solution $Q$, where the coefficients of $Q$ may lie in a larger field.
Let $M = I \otimes A - B^T \otimes I \in M_{n^2} (K)$, and perform Gaussian elimination to get invertible matrices $E,F$ in $M_{n^2}(K)$ such that $M = EDF$, with $D = diag(1,...,1,0,..,0)$ (r 1s). Now the maximal rank of the solution of $MQ = 0$, is obviously the same as the maximal rank of the solution $EDFQ = 0$, or the rank of the solution $D(FQ) = 0$.
Since $F$ is invertible, $Q'=FQ$ has the same rank as $Q$.
Yet the maximal rank of $Q'$ satisfying $DQ' = 0$ is clearly only dependent on $r$ - this is obviously independent of the field where $Q'$ lies in - so the conjugacy rank has to be independent of which extension of $K$ you are considering.
