Rank metric codes were introduced by Delsarte  in 1978 and have been used in several contexts, such as crisscross error correction , cryptography , and network coding . Because of their ubiquitous applications, they attracted increasing attention in the last years; see e.g. [15, 22, 24].
Very recently, rank metric codes have been investigated through their tensor rank; see [6, 4, 5]. Indeed, a rank metric code in can be seen as the slice space of an associated generator -tensor, similarly to the case of linear codes in the Hamming metric, where a code can be described as the row space of a generator matrix. Therefore, after Byrne, Neri, Ravagnani and Sheekey , the tensor rank of is defined as the tensor rank of a generator tensor of . Determining the tensor rank of a certain rank metric code is a hard problem in general and the exact value is known only for specific classes of codes; indeed the problem of computing the rank of a -tensor is NP-complete . Several lower and upper bounds for the tensor rank of a rank metric code were presented in  and . In particular, as a consequence of Kruskal’s bound , the tensor rank of an -dimensional -linear rank metric code in of minimum distance is lower bounded by . The code is said to be minimum tensor rank (MTR for short) if its tensor rank is exactly . The interest for rank metric codes with a low tensor rank is due to the following fact: the smaller the tensor rank of the generating tensors, the more efficient the encoding. Via the correspondence in  between full rank codes and semifields, the notion of tensor rank for rank metric codes extends the same notion for semifields, which was used as an invariant by Lavrauw in . Moreover, some criteria by Kruskal [11, Section 4] use the rank of a tensor to assure its identifiability, i.e. the uniqueness of the pure tensors appearing in its decomposition, which is of interest for the numerical applications within statistics; see  and [1, Section 2].
A family of particular interest among rank metric codes is the one of square Gabidulin codes in , as they are maximum rank distance, and indeed they have been deeply investigated. However, their tensor rank is not known in general; exact results have been provided in  and  when and in few other cases. Interestingly, when is large enough, Gabidulin codes with turn out to be MTR codes.
In this paper we are interested in determining the tensor rank of those codes which are equivalent to an -linear -dimensional Gabidulin code in . The strategy that we apply makes use of [6, Proposition 3.4], which involves rank-one matrices. The framework of our arguments is the one of linearized polynomials, where rank-one matrices correspond to trace functions of the shape , where and . Our main result is the following.
Let be a prime power, and be a code which is equivalent to an -linear -dimensional generalized Gabidulin code in . Then the tensor rank of is if , and if . In particular, is not MTR.
The paper is organized as follows. Section 2 contains preliminary notions on rank metric codes and on the correspondence with linearized polynomials in the case of square codes. Section 3 describes basic definitions and known results about tensors and the tensor rank of square generalized Gabidulin codes. Section 4 is devoted to the proof of Theorem 1.1: Section 4.1 shows that is not MTR, while in Section 4.2 we determine the tensor rank of for . The remaining small values of , are worked out computationally in Section 5, as well as other Gabidulin codes in with small values of and . Finally, the Appendix contains two auxiliary results which are needed in Section 4.1, whose proof are quite technical.
2 Rank metric codes and linearized polynomials
The set of matrices can be equipped with the rank metric, as
A rank metric code is a subset of endowed with the rank metric and its minimum rank distance is defined as
Two -linear rank metric codes and in are linearly equivalent if and only if there exist and such that
or, if ,
where denote the transpose of . Since in this paper we will only consider linear equivalence, we will refer to it simply as equivalence.
Delsarte showed in  that the parameters of a rank metric code satisfy a Singleton-like bound, namely
When equality holds, we call a maximum rank distance (MRD for short) code.
In this paper we are interested only in the square case , and in this case rank metric codes can be described in terms of linearized polynomials. Indeed, consider the -linearized (or simply linearized) polynomials of normalized degree over , i.e. elements of the form
The set of linearized polynomials is an -algebra with the usual addition, the scalar multiplication by elements of and the composition modulo . It is well-known that the -algebras and are isomorphic, via the correspondence between the linearized polynomial and the -endomorphism
of . Hence, is also isomorphic to the -algebra of matrices over . In this correspondence, the rank of a matrix in equals the rank of the corresponding linearized polynomial in as an -endomorphism of . Therefore, rank metric codes in can be seen as sets of linearized polynomials in , so that we can speak of rank metric codes in . Notice that the set of matrices of rank in corresponds to the set of elements of of the shape for some , where ; see [21, Theorem 2.24]. For a reference on linearized polynomials see .
The first class of square MRD codes in the literature was the one of generalized Gabidulin codes, namely the -subspaces
of , where and ; they are MRD codes with -dimension and minimum distance . Gabidulin codes where first introduced by Delsarte in  and later by Gabidulin in  in the case , and by Gabidulin and Kshevetskiy in  in the general case.
3 Tensor rank of generalized Gabidulin codes
The tensors we will investigate in this paper are -tensors in . If , , and are bases of , , and respectively, then an -basis of is given by
The tensors of the form , with , and , are called simple (or pure) tensors. The tensor rank of a tensor is defined as
Let . A -tensor can be represented as a map given by . Therefore can be identified with the space , and the tensor can be written as with . The first slice space of , denoted by , is the -subspace of generated by . If , we say that is -nondegenerate.
The following result will be a key tool in our investigation.
Kruskal in  bounded the tensor rank of a -tensor, using the following map:
(see [11, Corollary 1]) Let be -nondegenerate, then
Tensors are related to rank metric codes as follows. Let be an -linear code in of dimension and minimum distance . A generator tensor for is a -tensor such that . As proved in [6, Proposition 4.2], two generator tensors of the same rank metric code have the same tensor rank. Therefore, we can define the tensor rank of as the tensor rank of any generator tensor of .
(see [6, Proposition 4.5]) If are equivalent codes, then .
By Theorem 3.2,
If attains equality in (1), it is called a minimum tensor rank (MTR for short) code.
Although Gabidulin codes form the most studied family of rank metric codes, the complete determination of their tensor rank is still missing. We now describe the known results on the tensor rank of square Gabidulin codes . Bound (1) reads as follows.
For every , we have .
The tensor rank of coincides with the tensor rank of the field (see  and  where semifields were described for the first time in terms of tensors). By [3, Propositions 14.47 and 14.48] and a link with a well-studied tensor pointed out in [6, Lemma 5.13], it follows that if , and if . For , if (see [19, Lemma 15] and also ). For , if (see [6, Example 6.4] for and [19, Theorem 4] for ), while is unknown for . Further bounds and asymptotic results for the tensor rank of are known, see e.g. .
The following upper bound follows from the tensor rank of .
(see [6, Proposition 5.15]) Let . For every , we have .
A partial result is known also in the case of Gabidulin codes .
(see [4, Theorem 5.15]) Let . Then .
The tensor rank of Gabidulin codes with is not known. In this paper we study the first open case, namely and . In Section 5 we will investigate the remaining open cases when .
4 The tensor rank of
The two -dimensional generalized Gabidulin codes and in are easily seen to be equivalent. Therefore, by Proposition 3.3, in order to prove Theorem 1.1 it is enough to prove it for the Gabidulin code . In Section 4.1 we show that the tensor rank of is not for any . In Section 4.2 we prove that the tensor rank of is if . We complete the proof in Section 5, where we determine the tensor rank of some Gabidulin codes for some values of .
4.1 The tensor rank of is larger than
This section is devoted to the proof of the following theorem.
For any prime power , we have . Thus, is not an MTR code.
By Proposition 3.1 and Section 2, if and only if there exist trace functions such that . This is equivalent to say that there exist such that there exists an -basis of only composed by traces. So, consider such that has dimension over .
The proof strategy relies on two steps:
Step 1: To find explicit necessary and sufficient conditions on such that .
Step 2: To prove the non-existence of ten -linearly independent traces in .
Step 1: Suppose that is in . Then there exist , such that
This polynomial identity implies that , , , and satisfy the following system:
It cannot happen that and are both in . Indeed, if and for some then
and hence .
Note that if , then the last two equations of System (2) yield which implies and . This means that for some . A similar conclusion arises from . So, in these cases .
From now on we always assume . By the last two equations in System (2) one gets
Note that, since , if and only if , that is and both belong to . Indeed, since and are both nonzero,
which implies . Similarly, one can show that . However, this is a contradiction to our assumptions.
An element satisfying Equation (3) exists if and only if , that is,
We are interested in bounding the number of non--proportional pairs , with . The above homogeneous polynomial in and is of degree at most three in both and , and its coefficients are as follows:
the coefficient of is zero;
the coefficient of is
the coefficient of is
the coefficient of is
the coefficient of is zero.
Therefore the number of non--proportional solutions with is at most , if the polynomial is non-vanishing. Moreover, this polynomial vanishes if and only if
where and . The solutions of System (5) are given in Theorem 6.1. From now on we will suppose that and are solutions of System (5). In this case, by Equation (3), the maximum number of non--proportional possible values of is when runs in . By System (2), to each such value of there corresponds at most one value of .
Define , so that satisfies
Now, let and , so that and, by the third equation of System (2),