Consider the array below which has an indefinite
number of x's placed
in rows and columns in one whole rectangle that is divided into four quadrants.
Let a = the number of x's across in each of the two left hand quadrants
(red and yellow).
Let b = the number of x's across in each of the two right hand quadrants
(blue and green).
Let c = the number of rows in each of the top two quadrants (red and blue).
And d = the number of rows in each of the bottom two (yellow and green)
quadrants.
Then the number of x's in the red (upper left) quadrant = ac; in the blue (upper right) quadrant, bc; in the yellow (lower left), ad; and in the green (lower right), bd.
The total number of x's in each row of the whole rectangle is (a+b); and total number of rows in the whole rectangle is (c+d).
Since the total number of x's in the whole rectangle is the total number of x's in each row times the number of rows, the total number of x's is (a+b)(c+d).
And since the total number of x's in the whole rectangle is also the sum of the x's in the four quadrants, it is also equal to (ac+bc+ad+bd).
a x's across 
b x's across 

xxxxxxxxxxxxxxx...xxx 
xxxxx...xxx 
c 
xxxxxxxxxxxxxxx...xxx 
xxxxx...xxx 
d 