The following figure consists of 7 horizontal lines and 13 v
     The following figure consists of 7 horizontal lines and 13 vertical lines. The goal of this problem is to count the number of rectangles (squares are a kind of rectangle, but line segments are not). Let V be the set of ail sets of two vertical lines, and let H be the set of ail sets of two horizontal lines. Let R be the set of ail rectangles in the figure. Define a function f: R rightarrow V x h by  Explain why f is well defined.  The function f is well defined because every rectangle has exactly  vertical lines and  horizontal lines.  
  
  Solution
The function is well defined because a rectangle has exactly 2 vertical lines and 2 horizontal lines.

