Blog > Solving the “Lights Out” Puzzle via Linear Algebra

Solving the “Lights Out” Puzzle via Linear Algebra

March 26th, 2024

Lights Out is a puzzle that sits in a very interesting place mathematically: while many puzzles can be solved with the help of math, Lights Out is solved exactly and completely by math (linear algebra in particular). Linear algebra doesn’t just make it easier to solve: it finds an exact solution, and does it so cleanly that it seems like Lights Out was made for mathematical reasons (even though it wasn’t, unlike some other puzzles).

So if you’re ever stuck in a video game that has this puzzle (which seems to be just about all of them), just give the following video a quick watch and then whip out your favourite linear algebra software to solve a too-large-to-want-to-solve-by-hand linear system:

The Manim Python script for creating the animations in this video is attached below since, given how absurdly long it took to put together, it would be a shame if no one else made use of it for anything. So please, make use of it – make more videos about Lights Out!

  1. October 19th, 2025 at 10:29 | #1

    Wonderful beat I wish to apprentice while you amend your web site how could i subscribe for a blog web site The account aided me a acceptable deal I had been a little bit acquainted of this your broadcast provided bright clear idea

  2. October 24th, 2025 at 09:04 | #2

    I am not sure where youre getting your info but good topic I needs to spend some time learning much more or understanding more Thanks for magnificent info I was looking for this information for my mission

  1. September 28th, 2025 at 05:44 | #1
  2. October 2nd, 2025 at 20:21 | #2
  3. October 10th, 2025 at 01:45 | #3
  4. October 11th, 2025 at 21:12 | #4
  5. October 14th, 2025 at 12:40 | #5
  6. October 15th, 2025 at 10:55 | #6
  7. October 17th, 2025 at 04:32 | #7
  8. October 31st, 2025 at 20:57 | #8