On self-dual MRD codes

We determine the automorphism group of Gabidulin codes of full length and characterise when these codes are equivalent to self-dual codes.


Introduction
Following Delsarte [2] a rank metric code is a set C ⊆ k m×n of m × n matrices over a field k. The distance between two matrices A, B ∈ k m×n is defined as where X T is the transpose and trace(X) the trace of the matrix X. Clearly, C ⊥ is always a k-linear code, i.e. a subspace of the k-vector space k m×n .
Throughout the paper we assume that m ≥ n, so our matrices have at least as many rows as columns. We will also assume that C is a linear code. If C ≤ k m×n has minimum distance d then d ≤ n − dim(C)/m + 1 (see [2,Theorem 5.4], [9,Theorem 8]). Codes where equality holds are called MRD codes (maximum rank distance codes). By [2,Theorem 5.4] the dual of an MRD code is again an MRD code (see also [9,Corollary 41]). In this note we investigate self-dual MRD codes, i.e. MRD codes C with C = C ⊥ . As dim(C) + dim(C ⊥ ) = dim(k m×n ) = mn a self-dual MRD code C ≤ k m×n with m ≥ n has dimension mn 2 and minimum distance d(C) = n 2 + 1. The inner product (−, −) is the standard inner product if we identify k m×n with k 1×mn . If char(k) = 2, then self-dual codes in k 1×mn always contain the all-ones vector. So self-dual rank metric codes contain the all-ones matrix J ∈ {1} m×n of rank 1. This implies that there are no self-dual MRD codes over fields of characteristic 2 (see Theorem 1). In Section 3 we give in odd characteristic a handy criterion to prove if a given rank metric code in k m×n is equivalent to a self-dual code (see Theorem 2).
In the rest of the paper we study MRD codes in k n×n where k is a finite field. In case n = 2 all self-dual MRD codes are classified in Section 2: They exist if and only if −1 is not a square in k.
The most well-studied examples of MRD codes are the Gabidulin codes ( [2,3]). Section 4 treats Gabidulin codes of full length n, i.e. n = [K : k] is the degree of the field extension, as k-linear subspaces of dimension n of k n×n . We determine the k-linear automorphism group of these codes (see Corollary 1) and show that such a Gabidulin code is equivalent to a self-dual code if and only if n ≡ 2 (mod 4), = n/2, and −1 is not a square in k (see Theorem 4).
If −1 is a square in k or n is a multiple of 4, we do not have any examples of self-dual MRD codes in k n×n . Note that according to [8] there are 5 equivalence classes of self-dual MRD codes in F 4×2 5 . 2. Self-dual MRD codes Surprisingly, in characteristic 2 self-dual MRD codes in k m×n do not exist. This follows immediately from the following easy, but crucial result, since a self-dual MRD code in k m×n has minimum distance at least 2.
Theorem 1. Assume that char(k) = 2 and let C ⊆ C ⊥ ≤ k m×n be a self-orthogonal code. Then the all-ones matrix J is in C ⊥ . In particular, d(C ⊥ ) = 1.

Proof. All elements
where J is the all-ones matrix, which is of rank 1. So J ∈ C ⊥ satisfies d(0, J) = 1.
In contrast to the characteristic 2 case self-dual MRD codes may exist if char(k) is odd. To see that we characterize all self-dual MRD codes C in k 2×2 where k = F q is the finite field with q elements. Since d(C) = 2 and dim(C) = 2, the projection on the first row π : C → k 1×2 , A → (a 11 , a 12 ) is an isomorphism and C has a unique basis of the form Proposition 1. C = A, B is a self-dual MRD code if and only if the following two conditions hold true.
Proof. Assume that C = A, B is a self-dual code. Then (A, A) = (A, B) = (B, B) = 0 yields the equations The ideal in Z[a, b, c, d] generated by these three polynomials contains the element We therefore conclude that a = ±d and similarly b = ±c. Thus condition (ii) is equivalent to C being self-dual. Moreover C is an MRD code, if all non-zero matrices in C have determinant = 0, so if and only if b = 0 and . Using the fact that a 2 + b 2 = −1 we see that in both cases this leads to the condition that −1 is not a square in k, so q ≡ 3 (mod 4). Thus we have (i). With the same computations as above we see that the conditions in (i) and (ii) lead to a self-dual MRD code.
It is easy to see that all these codes are pairwise equivalent and that they are equivalent to Gabidulin codes of full length. So Proposition 1 may be seen as a special case of Theorem 4 below.

