Self-dual code (source code)

= Self-dual code
{title2=$C=C^\perp$}

A <linear code> is self-dual when it equals its <dual code> under the standard <dot product>. For a length-$2k$ code with a rank-$k$ <generator matrix> $G$, this is equivalent to $GG^T=0$: orthogonality gives inclusion in the <dual code>, and equal <dimensions> give equality. Over $\mathbb F_2$, a <generator matrix> $(I\mid A)$ therefore generates a self-dual code exactly when $AA^T=I$.