Apologies in advance, I really cannot think of an intelligent or easy way to explain this.
You start out with a rectangle. Then you draw a straight line out of a right angled corner at 45 degrees until you hit a side of the rectangle at which point you reflect the line at 90 degrees and continue the line. Repeat this process until the line goes into a second corner.
Sorry if that image is hard to imagine.
If you add the length and width of the rectangle (providing they are both integers and have no common factors) that is the number of points of contact the lines have with the outline of the rectangle: (the walls and the 2 corners)
If the lengths aren't integers then you have to make then integers before you add them eg. 0.2cm and 0.3cm = 2cm and 3cm. Or if they have factors then factorise them eg. 6cm and 4cm = 3cm and 2cm
QUESTION If anyone understands all of that, can anyone explain if and why that is true for every rectangle? Is it just a coincidence or is there maths behind it that I can't find? And can it work if one of the lengths was an irrational number like pi?