A criterion to be equivalent to a self-dual code
The rank distance preserving automorphisms of k m×n are and these are k-linear, if and only if Z = 0 and σ = id (see [12], Theorem 3.4). If m = n, then the τ X,Y := τ X,Y,0,id are called improper and the κ X,Y := κ X,Y,0,id proper automorphisms. Definition 1. Two linear rank metric codes C and D ≤ k m×n are called properly equivalent, if there are X ∈ GL m (k), Y ∈ GL n (k) such that D = XCY .
Note that proper equivalence is the usual notion of linear equivalence for m = n. Only for m = n the proper equivalences form a subgroup of index 2 in the group of linear equivalences. Lemma 1. Let k be a finite field of odd characteristic and let A ∈ k n×n be a symmetric matrix of full rank. Then there is a matrix X ∈ GL n (k) such that Proof. Regular quadratic forms over finite fields of odd characteristic are classified by their dimension and their determinant (see for instance [10, Chapter 2, Theorem 3.8]). In particular a quadratic form with Gram matrix A ∈ GL n (k) is equivalent to the standard form with Gram matrix I n (identity matrix) if and only if det(A) is a square.
Theorem 2. Let k be a finite field of odd characteristic and let C ≤ k m×n be a linear rank metric code. Then C is properly equivalent to a self-dual code if and only if there are symmetric matrices A = A T ∈ k m×m and B = B T ∈ k n×n such that det(A), det(B) ∈ (k × ) 2 are non-zero squares with Put A := X T X and B := Y Y T . Then A and B are symmetric of square determinant and C ⊥ = ACB.
On the other hand assume that there are A, B as stated in the theorem. According The same computation as above shows that XCY is a self-dual code.

