5. A rectangle $\mathrm{ABCD}$ is given. $\mathrm{On}$ the side $\mathrm{AB}, n$ different points are chosen strictly between A and B. Similarly, $m$ different points are chosen on the side AD between A and D. Lines are drawn from the points parallel to the sides. How many rectangles are formed in this way?
(An example of a particular rectangle $\mathrm{ABCD}$ is shown with a shaded one rectangle that may be formed in this way).
Soln.
Note that a rectangle is uniquely determined by a pair of horizontal lines and a pair of vertical lines.
[1 mk]

Since there are $m+2$ horizontal lines and $n+2$ vertical lines (counting the sides),
$$
[1 \mathrm{mk}]
$$
the number of rectangles is
$$
\begin{aligned}
& (\mathrm{m}+2 \text { choose } 2)(\mathrm{n}+2 \text { choose } 2) \quad[1 \mathrm{mk}] \\
= & \frac{(m+2)(m+1)(n+2)(n+1) .}{4}
\end{aligned}
$$