Therefore there are
12 (horizontally) + 12 (vertically) + 18 (diagonally) = 42
EXTEND INVESTIGATION
Based on the idea above we can investigate other size grids.
We could start with square grids but it is just as easy to look at rectangular grids.
Horizontal
This grid is 3 x 5 (3 wide and 5 long)
There are 4 arrangements for each row (1 less than the length)
There are 3 possible rows with the same arrangements (same as the width) so 3 x 4 = 12
So for any rectangle
The number of horizontal arrangements will be equal to, 1 less than length (L-1) multiplied by the width. I.e.,
(L – 1) x W = W(L-1)
In the example above W = 3 and L = 5 giving, 3 x (5 – 1) = 12
Vertical arrangements follow a similar structure.
This grid is 3 x 5 (3 wide and 5 long)
There are 2 arrangements for each column (1 less than the width)
There are 5 possible columns with the same arrangements (same as the length) so 2 x 5 = 10
So for any rectangle
The number of vertical arrangements will be equal to, 1 less than width (W-1) multiplied by the length. i.e.,
(W – 1) x L = L(W-1)
In the example above W = 3 and L = 5 giving, 5 x (3 – 1) = 10
Diagonal arrangements
We only need to consider one direction, since the other direction is exactly the same.
This grid is 3 x 5 (3 wide and 5 long)
There are 4 arrangements for each pair of rows (1 less than the length)
There are 2 possible arrangements of two rows (1 less than the width) so 4 x 2 = 8
So for any rectangle
The number of diagonal arrangements (in one direction) will be equal to, 1 less than the length (L-1) multiplied by 1 less than the width (W-1) i.e.,
(L – 1) x (W – 1) = (L - 1)(W - 1)
In the example above W = 3 and L = 5 giving, (5 - 1) x (3 – 1) = 8
But there are two different directions so the total diagonal arrangements are
2 x (L – 1)(W – 1) = 2(L – 1)(W – 1)
Put the three solutions together.
Horizontal W(L – 1) = WL - W
Vertical L(W – 1) = WL - L
Diagonal 2(L – 1)(W – 1)= 2(LW – L – W + 1) = 2LW – 2L – 2W + 2
Collect terms
WL – W + WL –L + 2LW – 2L – 2W + 2 = 4WL – 3L – 3W + 2
FINAL RULE FOR TWO IN A LINE ANY RECTANGLE
4WL – 3L – 3W + 2
We can extend this investigation further
By changing the number in a line from 2 to 3 or 4 or 5 or … n
In the examples above we see that for a grid of width 3 we can get horizontal, vertical and diagonal arrangements for 3 in a line.
However, we see that we cannot make vertical or diagonal arrangements for 4 in a line.
If the length and width are smaller than n there are no arrangements.
If the length is larger than n but the width is smaller than n then there will only be horizontal arrangements and the total will be W(L – n + 1)
If the length is smaller than n and the width is larger than n then there will only be vertical arrangements and the total will be L(W – n + 1)
If the length and width of the rectangle are greater than or equal to n. i.e.
L,W ≥ n then the following process is necessary.
For the rectangle above
Horizontally
We note that for length = 5
In one row horizontally
For 2 in a line we can make 4 arrangements. 5 – (2 – 1) = 4
For 3 in a line we can make 3 arrangements. 5 – (3 – 1) = 3
For 4 in a line we can make 2 arrangements. 5 – (4 – 1) = 2
For 5 in a line we can make 1 arrangement. 5 – (5 – 1) = 1
If L is the length of the rectangle and n is the number in a line
We can make L – (n – 1) arrangements
For the total number of horizontal arrangements we need to multiply the number of arrangements in one row by the number of rows. (The same as the width) i.e.
W x (L – (n – 1)) =W(L –(n – 1)) = W(L – n + 1) = WL – Wn + W
Vertically
Similarly to the method above
We note that for width = 3
In one column vertically
For 2 in a line we can make 2 arrangements 3 – (2 – 1) = 2
For 3 in a line we can make 1 arrangement 3 – (3 – 1) = 1
If W is the width of the rectangle and n the number in a line
We can make W – (n – 1) arrangements
For the total number of vertical arrangements we need to multiply the number of arrangements for one column by the total number of columns. (The same as the length). i.e.
L x (W – (n – 1) = L(W – (n – 1)) = L(W – n + 1) = LW –Ln + L
Diagonally
We note that as for 2 in a line there are two equal amounts. One set diagonally in one direction and the second in the opposite direction.
For length 5
For 2 in a line we can make 4 arrangements 5 – (2 – 1) = 4
For 3 in a line we can make 3 arrangements 5 – (3 – 1) = 3
If L is the length of the rectangle and n the number in a line
We can make L – (n – 1) arrangements
For the total number of diagonal arrangements we need to multiply the number of diagonals for one row by the number of rows available.
For 2 in a line the number of rows available is 3 – (2 – 1) = 2
For 3 in a line the number of rows available is 3 – (3 – 1) = 1
The number of rows available is W – (n – 1)
Therefore, the total number for diagonals in one direction is
(L–(n–1))x(W–(n–1)) = (L–n+1)x(W–n+1) = LW – Ln + L – nW + n2 – n + W – n + 1
= LW – Ln – Wn + L + W + n2 – 2n + 1
This needs to be multiplied by two because of the two different directions for diagonal arrangements. Thus
2 x (LW – Ln – Wn + L + W + n2 – 2n + 1) gives
2LW – 2Ln – 2Wn + 2L + 2W + 2n2 – 4n + 2
The general rule for any size rectangle L x W and with n in a line, we need to add all parts together.
(LW – Wn + W) + (LW –Ln + L) + (2LW – 2Ln – 2Wn + 2L + 2W + 2n2 – 4n + 2)
Collect terms.
4LW + 3L + 3W – 3Ln – 3Wn + 2n2 – 4n + 2