[Example 2.2.3] In a $7 \times 7$ grid, select $k$ small squares such that the centers of any 4 points do not form the vertices of a rectangle.
Find the maximum value of $k$ that satisfies the above requirement.
A $7 \times 7$ grid is a specific grid, but our thinking does not have to be limited to the specific number $7 \times 7$. Instead, we can consider a general case, i.e., an $n \times n$ grid.

Suppose we have already chosen $k$ small squares, and the centers of any 4 points are not the vertices of a rectangle.
We study these $k$ points.
Let the $k$ squares have $x_{1}$ points in the 1st column, $x_{2}$ points in the 2nd column, $\cdots$, $x_{n}$ points in the $n$-th column, where $x_{1}, x_{2}, \cdots, x_{n}$ are non-negative integers, then we have
$$
x_{1}+x_{2}+\cdots+x_{n}=k \text {. }
$$

We number the centers of the squares in each column from bottom to top as $1,2, \cdots, n$.
The $x_{i}$ points in the $i$-th column can form $C_{x_{i}}^{2}$ different pairs $(p, q)$ (where $p < q$). The total number of such pairs is
$$
\sum_{i=1}^{n} C_{x_{i}}^{2} = \sum_{i=1}^{n} \frac{x_{i}(x_{i}-1)}{2} = \frac{1}{2} \sum_{i=1}^{n} x_{i}^2 - \frac{1}{2} \sum_{i=1}^{n} x_{i} = \frac{1}{2} \sum_{i=1}^{n} x_{i}^2 - \frac{k}{2}.
$$

Since the centers of any 4 points are not the vertices of a rectangle, the number of such pairs must be less than or equal to the number of pairs of points in the grid, which is
$$
C_{n}^{2} = \frac{n(n-1)}{2}.
$$

Thus, we have
$$
\frac{1}{2} \sum_{i=1}^{n} x_{i}^2 - \frac{k}{2} \leq \frac{n(n-1)}{2},
$$
which simplifies to
$$
\sum_{i=1}^{n} x_{i}^2 \leq k + n(n-1).
$$

Using the Cauchy-Schwarz inequality, we get
$$
\left( \sum_{i=1}^{n} x_{i}^2 \right) \left( \sum_{i=1}^{n} 1 \right) \geq \left( \sum_{i=1}^{n} x_{i} \right)^2,
$$
which simplifies to
$$
\sum_{i=1}^{n} x_{i}^2 \geq \frac{k^2}{n}.
$$

Combining the two inequalities, we have
$$
\frac{k^2}{n} \leq k + n(n-1),
$$
which simplifies to
$$
k^2 - nk - n^2(n-1) \leq 0.
$$

Solving this quadratic inequality, we get
$$
k \leq \frac{n + \sqrt{n^2 + 4n^2(n-1)}}{2},
$$
which simplifies to
$$
k \leq \frac{n + n\sqrt{4n-3}}{2}.
$$

Thus, we have obtained the upper bound for $k$ in an $n \times n$ grid.
For a $7 \times 7$ grid, substituting $n=7$ into equation (3), we get
$$
k \leq \frac{7 + 7 \times 5}{2} = 21.
$$

Is the maximum value of $k$ 21?
Since our calculations actually provide an estimate of the upper bound for $k$, this estimate indicates that when $n=7$, the value of $k$ will not exceed 21.

To determine if the maximum value of $k$ is 21, we need to construct 21 points in a $7 \times 7$ grid such that no 4 points form the vertices of a rectangle.

An ideal construction would be to have 3 squares selected in each row and each column. The 21 squares in the figure meet the requirements of the problem.

Therefore, for a $7 \times 7$ grid, the maximum value of $k$ that satisfies the problem's requirements is 21.

When solving this problem, we did not confine ourselves to the $7 \times 7$ grid but focused on the $n \times n$ grid to find the upper bound for $k$.