Leave No Squares

How many matchsticks do you need to remove so that no squares of any size remain?

Nine matchsticks are enough, as seen from the solution below.

To see that eight matchsticks are not enough, notice that removing an inner matchstick reduces the number of 1×1 squares at most by 2. Since there are 16 such small squares, in order to get rid of them all, we need to remove only inner matchsticks. However, in this case, the large 4×4 square will remain.

The Twelve Matchsticks

With 12 matches you can easily create a shape with area 9 and a shape with area 5, as shown on the picture below. Can you rearrange the 12 matchsticks, so that they encompass an area of 4?

Remark: You should have only one resulting shape and no matches should be unused.

First, create a Pythagorean triangle with sides 3, 4, 5, and area 6. Then simply flip its right angle inwards, so that the area decreases by 2.