# Properties of self-dual code

Let $C$ be a self-dual binary $[n,k,d]$ code.

I want to show that if $c=(c_1, \dots, c_n) \in C$ then $\sum_{i=1}^n c_i=0$ and that all the words of the code have an even weight.

We know that $x \in C^{\perp} \Leftrightarrow Gx=0$ where $G$ is the generator matrix.

Since $C=C^{\perp}$ we have that $G=H$ where $H$ is the parity matrix of the code.

So we have that $c=(c_1, \dots, c_n) \in C \Rightarrow c \in C^{\perp} \Rightarrow Gx=0 \Rightarrow Hx=0$

Do we get from that, that $\sum_{i=1}^n c_i=0$?

If so how?

## 1 Answer

By definition, the dual code $C^\perp$ consists of all words $x$ such that $\langle x,y \rangle = 0$ for all $y \in C$. If $C = C^\perp$ then in particular $\langle x,x \rangle = 0$ for all $x \in C$, which implies that $x$ has even weight.

• Sorry, I had a typo in my solution. Now it makes more sense. Mar 13, 2016 at 16:02
• It doesn't necessarily hold that the all one vector is in $C$. I'll let you find an example. It's also certainly not the case that $\langle x,x \rangle = 0$ iff $x = 0$; this only holds over characteristic zero. Try to think stuff over for a few hours. Mar 13, 2016 at 16:13
• I believe you can solve this yourself. Just try a bit longer. Mar 13, 2016 at 17:18
• That's the basic idea, though we care about the remainder modulo 4 rather than modulo 2. At any rate, I believe you can solve it on your own, and will not provide any more help. Mar 13, 2016 at 17:29
• Evinda, I cannot act as your TA. Mar 13, 2016 at 22:46