Self-dual linear code 


An \([n,n/2]_q\) code that is equal to its dual, \(C^\perp = C\), where the dual is defined with respect to an inner product, most commonly either Euclidean or Hermitian. Self-dual codes exist only for even lengths and have dimension \(k=n/2\).

An even (doubly-even) self-dual code is called Type I (Type II) [1,2]. Ternary (quaternary) self-dual codes are called Type III (Type IV), and each of their codewords has weight three (two).


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}\).

The minimum distance of a Hermitian self-dual \([n,n/2]\) code satisfies \begin{align} d\leq\begin{cases} 2\left\lfloor \frac{n}{8}\right\rfloor +2 & q=2\text{ and code is singly-even}\\ 4\left\lfloor \frac{n}{24}\right\rfloor +4 & q=2\text{ and code is doubly-even}\\ 3\left\lfloor \frac{n}{12}\right\rfloor +3 & q=3\\ 2\left\lfloor \frac{n}{6}\right\rfloor +2 & q=4\text{ and code is even} \end{cases}~, \tag*{(1)}\end{align} except for \(n = 22\) modulo four for the second case, where the bound is increased by four [3]. A self-dual code saturating the above inequality is called extremal.


See books [4,5] for more on self-dual codes.See Refs. [6,7] for constructions of binary self-dual codes.See Tables of Self-Dual Codes for a database of self-dual codes over \(GF(2)\), \(GF(3)\), \(GF(4)\) (Euclidean or Hermitian), \(GF(5)\), and \(GF(7)\). See also Ref. [8].


  • Dual linear code
  • Self-dual additive code — Self-dual linear codes with respect to some inner product are automatically self-dual additive under the same inner product since linear codes are additive. In addition, quaternary linear codes are Hermitian self-orthogonal (self-dual) iff they are trace-Hermitian self-orthogonal (self-dual) additive [9; Thm. 27.4.1] ([5; Thm. 9.10.3]).




S. Kurz, “Divisible Codes”, (2022) arXiv:2112.11763
J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups (Springer New York, 1999) DOI
E. M. Rains, “Shadow bounds for self-dual codes”, IEEE Transactions on Information Theory 44, 134 (1998) DOI
Self-Dual Codes and Invariant Theory (Springer-Verlag, 2006) DOI
W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes (Cambridge University Press, 2003) DOI
S. Bouyuklieva, “Some optimal self-orthogonal and self-dual codes”, Discrete Mathematics 287, 1 (2004) DOI
M. Harada, “Binary extremal self-dual codes of length 60 and related codes”, Designs, Codes and Cryptography 86, 1085 (2017) arXiv:1706.01694 DOI
P. Gaborit and A. Otmani, “Experimental constructions of self-dual codes”, Finite Fields and Their Applications 9, 372 (2003) DOI
M. F. Ezerman, "Quantum Error-Control Codes." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
G. Hoehn, “Self-dual Codes over the Kleinian Four Group”, (2000) arXiv:math/0005266
S. Bouyuklieva, "Self-dual codes." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
I. Krasikov and S. Litsyn, “Linear programming bounds for doubly-even self-dual codes”, IEEE Transactions on Information Theory 43, 1238 (1997) DOI
P. S. Montague, “A new construction of lattices from codes over GF(3)”, Discrete Mathematics 135, 193 (1994) DOI
E. F. Assmus Jr. and H. F. Mattson Jr., “New 5-designs”, Journal of Combinatorial Theory 6, 122 (1969) DOI
V. D. Tonchev, "Codes and designs." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
C. J. Colbourn, editor , CRC Handbook of Combinatorial Designs (CRC Press, 2010) DOI
Yan Jia, San Ling, and Chaoping Xing, “On Self-Dual Cyclic Codes Over Finite Fields”, IEEE Transactions on Information Theory 57, 2243 (2011) DOI
S. Jitman et al., “Abelian Codes in Principal Ideal Group Algebras”, IEEE Transactions on Information Theory 59, 3046 (2013) DOI
Page edit log

Your contribution is welcome!

on (edit & pull request)

edit on this site

Zoo Code ID: self_dual

Cite as:
“Self-dual linear code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2023.
@incollection{eczoo_self_dual, title={Self-dual linear code}, booktitle={The Error Correction Zoo}, year={2023}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

“Self-dual linear code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2023.