How many squares are there in the figure given below ?

How many squares are there in the figure given below ?

24
28
30
32
This question was previously asked in
UPSC CAPF – 2014
The correct answer is 30.
The figure provided is a standard 4×4 grid of squares. To find the total number of squares in an N x N grid, we count the number of squares of each possible size (1×1, 2×2, 3×3, …, NxN) and sum them up.
For a 4×4 grid (N=4):
– Number of 1×1 squares = 4 * 4 = 16
– Number of 2×2 squares = 3 * 3 = 9
– Number of 3×3 squares = 2 * 2 = 4
– Number of 4×4 squares = 1 * 1 = 1
Total number of squares = 16 + 9 + 4 + 1 = 30.
The general formula for the total number of squares in an N x N grid is the sum of squares from 1 to N: 1² + 2² + 3² + … + N². For N=4, the sum is 1² + 2² + 3² + 4² = 1 + 4 + 9 + 16 = 30.