Total weight of a full-support binary linear code (source code)

= Total weight of a full-support binary linear code
{title2=$\sum_{x\in C}\operatorname{wt}(x)=n2^{k-1}$}

A length-$n$, dimension-$k$ <binary linear code> has full support when no coordinate vanishes on every <codeword>, equivalently when the union of the <supports of a vector> of all codewords covers every coordinate. Every coordinate is then a nonzero <linear functional> on the message <vector space> $\mathbb F_2^k$. Translation by a <vector> on which it is one pairs the zero and one fibers, so exactly $2^{k-1}$ <codewords> contribute one in that coordinate. Summing these contributions proves the formula. If there are $r$ nonzero columns in a full-rank <generator matrix>, the same argument gives $r2^{k-1}$ instead.