# Calculating the conjugators for a given conjugation equation.

Suppose that $F$ is a finite field and $G$ is the general linear group of size $n$ say over $F$. Suppose also that $M$ and $N$ are two elements of $G$. I am interested in calculating the solutions $g \in G$ to the equation

$$g^{-1} M g = N$$

Would someone be able to give me a reference / assist with trying to solve this problem? Even just beginning with the raw number of solutions would be massively helpful

In case anyone is interested, for context I am trying to trying to calculate the set of matrices in $\operatorname{GL}_{2}(\mathbb{F}_{q})$ with a given set of eigenvalues of the form $x \pm y\sqrt\epsilon$ for $x \in \mathbb{F}_q$, $y \in\mathbb{F}_{q}^{\times}$, where $\epsilon$ is a generator of $\mathbb{F}_{q}^{\times}$. That is with eigenvalues strictly in the unique degree two extension of $\mathbb{F}_{q}$

The number of solutions equals the number of matrices in $G$ that commute with $M$, provided that there is a solution. Indeed, consider the action of $G$ on itself by conjugation. Then if $M, N$ are in the same orbit, then the solutions form a coset of the stabilizer of $M$, which is the centralizer of $M$.