---
title: Hull Codes of Free Linear Codes
url: https://www.emergentmind.com/topics/hull-codes-of-free-linear-codes
type: topic
---

# Hull Codes of Free Linear Codes

A **hull code of a free linear code** refers to a linear code over a finite field (or, more generally, a commutative ring) together with its hull: the subspace given by the intersection of the code and its dual under an appropriate inner product (Euclidean, Hermitian, or Galois). This concept encodes not just the foundational dichotomy of self-orthogonal and LCD codes but the entire hierarchy interpolating between these extremes—a structural invariant essential for algebraic classification, efficient code equivalence algorithms, and emerging applications in quantum information theory. The following provides a comprehensive technical account of the topic as established in recent research.

## 1. Definition and Fundamental Properties

Let $F_q$ be a finite field and consider the vector space $F_q^n$. For a $[n,k]_q$ linear code $C\subseteq F_q^n$ (i.e., a $k$-dimensional $F_q$-subspace), the dual is defined under a fixed bilinear form—typically:

- **Euclidean inner product:** $(x,y)=\sum_{i=1}^n x_i y_i$.
- **Hermitian inner product:** For $q$ a square, $(x,y)_H=\sum_{i=1}^n x_i y_i^{\sqrt{q}}$.
- **$s$-Galois inner product:** $(x,y)_s=\sum_{i=1}^n x_i y_i^{p^s}$, $q=p^m$, $0\le s<m$.

The **hull** of $C$ is then
\[
\mathrm{Hull}(C) = C \cap C^\perp,
\]
where $C^\perp$ denotes the corresponding dual. The **hull-dimension** is $h:=\dim_{F_q}(C\cap C^\perp)$.

- $h=0$: $C$ is an LCD (linear complementary dual) code.
- $h=k$: $C$ is self-orthogonal.
- If $k=n/2$ and $C$ is self-orthogonal, then $C$ is self-dual.

For linear codes over finite fields, the free module condition is automatically satisfied, i.e., "free linear code" simply means any $[n,k]$ $F_q$-subspace of $F_q^n$, with no torsion [2402.01255].

## 2. Algebraic and Spectral Characterizations

The hull dimension is computable directly from the generator matrix and is invariant under coordinate permutations:

- **Rank formula:** Let $G$ (resp. $H$) be a generator (resp. parity-check) matrix of $C$. Then
  \[
  \operatorname{rank}(G G^T) = k - h,\qquad \operatorname{rank}(H H^T) = n - k - h.
  \]
  $C$ is LCD if and only if $G G^T$ is nonsingular [2306.00285].

- **$s$-Galois (or Hermitian) case:** The relevant Gram matrix is $M_s(G) = G (\sigma^s(G))^T$, with $\dim \mathrm{Hull}_s(C) = k - \operatorname{rank} M_s(G)$, $\sigma^s$ denoting $p^s$-th power Frobenius [1809.08053].

- **Symmetry property:** For $q=p^e$, the $r$-Galois and $(e-r)$-Galois hulls have equal dimension: $\dim \text{Hull}_r(C)=\dim \text{Hull}_{e-r}(C)$ [2207.02535].

- **Weight enumerators and matroids:** Over $F_2$ or $F_3$, the hull-dimension is determined by the extended weight enumerator or Tutte polynomial, and is invariant under monomial equivalence; for $q\geq 4$, this fails in general [1707.08856].

## 3. Enumeration, Distribution, and Asymptotics

The number of $[n,k]_q$ codes with hull-dimension $l$ is
\[
A_{n,k,l} = \sum_{i=l}^{k} (-1)^{i-l}\, q^{\binom{i-l}{2}}\! \binom{i}{l}_q \binom{n-2i}{k-i}_q T_{n,i},
\]
where $T_{n,i}$ counts self-orthogonal $[n,i]_q$ codes. The $q$-binomial coefficient $\binom{N}{r}_q$ counts $r$-dimensional subspaces of $F_q^N$.

- **Monotonicity:** For $n\geq 2k$, the numbers $A_{n,k,0}>A_{n,k,1}>\cdots>A_{n,k,k}$, i.e., LCD codes are most prevalent, and the frequency decreases strictly with hull-dimension [2402.01255].
- **Limiting proportion:** For fixed relative dimension $\alpha\in(0,1/2]$,
  \[
  \lim_{n\to\infty} \frac{A_{n,k,0}}{\binom{n}{k}_q} = 1-\frac{1}{q},
  \]
  so almost all codes are LCD for large $q$.

Numerical counts, e.g., for binary $[17,7]_2$ codes: 497,119 inequivalent LCD codes, only 58 self-orthogonal; for $[20,10]_2$, 601 LCD and 16 self-orthogonal [2402.01255].

## 4. Constructions and Control of Hull Dimension

A wide range of algebraic techniques provide explicit constructions with prescribed hull-dimension:

