---
abstract: 'After a seminal paper by Shekeey (2016), a connection between maximum $h$-scattered ${{\mathbb F}_{q}}$-subspaces of $V(r,q^n)$ and maximum rank distance (MRD) codes has been established in the extremal cases $h=1$ and $h=r-1$. In this paper, we propose a connection for any $h\in\{1,\ldots,r-1\}$, extending and unifying all the previously known ones. As a consequence, we obtain examples of non-square MRD codes which are not equivalent to generalized Gabidulin or twisted Gabidulin codes. Up to equivalence, we classify MRD codes having the same parameters as the ones in our connection. Also, we determine the weight distribution of codes related to the geometric counterpart of maximum $h$-scattered subspaces.'
author:
- 'Giovanni Zini and Ferdinando Zullo[^1]'
title: Scattered subspaces and related codes
---

*Dedicated to the memory of Elisa Montanucci.\
We unite us to her family’s pain.*

51E20, 94B27, 15A04

rank metric code; scattered subspace; linear code; linear set

Introduction
============

An ${{\mathbb F}_{q}}$-subspace $U$ of an $r$-dimensional ${\mathbb{F}_{q^n}}$-vector space $V$ is said to be *$h$-scattered* if $U$ spans $V$ over ${\mathbb{F}_{q^n}}$ and, for any $h$-dimensional ${\mathbb{F}_{q^n}}$-subspace $H$ of $V$, $U$ meets $H$ in an ${{\mathbb F}_{q}}$-subspace of dimension at most $h$. This family of subspaces was introduced in [@CsMPZ] as a 