How many squares does the diagonal of this rectangle go through? 
I have a rectangle made of tiles measuring $9$ by $12$ tiles to get $108$ tiles. A diagonal line is cut through the top left corner down to the bottom right corner. How many tiles does the diagonal go through?

I had this question on a test today and I want to know the answer. I did this by literally drawing it up, and shading the squares the line went through. I got 14 squares. Now I searched this up on MSE and found this answer which asks the same question. However, I don't quite understand the answer, and I don't get what the $(N,M)$ part of the last line meant either. (I'm only a Year 7). So, can someone give me a way how to find out the answer using techniques a Year 7/8 would know. Also, please keep formulas to a minimum. (We are not allowed to use a formula in our working out, in which we have to show). Thank you
 A: You divide the rectangle $9\times12$ into three smaller rectangles $3\times4$ as follows:

bacause the lower two small rectangles are just repeating the top small rectangle, hence the numbers of shaded squares are equal in each of the small rectangles.
When the rectangle is a square $A\times A$, the diagonal line will pass through the intersection points, thus the number of shaded squares will be $A$. When the rectangle is $A\times B$, its diagonal crosses all squares horizontally and vertically once, but the top left square counted twice, hence subtract it once to get: $A+B-1$.
So, in your case the answer is:
$$3\cdot (3+4-1)=18.$$
A: The diagonal $d$ will go through two grid points which divide it into three equal parts. Each part $d'$ is a diagonal of a $4\times3$ grid rectangle $R$. It intersects three horizontal and two vertical interior grid lines of $R$. These $5$ intersection points partition $d'$ into $6$ parts. It follows that $d'$ traverses $6$ tiles, hence $d$ traverses $3\cdot 6=18$ tiles.
