# 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

• $(N,M)$ is a not uncommon notation for the greatest common divisor of $N$ and $M$. – hmakholm left over Monica Aug 9 '17 at 10:17
• @bio What do you mean by "We are not allowed to use a formula in our working out, in which we have to show"? Does that sentence mean that you have to explain any formulas you use in your proof? – Toby Mak Aug 9 '17 at 10:18
• @TobyMak- No, it means that we're not allowed to use formulas e.g. Pythogorean Theorem, Pick's Theorem etc. as 'not everyone knows them, so it gives an unfair advantage to those who don't know them as we haven't studied them at school' (????) So, we can only use logic, operations, algebra (although I only now the basics of it) etc. – bio Aug 9 '17 at 10:22
• @bio Some things, however simply they can be explained, have to use more complex parts of mathematics. Imagine if some concepts, such as calculus, or complex numbers were banned because they were 'too complicated', even as they introduced new ideas that made mathematics a lot more convenient. – Toby Mak Aug 9 '17 at 10:29
• @bio Don't let the school limit what you can write down - as long as the proof can convince you that they used the right steps to the answer, I think that nothing's wrong with it. It's perfectly fine to use the proof you mentioned. – Toby Mak Aug 9 '17 at 10:31

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.
You divide the rectangle $$9\times12$$ into three smaller rectangles $$3\times4$$ as follows:
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.$$