Logic 5 min readApril 11, 2026

Lights Out: The Puzzle With a Mathematical Solution Most Players Never Find

The Lights Out puzzle has a complete mathematical solution using linear algebra. Here's the hidden structure — and what it teaches about systematic problem-solving.

A brief history of Lights Out

Lights Out was released by Tiger Electronics in 1995. The handheld device displayed a 5×5 grid of lights; each button press toggled the pressed light and its orthogonal neighbours. The goal was to turn all lights off from a random starting configuration. The game sold millions of units and spawned a rich body of mathematical analysis.

What made Lights Out fascinating to mathematicians was not its difficulty but its hidden algebraic structure. The puzzle can be completely analysed using linear algebra over the field GF(2) — arithmetic where the only values are 0 (off) and 1 (on) and addition is performed modulo 2 (so 1+1=0, i.e., two presses cancel out).

The mathematical structure

Because every light is either on or off and pressing a button twice returns it to its original state, each button can be considered as either pressed or not pressed, and the order of presses is irrelevant. This means a Lights Out puzzle reduces to solving a system of linear equations over GF(2). The solution (which buttons to press) either exists uniquely, has multiple solutions, or has no solution — depending on the starting configuration.

Not every starting configuration is solvable. On a standard 5×5 board, approximately two-thirds of random configurations are solvable. The original Tiger Electronics game only presented solvable configurations — an important design decision that the box never mentioned.

Tip

The order you press buttons never matters — only whether you press each button an odd or even number of times matters. Don't waste effort optimising sequence; focus on which buttons to press at all.

What Lights Out trains

Most players approach Lights Out with trial-and-error, which is cognitively real but inefficient. The deeper training is recognising when a strategy has failed and the problem requires systematic re-framing rather than more of the same. This meta-level problem-solving awareness — knowing when to change approach — is a hallmark of expert performance across domains.

Combinatorial puzzles like Lights Out also train comfort with counter-intuitive moves: sometimes pressing a lit button (which turns it off but disturbs neighbours) is necessary to reach a global solution that couldn't be reached by the locally obvious move of pressing only unlit buttons.

Strategy for non-mathematicians

A well-known heuristic for 5×5 Lights Out is the 'chase the lights' algorithm: working row by row from top to bottom, press the button in the next row that would turn off any remaining lights in the current row. After processing all rows, the bottom row will have a specific pattern of remaining lights — and there are only 32 such patterns, each requiring a known set of first-row presses to resolve.

For MindPlay's 3×3 version, the state space is small enough that working through possibilities systematically from each distinct starting configuration takes only minutes. Mapping out what each button press affects before touching anything is always worth the upfront cost.

Key takeaways

  • Lights Out is fully solvable using linear algebra over GF(2) — each button is either pressed or not, order is irrelevant.
  • Not all starting configurations are solvable; the original Tiger Electronics game only presented solvable ones.
  • The key cognitive training is recognising when trial-and-error has failed and systematic re-framing is needed.
  • 'Chase the lights' row-by-row is the most practical algorithm for most players.

Ready to train this skill?

Play Light Switch Puzzle — free, no account needed.

Play now