# Orthonormal basis question related to latin squares

I'm going through a proof of the nonexistence of pair of mutually orthogonal latin squares of order 6 on this link

http://trustyservant.com/archives/6949

This proof considers a 24 by 40 matrix of zeros and ones (Over the field $F_2$), in which every row has exactly 7 ones. I am looking for a dependence relation between the rows of the matrix.

It is previously stated that the rows of the matrix live in a vector space $V$ with $dimV=40$ and we're taking the set $e_1=(1,0,...,0), e_2=(0,1,...,0),..., e_{40}=(0,0,...,1)$ to be the orthonormal basis of $V$.

Now we consider a sum of rows such that $r_{i_1} + r_{i_2} + ... + r_{i_m}=0$

...and the following part confuses me:

From here...

Each of the $r_{i_h}$ is a sum of some of the 40 $e_j$. Let $b_0$ be the total number of $e_j$ which do not appear in any $r_{i_h}$, $b_2$ the number which appear in just two $r_{i_h}$, $b_4$ the number which appear in just four, and $b_6$ the number which appear in just six. Note that each $e_j$ must appear an even number of times (since the sum is zero) and cannot appear more than six times.

$$b_0+b_2+b_4+b_6=40$$ $$2b_2+4b_4+6b_6=7m$$ $$b_2+6b_4+15b_6=m(m-1)/2$$

The first relation just says that the total number of $e_j$ is 40. The second says that each row has seven 1s, as discussed above. The third counts the number of pairs by column on the left hand side and by row on the right hand side: each pair of rows has just one $e_j$ in common.

...to here.

More specifically I don't understand what the third equation counts or how it counts it.