Number of rectangles`=.^(9)C_(2)xx.^(9)C_(2)=(36)^(2)=1296`
Number of squares`=8xx8+7xx7+6xx6+1 . .+1xx1`
`=204`
`therefore`Required number of =1296-204=1092
Square can be formed as follows:
To form the smallest square, select any two consecutive lines from the givenn (here 9) vertical and horizontal lines. this can be done in `8xx8` ways (1-2,2-3,3-4, . .,8-9)
Again to form the square consists of four small squares, select the lines as follows (1-3,2-4,3,-5, . .. 7-9) from both vertical and horizontal lines, thus `7xx7` squares are obtained. proceed in the same way)