number of 8 x 8 matrices with specific conditions How can we find the number of 8 by 8 matrices in which each entry is 0 or 1. In addition each row and each column contains odd number of 1's. Thanks for help.
 A: Hints: 


*

*Exactly one half of all the 8-tuples of $0/1$s have an odd number of ones.

*You can select the first seven rows among the lot of the above arbitrarily. Then the choices for the last row are severely limited.



An even shorter way is to determine in how many ways you can complete an arbitrarily filled in $7\times7$ upper left block in order to meet the prescribed conditions. For full credit you should also explain, why it is essential that the numbers of both rows and columns have the same parity?
A: Hint: The number of ways to fill a given row of 8 entries with $0's$ and $1's$ using an odd number of $1's$ is equal to the number of subsets of an $8$-element set with an odd number of elements and identifying a given row with the set of labels from 1 to 8 for which the corresponding entries are equal to 1).
A: Let's find the solution for any $n\times n$ matrix.
As @Jyrki Lahtonen said, the strategy is to select arbitrarily the first $(n-1)$ rows and then compute the $n$-th row.
The total number of combinations for any of the first $(n-1)$ rows is $2^n$. Half of them have an odd number of $1$'s in it. Which means there are $\frac{2^n}{2}=2^{n-1}$ possible combinations for each of the first $(n-1)$ rows.
Once all of these rows have been determined, there is only one possible combination for the last row : for each element of the row, if the number of $1$ in the column is already odd you put a $0$, if it's even put a $1$.
This means the total number of $n\times n$ matrices verifying your conditions is:
$$N=\left(2^{n-1}\right)^{n-1}=2^{(n-1)(n-1)}$$
However, there is something I have assumed in this proof, which is the fact that the last row will always have an odd number of $1$'s, whatever the first $(n-1)$ rows are.

Let's prove this too:
Denote $\left\{\begin{array}{cc}x_i && \mbox{the number of 1's in the i-th row} \\ X_p && \mbox{the total number of 1's in the first (n-1) rows} \\ X && \mbox{the total number of 1's in the matrix}\end{array}\right.$
You have $\displaystyle X_p=\sum_{i=1}^{n-1} x_i$ and  $\displaystyle X=\sum_{i=1}^n x_i=X_p+x_n$.


*

*First case: $n$ is even:
Since we want all $x_i$ to be odd, $X$ has to be even (as the sum of an even number of odd numbers).
In the same way, since $(n-1)$ is odd, $X_p$ has to be odd.
Now since $X=X_p+x_n$ and since $X$ is even and $X_p$ is odd, $x_n$ has to be odd. QED


*

*Second case: $n$ is odd:
Since we want all $x_i$ to be odd, $X$ has to be odd (as the sum of an odd number of odd numbers).
In the same way, since $(n-1)$ is even, $X_p$ has to be even.
Now since $X=X_p+x_n$ and since $X$ is odd and $X_p$ is even, $x_n$ has to be odd. QED
