Wednesday, 28 January 2015

How many rectangles are there in an mxn grid?

Let us consider the following grid with m rows and n columns: 



Number of rectangles with dimension 1X1 = m*n
Number of rectangles with dimension 2X1 = (m-1)*n
Number of rectangles with dimension 3X1 = (m-2)*n
....................
Number of rectangles with dimension mX1 = [(m-(m-1)]*n

Similarly,
Number of rectangles with dimension 1X2 = m*(n-1)
Number of rectangles with dimension 2X2 = (m-1)*(n-1)
Number of rectangles with dimension 3X2 = (m-2)*(n-1)
..............
Number of rectangles with dimension mX2 = [(m-(m-1)]*(n-1)
Increasing the number of columns incrementally by 1, the last set of number of rectangles with n columns are
Number of rectangles with dimension 1Xn = m*1
Number of rectangles with dimension 2Xn = (m-1)*1
Number of rectangles with dimension 3Xn = (m-2)*1
.....................
Number of rectangles with dimension mXn = [(m-(m-1)]*1
Sum (1X1, 2X1, 3X1…..mX1) = n * [m + (m-1) + (m-2) +……1]                = n * m(m+1)/2
Sum (1X2, 2X2, 3X2…..mX2) = (n-1) * [m + (m-1) + (m-2) +……1]         = (n-1) * m(m+1)/2
Sum (1X3, 2X3, 3X3…..mX3) = (n-2) * [m + (m-1) + (m-2) +……1]         = (n-2) * m(m+1)/2
.....................
Sum (1Xn, 2Xn, 3Xn…..mXn) = [(n-(n-1)] * [m + (m-1) + (m-2) +……1]  = 1 * m(m+1)/2

And total number of rectangles will be sum of the sums of rectangles of various sizes
So, S = [m(m+1)/2] * [n + (n-1) + (n-2) +…….1]
S = [m(m+1)/2] * S = [n(n+1)/2]
S = mn(m+1)(n+1)/4

Welcome to Expert Math! Do you have a child who needs a little extra help with high school Math? Or do you want your child to get ahead of the curve? If you want your child to catch up or get ahead, give Expert Math a call! We have a team of Math Experts, each with more than a decade of experience. Our rates are reasonable and become all the more attractive as the group grows. So, if you need a helping hand, don't be afraid to reach out to the Math Experts! We're here to help your child learn and grow. 

Visit http://www.expertmath.ca


Service offered in: Richmond Hill, Thornhill, North York, Toronto, Markham, Vaughan


Subjects: Calculus, Vectors, Probability, Advanced Functions

Specialized tutoring in IB Mathematics, AP Mathematics, Academic Mathematics, Applied Mathematics


No comments:

Post a Comment