  How 9 Cheenta students ranked in top 100 in ISI and CMI Entrances?

# Test of Mathematics Solution Subjective 59 - Number of squares This is a Test of Mathematics Solution Subjective 59 (from ISI Entrance). The book, Test of Mathematics at 10+2 Level is Published by East West Press. This problem book is indispensable for the preparation of I.S.I. B.Stat and B.Math Entrance.

Also visit: I.S.I. & C.M.I. Entrance Course of Cheenta

## Problem

Consider the set of point S = { (x,y) : x,y are non-negative integers ${\le {n}}$ }.
Find the number of squares that can be formed with vertices belonging to S and sides parallel to the axes.

## Solution

S = {(x,y) : x,y are non-negative integers ${\le {n}}$ }
We calculate number of squares by calculating number of |x| squares ,& number of squares number of ${{n}* {n}}$ squares.
Now number of |x| squares = number of choosing one pair of lines with difference 1 parallel to x axis & integer distance x number of choosing one pair of lines to y axis with distance 1 & integer distance from y axis = ${{n}*{n}}$ = ${n^2}$
Similarly number of ${{k}*{k}}$ squares
= ${(n-k+1)^2}$
So total number of squares
= ${\sum_{k=1}^{n}}{{k}^{2}}$ = ${\frac{n(n+1)(2n+1)}{6}}$

# Knowledge Partner  