I received this lamp as a birthday present last year. It’s a great little thing - you can move the individual Tetris pieces around to form whatever shape you wish, and once connected they all individually light up thanks to conducting strips around the edges of each segment.

Leaving the obvious Tetris connection behind for a second though, one thing that’s always irritated me is my inability to build the lamp into a clean rectangle. No matter how hard I tried I always ended up with a stray block sticking out of the side, and another missing on top, or some other irritating imperfect combination.

This irritation extended to many who have visited my room since the lamp became a fixture there. A friend of mine in particular spent an evening shuffling the pieces around into various positions, refusing to accept that there was someone out there with such a twisted mind that they’d happily design the pieces such that they *didn’t* fit together in a clean way. Surely *not*.

He was inevitably unsuccessful in his endeavours, and I’ve since accepted that the lamp probably can’t be constructed in such a way since the pieces just *look* like they won’t fit together cleanly. That’s not a particularly satisfactory conclusion however, and it definitely didn’t quell my compulsive interest in the task.

However, whilst having drinks in my room last night, another friend (who hadn’t been exposed to the lamp’s tortuous attraction before) glanced at the construction on my desk, thought for a few minutes and exclaimed that he had a proof that it couldn’t be formed into a rectangle. After hearing the details, the solution is so simple and elegant that I thought I’d share it here.

The lamp itself is composed of 7 individual pieces, containing a total of 28 squares. Therefore, assuming we can indeed form it into a rectangle, it would have to be 7x4 or 14x2 squares in size. I’m using the former case here simply because it’s a more natural shape, however this proof applies equally as well to the latter. Now imagine that we label each of these squares with a colour - either black or white - such that they form a checkerboard pattern as shown above. Notice that the number of black squares **must** be equal to the number of white, a property we’ll exploit.

So that’s 14 black squares, and 14 white. Looking at each of the pieces individually, the issue with our assumption quickly appears.

As shown above, for pieces 1-6, the number of black squares within the piece is equal to the number of white. Clearly which squares are black and which are white depends on the actual placement of the piece within the rectangle, but the shapes themselves dictate the count of each colour (since adjacent squares must be different colours).

However, piece 7 disrupts the trend. Irrelevant of how it’s located, it must be comprised of 3 squares of one colour, and 1 of the other, a property that is purely down to its shape.

So, taking that into account along with the other 6 pieces, in total they’re comprised of 13 squares of one colour, and 15 of the other, with no assumptions about how they’re located within the rectangle. *Ah*. We needed 14 of each, and since we’ve just shown that we can’t get that, our original assumption is overturned and our proof is complete.

# Conclusion

The proof itself is so simple that I’m slightly disappointed I didn’t notice it myself sooner. However I’m glad that no more time will be wasted mindlessly moving around the pieces hoping for a breakthrough.

Maybe now I can shift my irritation from the lamp itself to whoever designed it to possess such a property.

**EDIT:** This has received a much larger response than I ever anticipated, so thanks to everyone who’s read and shared this. You can follow the discussion on Hacker News, /r/math and /r/programming. This article was also the cover story for Hacker Monthly Issue 58, which provided the cover photo.