Both of the diagonal differences were 40.
In a rectangle of 3 X 2 the diagonal difference was 20. This went up by 20 when I deepened the rectangle by one square. I then investigated whether the diagonal difference will go up by another 20 if I deepened the rectangle by another square.
Both these were 60. So the diagonal difference has risen by 20 again. The diagonal differences are obviously going up in a sequence.
I decided to make a formula for the diagonal difference of my first box by calling the number in the top left corner ‘x’:
If I call the number in the top left hand corner ‘x’ then I can work out the rest of the numbers. The top right hand number has to be ‘x+2’. This is because in a 2X3 box this number will always be 2 more than the one on the top left. The bottom left will be ‘x+10’ because every step down in a 10X10 grid adds 10 to the number. The bottom right must be ‘x+12’ because it is two higher than ‘x+10’. I multiply ‘x’ with ‘x+12’ just like before and do the same with ‘x+2’ and ‘x+10’. The products of these numbers are:
x(x+12)=x²+12x
(x+2)(x+10)=x²+20+12x
The difference between these numbers is:
x²+12x-(x²+20+12x)=20
This shows that the answer is always 20.
If I want to find the formula for the diagonal difference for a box of any size I will have to use algebra again. I’ll call the amount of columns ‘m’ and the amount of rows ‘n’.
If I use my original box (2X3) I can work out the algebra for the numbers with ‘m’ and ‘n’ included. In terms of ‘m’ the numbers in the box on a 10x10 grid are:
So the diagonal difference in terms of ‘m’ is:
(x+10)(x+m-1)-x(x+m+9)=x²+xm-x+10x+10m-10 - x²-xm-9x
=10m-10
This makes sense because when m=3 the diagonal difference is 20. 3X10=30 and 30-10=20.
Now I will work out the numbers in terms of ‘m’ and ‘n’.
So the diagonal difference in terms of ‘m’ and ‘n’ is:
(x+10n-10)(x+m-1)-x(x+10n+m-11)= x²+xm-x+10nx+10nm-10n-10m+10-11x
= 10nm-10n-10m+10
My final formula for the diagonal difference of a rectangle/square of any size on a 10X10 grid is 10nm-10n-10m+10. I’ll prove this by using the formula on my first rectangle:
m=3, n=2. 60-20-30+10=20 The diagonal difference is 20.
I now want to make a formula for the diagonal difference of a nXm rectangle on a pXq grid. From looking at my formula I predict p and q will replace 10 in the formula. This is because my grid is now 10X10 and I think that is linked to all the tens in my formula. First I’ll go back to my nXm rectangle and work out the formula for my numbers including p and q (p being the length of the grid and q being the height).
From working out the numbers in terms of p and q I have discovered that q has no part in the numbers. This is because the grid getting longer (p getting larger) would change the numbers but the grid getting longer (q getting larger) would only increase the numbers in the grid. Now I have discovered this I can continue to make a formula for the diagonal difference of the rectangle in terms of m, n, x and p.
(x+m-1)(x+pn-p)-x(x+pn+m-p-1)= x²+xpn-xp+mpn+mx-mp-x-pn+p-x²-xpn-xm+xp+x
= pnm-pn-pm+p
My final formula for the diagonal difference of a rectangle/square of any size on a grid of any size is pnm-pn-pm+p. This proves my prediction that ‘p’ will replace the number ten in my earlier formula. I’ll prove this by using the formula on my first rectangle:
m=3, n=2, p=10. 60-20-30+10=20 The diagonal difference is 20.
I will now try my formula with a 4X5 rectangle on a 20X20 grid to prove that it works with different sized grids and boxes.
Diagonal difference= 1X84=84
= 4X81=324
=324-84
= 240
Diagonal difference= pnm-pn-pm+p
= 20X5X4-20X5-20X4+20
= 240