consider a $2008 \times 2008$ chess board. let $M$ be the smallest no of rectangles that can be drawn on the chess board so that sides of every cell of the board is contained in the sides of one of the rectangles. find the value of $M$. (eg for $2\times 3$ chessboard, the value of $M$ is 3.)

1. **Initial Setup and Strategy**:
   - We need to cover a $2008 \times 2008$ chessboard with the smallest number of rectangles such that every cell is contained within at least one rectangle.
   - We start by drawing the perimeter of the chessboard as one rectangle.
   - Then, we fill in the remaining cells by covering two rows or columns at a time.

2. **Optimality Argument**:
   - Suppose we have $x$ rectangles that cover the chessboard.
   - Define a rectangle as **covering** a row if one of its horizontal sides is contained in that row. Similarly, define **covering** columns.
   - Each rectangle can cover at most 4 rows/columns (2 rows and 2 columns).

3. **Unique Rows/Columns**:
   - Let $y$ be the number of rows/columns that are covered only once by any rectangle. Call these rows/columns **unique**.
   - **Claim**: For each rectangle, at most two of the rows/columns it covers can be unique.
   - **Proof**: If a rectangle covers three unique rows/columns, it must be the perimeter of the chessboard, which is not possible for internal rows/columns to be unique. Hence, at most two unique rows/columns per rectangle.

4. **Bounding the Number of Rectangles**:
   - From the claim, there are at least $\frac{y}{2}$ rectangles for which a row/column is unique.
   - Each of these rectangles can cover rows/columns not on the perimeter, leading to the inequality:
     \[
     4(x - y) + 2y \ge 4 \cdot 2007 - y
     \]
   - Simplifying, we get:
     \[
     4x - 2y \ge 4 \cdot 2007 - y \implies 4x \ge 4 \cdot 2007 + y \implies x \ge 2007 + \frac{y}{4}
     \]

5. **Improving the Bound**:
   - If $x = 2007$, then $y = 0$, meaning no row/column is unique, which is not possible.
   - Therefore, $x \ge 2008$.
   - To eliminate the case $x = 2008$, we improve the bound on the RHS to $4 \cdot 2007 - y + 4$ because the perimeter must also be covered:
     \[
     4x - 4y + 2y \ge 4 \cdot 2008 - y \implies 4x \ge 4 \cdot 2008 + y \implies x \ge 2008 + \frac{y}{4}
     \]
   - Hence, $x = 2008$ implies $y = 0$, which is not possible.

6. **Conclusion**:
   - Therefore, the smallest number of rectangles $M$ that can cover the $2008 \times 2008$ chessboard is $2009$.

The final answer is $\boxed{2009}$.