Hello, reader! If you intend to post a link to this blog on Twitter, be aware that for utterly mysterious reasons, Twitter thinks this blog is spam, and will prevent you from linking to it. Here's a workaround: change the .com in the address to .ca. I call it the "Maple Leaf Loophole." And thanks for sharing!

Friday, August 12, 2011

Good Problems: Follow That Diagonal

This is a sweet little problem because it is simple to state and understand. It seems like anybody should be able to make progress investigating it, but it won't be obvious to your smartypants kids.

Draw a 9 by 3 rectangle on a square grid. Draw one diagonal. How many squares does the diagonal pass through? Draw some non-similar rectangles with one diagonal. How many squares does the diagonal pass through? Develop a rule to determine the number of squares a diagonal passes through for any rectangle of any size. 

I think I'm going to keep it in my back pocket for a day when I need to kill half a period. It might be nice for the first day of school if you like that sort of thing. I don't think I've seen it before. It was sent to me by Øistein Gjøvik - he has a post about it that includes access to a Geogebra file. (One benefit of blogging I would have never predicted: a cool Norwegian sends awesome math problems to my inbox.)

I have been on a bit of a Sketchpad bender since we used it at PCMI, so here's a sketch I made.

I am torn about giving guidance about posting solutions in the comments. I have one way to think about it that works, but I'm sure there are more and I really want to hear them. On the other hand, I don't want to spoil anyone's fun. So maybe if you want to work on it, resist looking at comments?

Another thing I'd like to hear about is, do you see this fitting into a curriculum? Or is it just a nice problem that doesn't have a home in a unit of study?


  1. You could potentially teach a lot of concepts via this problem. For example, how many squares are there inside that box for the diagonal line to pass through?

  2. Hm, David's comment makes me think probability. For example, what's the probability that a random line through the rectangle will pass through x boxes. Haven't thought through it yet though... (On a totally unrelated note: though is in both thought and through, but they mean all different things!)

  3. No substitute for gathering data and a good hunch. Take a look at and you'll notice the first table is the number of intersected squares in rectangles of various sizes. The second table is the values of the first divided by the number in the left header column, which is one of the side lengths. Read them across, as four separate sequences, and you'll notice each has a "period" of that side length. I predict the fifth series with be 1, 1, 1, 1 3/5, 1, 2, 2, 2, 2 3/5, 2 ... (I see the 1/2 in series 4 as 2/4) but like I said that's no substitute for actually gathering the data.

  4. (thoughts on a solution)

    My first thought was that from left to right, the diagonal passes through nine squares - of course, it's the side length!

    And from base to top, the diagonal passes through three squares (the length of the other side).

    The line moves into a new square every 1/9 of the way through (left to right), or every 1/3 of the way through (base to top). But sometimes that happens at the same time - like after three squares - because three is a factor of both nine and three.

    (now here's my answer, look away if you want)

    Side A + Side B - hcf(A,B)

    i.e. 9 + 3 - 3 = 9.

  5. Hello from Spain, here's my feeling about this problem: I think the first nice question may be whether the diagonal happens to pass through any square vertex besides the ones from the original rectangle or not. Then some clever student may have the insight about the gcd (I think that's the way you call it, greatest common denominator).

  6. There is an similar problem in Mathematical Circles (Russian Experience), Page 2 Problem 7:

    How many boxes are crossed by a diagonal in a rectangular table formed by 199x991 small squares?

    Oh...and too bad about your sketchpad bender :)

  7. Ooh, this problem statement definitely needs an additional part with larger numbers. Thanks, Steve!

  8. Hi Kate,
    Just wanted to say that I subscribed to your blog today. I look forward to reading it.
    Craig Daniels (Notre Dame Math Circle Training)

  9. Nice approach Alex. I come at it sort of a different way, though the answer seems to be the same.

    First, we reduce to a simpler case: A and B are relatively prime. If gcf(A,B)=G!=1 then just divide A and B by G. The result will be like passing through G rectangles of side A/G and B/G, so we can take the answer and multiply by G.

    So in the simple case you're guaranteed never to pass through a grid point in the middle of the rectangle. You have to cross (A-1) vertical lines and (B-1) horizontal lines to get from one corner to the other. Counting the square you start out in, that's A+B-1 squares if A and B are relatively prime.

  10. This is an ideal problem for my first day/week of school. I am teaching both the highest and lowest 8th graders this year (geometry and pre-algebra ). This is really ideal problem for me as I can use it in both classes and generate student work to have students talk about which came from either class.

  11. Nice simpler version of a problem I've enjoyed using in workshops with mostly middle school teachers. Here is the link to my lesson which I called Billiards Paths. (It's a bit dated, but the links still work.)

    This connects with the applet used in the NCTM's Illuminations site called Paper Pool.

  12. I tried this as a first day activity with my precalcs. We had shortened periods, so the timing was perfect.It was too good to pass up. They worked in groups of 3 or 4. While no group found the solution- the work was terrific. I'll revisit later in the week-and we'll share what they found in the whole class.Several made key connections, but couldn't quite tie everything together.

  13. Ooh, Trish, I'd like to hear more. I may not be very good at hearing them talk when I have 10 groups in my room, so I'm not sure, but I don't think any of my groups got very far on this.

  14. Sue
    It worked about as well as people here predicted. Many groups said exactly as Alex did that it was the side length- I then asked if that held for a 5X7 or 4X6. I did modify the original problem to include as Steve suggested an additional part with large numbers. Unfortunately I picked the wrong numbers- it reduced to a 2X3 rectangle and one group just scaled up.( correctly) So I modified the numbers to something not as nice.

    A few Groups tried all relatively prime rectangles- they made the connection of one less than the sum of length and width.
    Others made the connection JJ mentioned- they looked at how many "corners" the diagonal passed through. I even heard one group mention the GCF- they just couldn't- or didn't have time to put everything together.
    It was nice though- I put them in groups on the first day with people they may not have known and there was alot of real discussion.- only one group with virtually no interaction and I can work with them. Thanks Kate for sharing this.


Hi! I will have to approve this before it shows up. Cuz yo those spammers are crafty like ice is cold.