@Ankoganit's brilliant answer gives the proof on two different levels, the easier of which should be accessible with high school mathematics. I liked the proof quite a lot, so I wanted to try and rewrite it so that it can be understood with very little maths at all. Here's what I ended up with.
To reiterate the puzzle setup,
- we have a rectangular grid of numbers, and
- we can toggle each column on or off independently. Then
- for each row, (of which there are fewer than columns), we check if the toggled-on numbers in that row add up to an even or an odd number.
With all that, our task is to prove that in addition to the "all columns off" state, there is always another way to make every row total show "even".
Following the method in @Ankoganit's answer (or at least something that works in an analogous fashion), we can start by toggling all the columns off, and then, one by one, we'll try every possible combination of columns, and write down the exact pattern of odds and evens in the row sums.
For example, if the numbers and row sums look like this with all the columns A to E toggled on
6 9 2 4 7 even
7 1 0 8 2 even
7 1 3 5 2 even
6 1 3 4 5 odd
A B C D E
we'd start systematically writing down what the row sums are when only a portion of the columns is toggled on:
A: even-odd-odd-even
B: odd-odd-odd-odd
A+B: odd-even-even-odd
C: even-even-odd-odd
A+C: ...
B+C: ...
A+B+C: ...
D: ...
and so on.
Then comes the first clever bit: no matter what the actual numbers in the grid are, we are always guaranteed to find a pair. That is, we can always find two column combinations that will produce the exact same pattern of odds and evens for the row sums. Why? Because of the grid shape, and something called the pigeonhole principle: There are more columns than there are rows, so there are also more column combinations (each column is either on or off) than there are possible distinct patterns of row sums (each row sum is either odd or even). If you try to match each column combination to a different row sum pattern, you will run out of row sum patterns first, so by necessity, some row sum pattern(s) must have more than one column combination that produces them.
So, we know we can always find a pair, which is when the second clever bit of Ankoganit's answer steps in: We can do addition to such a pair! If we toggle one of the combinations first, and then the second one, then each row sum will be either "even+even=even", or "odd+odd=even", and that's exactly what we wanted!
There's a final catch though: what if both the combinations in the pair included the same column? We cannot very well include the same column twice, now can we?
Turns out, this is not a problem at all. We just need to notice that adding a number changes parity in exactly same way that subtracting does, so if we need to toggle on a column that was already on, we can achieve the exact same effect by toggling that column back off.
That covers all the cases, so the proof is complete, and since we never used the grid size or the specific contents of the grid in the proof, it applies to all grids that fit the initial description. Just for fun and illustration purposes, we can then apply it to our example case:
A: even-odd-odd-even
B: odd-odd-odd-odd
A+B: odd-even-even-odd
C: even-even-odd-odd
A+C: even-odd-even-odd
B+C: odd-odd-even-even
A+B+C: odd-even-odd-even
D: even-even-odd-even
A+D: even-odd-even-even
B+D: odd-odd-even-odd
C+D: even-even-even-odd
A+B+D: odd-even-odd-odd
A+C+D: even-odd-odd-odd
B+C+D: odd-odd-odd-even
A+B+C+D: odd-even-even-even
A+E: odd-odd-odd-odd (same as B)
and now that we finally found a pair, we can add A+E to B to achieve the desired "even-even-even-even" at "A+B+E":
6 9 - - 7 even
7 1 - - 2 even
7 1 - - 2 even
6 1 - - 5 even
A B C D E
Finally, to demonstrate the "other kind of addition", we can notice that this was not actually the first pair we found: at the start, we had already calculated A+B+C+D+E=even-even-even-odd
, which is the same pattern as C+D
, so we could have also done A+B+C+D+E + C+D = A+B+C+D+E-C-D = A+B+E = even-even-even-even
to reach the same result.
Hope this was worth your time, and if you find something that could be made even more clear, please do drop a comment; that would be much appreciated.