$\mathbb{F}_q^{m\times n}$ with minimum distance $d$. Let $m'=\min\{m,n\}$ and $n'=\max\{m,n\}$. Assume that the null matrix $O$ is in $\mathcal{C}$. Then, for any $0 \leq \ell \leq m'-d$, we have $A_{d+\ell}>0$, i.e. there exists at least one matrix $C \in \mathcal{C}$ such that $\mathrm{rk} (C) = d + \ell$.

Theorem \[th:dualrelations\] follows from the MacWilliam identities.

\[th:dualrelations\]([@Ravagnani Proof of Corollary 44]) Let $\mathcal{C}$ be an MRD code in $\mathbb{F}_q^{m\times n}$ with minimum distance $d$. Let $m'=\min\{m,n\}$ and $n'=\max\{m,n\}$. Then for any $\nu \in \{0,\ldots,m'-d \}$ we have $$\label{eq:identities} {m' \brack \nu}_q+\sum_{i=d}^{m'-\nu} A_i {m'-i \brack \nu}_q=\frac{|\mathcal{C}|}{q^{n'\nu}} {m' \brack \nu}_q.$$

By Remark \[rk:dualMRD\], the minimum distance of $\mathcal{C}^\perp$ is $m'-d+2$. Thus, Theorem \[th:MacWilliams\] proves the claim.

Two RM codes $\operatorname{\mathcal{C}}$ and $\operatorname{\mathcal{C}}'$ in $\mathbb{F}_q^{m\times n}$ are *equivalent* if and only if there exist $X \in \mathrm{GL}(m,q)$, $Y \in \mathrm{GL}(n,q)$, $Z \in {{\mathbb F}}_q^{m\times n}$ and a field automorphism $\sigma$ of ${{\mathbb F}}_q$ such that $$\operatorname{\mathcal{C}}'=\{XC^\sigma Y + Z \colon C \in \operatorname{\mathcal{C}}\}.$$ The *left* and *right idealisers* $L(\operatorname{\mathcal{C}})$ and $R(\operatorname{\mathcal{C}})$ of an RM code $\mathcal{C}\subseteq{{\mathbb F}}_{q}^{m\times n}$ are defined as $$L(\operatorname{\mathcal{C}})=\{ Y \in {{\mathbb F}}_q^{m \times m} \colon YC\in \operatorname{\mathcal{C}}\hspace{0.1cm} \text{for all}\hspace{0.1cm} C \in \operatorname{\mathcal{C}}\},$$ $$R(\operatorname{\mathcal{C}})=\{ Z \in {{\mathbb F}}_q^{n \times n} \colon 