A 3×3 grid is filled with +1 and -1. At each step, you choose a row or column and flip all signs in it. Can you reach a grid where all entries are +1, starting from a grid with exactly one -1?
Think about your answer, then reveal below.
Model answer: No. The invariant is the product of all nine entries. Initially, the product is -1 (eight +1s and one -1). Flipping a row or column flips 3 entries, which multiplies the product by (-1)³ = -1. So each step multiplies the total product by -1, alternating between -1 and +1. The all-+1 grid has product +1. Starting from -1, after any even number of steps the product is -1, and after any odd number it is +1. But we need the grid to be all +1s, which requires the product to be +1 AND all entries to be +1. However, having the right product does not guarantee the right configuration. The deeper invariant is that the product changes between -1 and +1, but reaching all +1s from a single -1 is impossible because the parity of the number of -1s changes by an odd number each step (1 or 3 entries flip), so the parity of the count of -1s changes at each step. Starting with 1 (odd), after one step you have 0 or 2 or 4 (even) negative entries, then odd again, etc. You need 0 (even) -1s. After an odd number of steps you have odd count, after even you have even. So it is possible after an even number of steps to have 0 negative entries — but the product invariant shows this is impossible since the product after an even number of steps is -1, which means an odd number of -1s. Contradiction. Therefore it is impossible.
The product of all entries is the key invariant. Each row/column flip changes exactly 3 signs, multiplying the total product by (-1)³ = -1. Starting at -1, the product alternates -1, +1, -1, +1, ... The target (all +1s) has product +1, achievable only after an odd number of steps. But to get all +1s, we also need every entry individually to be +1. The invariant narrows the search space and, combined with more detailed analysis, proves impossibility.