- **Reduction by diagonal scaling:** For $q>3$, any $[n,k]_q$ code with hull $h$ is monomially equivalent to $[n,k]_q$ codes with hull-dimension $j$, for all $0\leq j\leq h$ [2306.00285]. For $q>4$, any $[n,k]_q$ code is monomially equivalent to an LCD code with the same parameters [1707.08856, 1809.08053].

- **Incrementing/decrementing hull-dimension:** Extension by one dual codeword or single-coordinate monomial scalings can increase or decrease the hull-dimension by one under mild conditions for $q>3$ [2511.18779, 2306.00285]. Over finite extensions of binary fields $F_{2^m}$, any LCD code of $d\ge 2$ is equivalent to a one-dimensional hull code under a weak condition [2511.18779].

- **Spectral and matrix constructions:** For prescribed small hulls, the spectral method yields optimal LCD and 1-hull codes via suitable choices of tridiagonal Toeplitz matrices and polynomial evaluations, including infinite families of formally self-dual LCD codes [2204.04584].

- **Algebraic geometry and cyclic codes:** Explicit one-dimensional hull codes arise from AG codes from curves of positive genus, classical and twisted Reed–Solomon codes, and matrix-product constructions. These methods extend to Hermitian and Galois hulls, with direct connections to MDS codes and their quantum analogues [2101.06461, 2210.05551, 2206.14516].

- **Probabilistic existence:** For suitable parameters and $q$ (combinatorial bound on code size and minimum distance), Gilbert–Varshamov-type probabilistic arguments guarantee codes with any desired hull-dimension and minimum distance [2305.07140].

## 5. Hulls in Non-Classical Contexts

The hull concept extends beyond fields:

- **Codes over non-unital rings:** For free codes over a local non-unital ring $E$ (with residue field $F_2$), the hull is characterized in terms of the residue code, and explicit build-up constructions allow arbitrary hull-rank [2512.12335].
- **Galois hulls and semilinear isometries:** The hull notion generalizes under arbitrary semilinear isometries (SLAut), yielding the σ-hull and associated intersection dimension formulas, crucial for Galois duals and codes with $\ell$-Galois hulls [2210.05551].

## 6. Applications and Algorithmic Significance

- **Code equivalence and automorphism groups:** Small hull-dimension directly reduces the complexity of code equivalence and automorphism group computation, enabling polynomial or quasi-polynomial time algorithms for LCD and small-hull codes. This applies to both field and non-unital ring settings [2511.18779, 2512.12335, 1707.08856].

- **Cryptography and side-channel resistance:** LCD codes are preferred for masking against side-channel attacks due to minimal hull, and codes with small hull serve as natural generalizations [2402.01255, 2204.04584].

- **Quantum error correction:** The hull-dimension determines the number of required maximally entangled qubits in entanglement-assisted quantum error-correcting codes (EAQECCs). In particular, an $[n,k]_q$ code of hull-dimension $h$ yields an $[[n,k-h,d; n-k-h]]_q$ EAQECC, and codes with hull-dimension $1$ or $0$ can directly target minimal or maximal entanglement regimes [2101.06461, 2105.00513, 2408.09334, 2210.05551, 2207.02535].

## 7. Structural Insights and Open Problems

- **Classification:** Complete classification of hull-dimensions remains open beyond small $n,k$ or specific code families; the combinatorial formula for $A_{n,k,l}$ provides a tool for further analysis [2402.01255].

- **Direct-sum decomposition:** Every code with hull-dimension $h$ decomposes as $C = \mathrm{Hull}_s(C) \oplus U$ where $U$ is $s$-Galois LCD. This structure underpins classification, equivalence, and quantum code construction [2408.09334].

- **Infinite families and MDS codes:** Nearly all optimal code families (including MDS) can be realized with any allowable hull-dimension in large enough $q$, either directly or via monomial transformation [1707.08856, 2210.05551].

- **Emergent research:** Investigations continue on hull-dimension tunability in matrix-product, twisted GRS, and non-field-alphabet codes. Systematic study of hull-rank in free codes over non-unital rings is just underway [2512.12335].

---

### Table: Hull Dimension and Associated Code Classes (Field Case)

| $h=\dim(\mathrm{Hull}(C))$ | Name                              | Structural Property      |
|---------------------------|-----------------------------------|-------------------------|
| $0$                      | LCD (linear complementary dual)   | $C \cap C^\perp = \{0\}$|
| $k$                      | Self-orthogonal                   | $C \subseteq C^\perp$   |
| $k$ and $k=n/2$          | Self-dual                         | $C = C^\perp$           |
| $1$                      | One-dimensional hull              | $\dim(C \cap C^\perp)=1$|

---

**References:**  
[2402.01255], [2306.00285], [1809.08053], [1707.08856], [2511.18779], [2204.04584], [2206.14516], [2101.06461], [2210.05551], [2305.07140], [2512.12335], [2103.10874], [2105.00513], [2408.09334], [2207.02535]

Source: https://www.emergentmind.com/topics/hull-codes-of-free-linear-codes