[Jump to code hierarchy]

Dual linear code

Alternative Names: Orthogonal linear code.

Description

For any \([n,k]_q\) linear code \(C\), the dual code is the set of \(q\)-ary strings that are orthogonal to the codewords of \(C\) under a particular inner product.

The dual code is a linear code defined by \begin{align} C^\perp = \{ y\in \mathbb{F}_q^{n} ~|~ x\cdot y=0 \forall x\in C\},\tag*{$(1)$} \end{align}where the ordinary, standard, Euclidean, or symmetric inner product is \(x\cdot y = \sum_{i=1}^n x_i y_i\) for coordinates \(x_i,y_i\).

A code that is contained in its dual, \(C \subseteq C^\perp\), is called self-orthogonal, weakly self-dual, or null. A self-orthogonal code is called maximal if it is not contained in the dual of any other code. A code that contains its dual, \(C^\perp \subseteq C\), is called dual-containing. A code that is equal to its dual, \(C^\perp = C\), is called self-dual. A code that is equivalent to its dual is called iso-dual. The intersection of a code and its dual, \(C \cap C^{\perp}\), is called the hull of the code. A code admits a complementary dual if \(C\) and \(C^{\perp}\) do not share any codewords; such codes are called LCD codes. The dual of a dual code is the original code. A code is dual-containing iff its dual is self-orthogonal.

The dual code \(C^\perp\) is the row space of the parity check matrix of \(C\). The dual code is the kernel of a generator matrix for \(C\), and \(\dim C^\perp = n-k\). The automorphism group of a linear binary code and its dual are the same [1; pg. 230].

An alternative definition of dual substitutes the Euclidean inner product for the Hermitian inner product, \begin{align} x\cdot y \to x\cdot \bar{y} = \sum_{i=1}^n x_i y^{p}_i~.\tag*{$(2)$} \end{align}Self-dual codes with respect to the above product are called Hermitian self-dual; similar definitions hold for self-orthogonal and dual-containing.

More general inner products can also be considered [2].

Protection

The dual of an \([n,k,d] \) code is an \([n,n-k,d^{\perp}]\) code, where the dual distance \(d^{\perp}\) is not always related to \(d\). The generator matrix of \(C^\perp\) is the parity check matrix of \(C\), and vice versa.

The generator matrix of the Hermitian dual of a code with generator matrix \(G = [I_k~~A]\) is \([-\bar{A}^T~~I_{n-k}]\), where \(\bar{A}\) contains matrix elements of \(A\) raised to the \(p\)th power. A code is Hermitian self-dual if and only if \(A \bar{A}^{T} = -I_{n/2}\).

Cousins

References

  1. [1]

    F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes (Elsevier, 1977)

  2. [2]

    Y. Fan and L. Zhang, “Galois self-dual constacyclic codes”, Designs, Codes and Cryptography 84, 473 (2016) DOI

  3. [3]

    E. F. Assmus Jr. and H. F. Mattson Jr., “New 5-designs”, Journal of Combinatorial Theory 6, 122 (1969) DOI

  4. [4]

    A. R. Calderbank, P. Delsarte, and N. J. A. Sloane, “A strengthening of the Assmus-Mattson theorem”, IEEE Transactions on Information Theory 37, 1261 (1991) DOI

  5. [5]

    V. D. Tonchev, “Codes and designs”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 97-110 DOI

  6. [6]

    W. Feit, “Some remarks on weight functions of spaces over GF(2)”, unpublished (1972)

  7. [7]

    C. L. Mallows and N. J. A. Sloane, “Weight enumerators of self-orthogonal codes”, Discrete Mathematics 9, 391 (1974) DOI

  8. [8]

    F. B. Hergert, “On the delsarte-goethals codes and their formal duals”, Discrete Mathematics 83, 249 (1990) DOI

  9. [9]

    A. R. Hammons, P. V. Kumar, A. R. Calderbank, N. J. A. Sloane, and P. Solé, “The Z_4-Linearity of Kerdock, Preparata, Goethals and Related Codes”, (2002) arXiv:math/0207208

  10. [10]

    Z. X. Wan, Quaternary Codes (WORLD SCIENTIFIC, 1997) DOI

  11. [11]

    K. KASAI and K. SAKANIWA, “Spatially-Coupled MacKay-Neal Codes and Hsu-Anastasopoulos Codes”, IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences E94-A, 2161 (2011) arXiv:1102.4612 DOI

  12. [12]

    P. Delsarte, J. M. Goethals, and F. J. Mac Williams, “On generalized ReedMuller codes and their relatives”, Information and Control 16, 403 (1970) DOI

  13. [13]

    N. Ron-Zewi and M. Sudan, “A new upper bound on the query complexity for testing generalized Reed-Muller codes”, (2012) arXiv:1204.5467

  14. [14]

    W. C. Huffman, J.-L. Kim, and P. Solé, “Basics of coding theory”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 3-44 DOI

  15. [15]

    M. A. Tsfasman and S. G. Vlăduţ, Algebraic-Geometric Codes (Springer Netherlands, 1991) DOI

  16. [16]

    S. Vijay and L. Fu, “Quantum Error Correction for Complex and Majorana Fermion Qubits”, (2017) arXiv:1703.00459

  17. [17]

    G. Zeng, Y. Li, Y. Guo, and M. H. Lee, “Stabilizer quantum codes over the Clifford algebra”, Journal of Physics A: Mathematical and Theoretical 41, 145304 (2008) DOI

  18. [18]

    S. Dutta, “A Note on Clifford Stabilizer Codes for Ising Anyons”, (2025) arXiv:2503.08736

  19. [19]

    M. Mudassar, A. Schuckert, and D. Gottesman, “Fault tolerant Operations in Majorana-based Quantum Codes: Gates, Measurements and High Rate Constructions”, (2025) arXiv:2508.09928

Page edit log

Your contribution is welcome!

on github.com (edit & pull request)

— see instructions

Zoo Code ID: dual

Cite as:
“Dual linear code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/dual, arXiv:2606.11484
BibTeX:
@incollection{eczoo_dual,
title={Dual linear code},
booktitle={The Error Correction Zoo},
year={2026},
editor={Albert, Victor V. and Faist, Philippe},
eprint={2606.11484},
doi={10.48550/arXiv.2606.11484},
url={https://errorcorrectionzoo.org/c/dual}
}
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/dual

Cite as:

“Dual linear code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/dual, arXiv:2606.11484

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/q-ary_digits/dual/dual.yml.