  Let $F$ be the finite field of order $q$ and $\M(n,r, F)$ be the set of
$n\times n$ matrices of rank $r$ over the field $F$. For $\alpha\in F$ and
$A\in \M(n,F)$, let \[Z^{\alpha}_{A,r}=\left\{X\in \M(n,r, F)\mid
\tr(AX)=\alpha\right \}.\] In this note, we compute the cardinality of
$Z_{A,r}^{\alpha}$.