Gabidulin codes in k n×n
We keep the assumption that k = F q is a finite field, but allow char(k) to be arbitrary (even or odd). Let K := F q n be the degree n extension field of k. For α ∈ K and 0 ≤ i ≤ n − 1 we define α [i] := α q i to be the image of α under the i-th iteration of the Frobenius automorphism of K/k and Trace K/k (α) := Note that a dual basis always exists, but a selfdual basis exists if and only if q is even or both q and n are odd (see [5]). Let T B := (Trace K/k (β i β j )) i,j=1,...,n denote the Gram matrix of the trace bilinear form (α, β) ∈ K × K → Trace K/k (αβ) ∈ k with respect to the basis B. Then T B is the base change matrix between B and its dual basis B * , because if β i = n m=1 a mi β * m with a mi ∈ k for all m, then In the notation of the next definition this means that T B = B * (B).
Definition 2. Let B = (β 1 , . . . , β n ) ∈ K n be a k-basis of K and define the map For α ∈ K and ∈ N 0 we also put α B := (αβ 1 , . . . , αβ n ) ∈ K n and Proof. Let B := B (α B) and T B =: T . If we denote the entry of a matrix A at position (i, j) by A ij , then We compute ) m,r β * m the second equality follows. To see the first equality let C : = Γ (Γ [1] ).
In the following computations we regard the indices of the matrix entries as integers modulo n represented by 0, . . . , n − 1.
(ii) This follows by direct computation.
Definition 3. For 1 ≤ ≤ n the Gabidulin code G ,Γ ≤ k n×n is the k-linear code Lemma 3. (i) K is an n-dimensional subalgebra of k n×n isomorphic to K = F q n .
(ii) For any B ∈ K we have ABA −1 = B q . In particular AK = KA as a set.
(iii) The normalizer in GL n (k) of K × is the semidirect product of K × and the cyclic group A of order n. (v) The full matrix ring is a cyclic algebra. So for all X ∈ k n×n there are unique Proof. (i) The map K → K, α → Γ (αΓ) is an isomorphism of k-algebras.
(ii) We use the isomorphism above to write B = Γ (βΓ) for some β ∈ K and recall that A ij = δ i,(j+1) . We show that AB = B q A for all B ∈ K. By definition we have that Therefore we compute for all j = 0, . . . , n − 1 So the j-th column of B q A and AB coincide.
(iii) This is well-known and widely used in geometry and group theory, see for instance [4, Kap. II, Satz 7.3].
(iv) We embed k n×n into K n×n , because in the latter ring we may diagonalise the relevant matrices. Take any primitive element α ∈ K. Then C := Γ (αΓ) ∈ GL n (k) ≤ GL n (K) has n distinct eigenvalues α, α [1] , . . . , α [n−1] in K, the roots of the minimal polynomial of α over k. In particular there is a matrix X ∈ GL n (K) such that X −1 CX = diag(α, α [1] , . . . , α [n−1] ). As ACA −1 = C q (by (ii)) also (X −1 AX)(X −1 CX)(X −1 AX) −1 = (X −1 CX) q , so X −1 AX cyclically permutes the eigenspaces of X −1 CX. More precisely there are a i ∈ K such that where as usual the indices are taken modulo n. Because k[C] = K, any B ∈ K is a polynomial in C and hence X −1 BX is a diagonal matrix. So for any 1 ≤ i ≤ n−1 the matrix X −1 BA i X is monomial with no nonzero entries on the diagonal, because it induces the fixed point free permutation (1, 2, . . . , n) i on the eigenspaces of X −1 CX.
In particular its trace is 0. As the trace is invariant under conjugation we also get trace(BA i ) = trace(X −1 BA i X) = 0.
(v) Suppose that Gabidulin codes there are certain obvious matrices (X, Y ) ∈ GL n (k) × GL n (k), so that XG ,Γ Y = G ,Γ (see for instance [7]): For notational convenience we put K × := K \ {0}. Then K × ≤ GL n (k) is isomorphic to the multiplicative group K × of K and hence cyclic of order q n − 1. Let S be any generator of K × = S as a group. In group theory S is often called a Singer cycle. Clearly K × contains the subgroup of nonzero scalar matrices Furthermore if X ∈ K × , then XG ,Γ = G ,Γ and G ,Γ X = G ,Γ . By Lemma 3 (ii) conjugation by A preserves the set K, so A j G ,Γ A −j = G ,Γ for j = 0, . . . , n − 1.
The next theorem, which has been proved independently also by J. Sheekey [11], shows that these obvious automorphisms already generate the full automorphism group of the Gabidulin codes.
Theorem 3. For 0 < < n the group of proper automorphisms of G ,Γ is which is isomorphic to the semidirect product of C n ∼ = Gal(K/k) with the normal subgroup K × YK × the central product of K × with itself amalgamated over k × .
Proof. The inclusion ⊇ is clear. To see the converse we suppose that XG ,Γ Y = G ,Γ for X, Y ∈ GL n (k).
According to Lemma 3 (v) we may write Z := n−1 i=0 z i A i ∈ Z where z i ∈ K for all i. As I n ∈ K × ⊆ G ,Γ also Z = ZI n ∈ G ,Γ , so z i = 0 for i = , . . . , n − 1. If ≥ 1, then also A ∈ G ,Γ . Thus ZA = −1 i=0 z i A i+1 ∈ G ,Γ , which implies that z −1 = 0. Repeating this argument several times we obtain z 1 = . . . = z n−1 = 0 and Z = z 0 ∈ K. Final step: By Claim 2, we know that X ∈ GL n (k) lies in the normalizer of K × . Note that A induces by conjugation on K × the Galois automorphism x → x q (cf. Lemma 3 (ii)). By Lemma 3 (iii), the normalizer of K × is N GLn(k) (K × ) = A K × . Therefore there is some 0 ≤ j ≤ n − 1 such that X ∈ A j K × . In particular XG ,Γ X −1 = G ,Γ and hence G ,Γ XY = G ,Γ . Similar to the proof of Claim 1 we conclude that Proof. For any subgroup U ≤ G of some finite group G and a normal subgroup N G, we have |U/(N ∩ U )| ≤ |G/N |. So in particular the index of Aut (p) (G ,Γ ) in the full automorphism group is either 1 or 2 and it suffices to show that τ T −1 ,T A −1 (G ,Γ ) = G ,Γ . To this aim let C ∈ K and 0 ≤ j ≤ − 1. Then for some C ∈ K, because conjugation by A preserves K as a set. The last equality follows from Remark 1 (i). By Lemma 2, we have T −1 (C ) T T = C ∈ K. So τ T −1 ,T A −1 maps KA j onto KA −1−j and hence preserves the code G ,Γ .
4.2. Self-dual Gabidulin codes. According to Theorem 1 and the fact that Gabidulin codes are MRD codes, there are no self-dual Gabidulin codes in even characteristic. So in this section we assume that k = F q , K := F q n and q is odd. We keep the notation from above. In particular Γ = (γ, γ [1] , . . . , γ [n−1] ) is a normal basis of K/k, T := T Γ , S = K × , and A := Γ (Γ [1] ). If the Gabidulin code G ,Γ is equivalent to a self-dual code then = n/2 and n needs to be even. The following facts are elementary but crucial for the proofs of Proposition 2 and Theorem 4 below.
Lemma 4. Assume that n is even. Then Proof. (i) This is clear as A is a permutation matrix of a cycle of full length n and n is even.
(iii) The first statement is Remark 1 (i). To see the second note that A is a permutation matrix, so (iv) Because S generates K as a k-algebra the minimal polynomial of S is equal to its characteristic polynomial. Moreover it also coincides with the minimal polynomial of a primitive element σ ∈ F q n over F q since S is a Singer cycle. Thus the determinant of S is the product of all Galois conjugates of σ, i.e. the norm of σ, det(S) = σ (1+q+...+q n−1 ) = σ (q n −1)/(q−1) .
As σ = F × q n the order of σ is q n − 1, so the order of det(S) is q − 1 which proves that det(S) is a primitive element in F q . In particular det(S) ∈ F × q \ (F × q ) 2 . (v) By Lemma 1, there is a self-dual basis for K/k if and only if the determinant of the trace bilinear form is a square. According to Lempel and Seroussi [5] K/k has a self-dual basis if and only if n is odd (since q is odd). As n is assumed to be even, the determinant of T is a non-square. (vii) This follows from (vi) because the inverse of a symmetric matrix is again symmetric.
(viii) Using the previous results we compute Dividing by T and using (ii) we obtain the equivalent if and only if r ≡ s mod n. So we obtain that j ≡ −j mod n, i.e. either j = 0 and then i is arbitrary, or j = n/2 and (S i ) q n/2 = (S i ) (i.e. (q n/2 + 1) | i). The last statement follows by inverting the matrix.
The next proposition follows by interpreting [1, Lemma 1] and [9, Theorem 18] in our language. For convenience of the reader we give a direct elementary proof.
Proof. We put C := T A n/2 G n/2,Γ T −1 . As it suffices to show that C ⊆ G ⊥ n/2,Γ . To see this recall that G n/2,Γ = n/2−1 i=0 Applying Lemma 4 (where the relevant parts are indicated above the equalities) we compute where the last inclusion follows from Lemma 4 (ii). If i − j is not divisible by n, then Lemma 3 (iv) tells us that all matrices in KA i−j have trace 0.
In particular G n/2,Γ is always equivalent to its dual code. We now apply Theorem 2 to obtain a criterion, when G n/2,Γ is equivalent to a self-dual code.
According to Corollary 1 all Gabidulin codes have improper automorphisms. So if G n/2,Γ is equivalent to a self-dual MRD code, then it is properly equivalent to a self-dual MRD code.
To use Theorem 2 we hence need to decide for which triples (i, h, j) both matrices X i,j := T A n/2 A j S i and Y h,j := S h A −j T −1 are symmetric and of square determinant.
By Lemma 4 (v) (note that we assume that n is even), det(X i,j ) ∈ (k × ) 2 if and only if (−1) n 2 +j δ i ∈ (k × ) 2 and det(Y h,j ) ∈ (k × ) 2 if and only if (−1) j δ h ∈ (k × ) 2 . By Lemma 4 (viii), the matrix X i,j is symmetric if and only if either j = 0 and (q n/2 + 1) | i or j = n/2 and i is arbitrary. The matrix Y h,j is symmetric if and only if either j = 0 and h is arbitrary or j = n/2 and h is a multiple of (q n/2 + 1).