This is an $8 \times 8$ square lattice.
For a $N \times N$ lattice, count the total number of squares that can be formed using 4 points (the squares can be of any orientation).
This is an $8 \times 8$ square lattice.
For a $N \times N$ lattice, count the total number of squares that can be formed using 4 points (the squares can be of any orientation).