9. Find the smallest positive integer $n$, such that when the positive integer $k \geqslant n$, in the set $M=$ $\{1,2, \cdots, k\}$ of the first $k$ positive integers, for any $x \in M$, there always exists another number $y \in M(y \neq x)$, such that $x+y$ is a perfect square.
II. 9. It is easy to see that when $n \leqslant 6$, in $M=\{1,2, \cdots, 6\}$, the number 2 added to any other number is never a square number.
We now prove that the minimum value of $n$ is 7.
If positive integers $x, y (x \neq y)$ satisfy $x+y$ being a square number, then $\{x, y\}$ is called a "square pair".

Obviously, in $M=\{1,2, \cdots, 7\}$, $\{1,3\}, \{2,7\}, \{3,6\}, \{4,5\}$ are square pairs; in $M=\{1,2, \cdots, 8\}$, the square pair $\{1,8\}$ is added; in $M=\{1,2, \cdots, 9\}$, the square pair $\{7,9\}$ is added.
Induction.
We say that $k$ satisfying the condition in the problem has property $P$, denoted as $k \in P$.
From the above, we know that when $7 \leqslant k \leqslant 3^{2}$, all have $k \in P$.
Assume that it has been proven that when $7 \leqslant k \leqslant m^{2} (m \geqslant 3)$, all have $k \in P$.
Next, consider the case $7 \leqslant k \leqslant(m+1)^{2}$.
Using the induction hypothesis, it is only necessary to prove: when $k=m^{2}+r$ $(1 \leqslant r \leqslant 2 m+1)$, all have $k \in P$.

First, when $r=2 m+1$, i.e., $k=(m+1)^{2}$, $(k, 2 m+3)$ forms a square pair, because
$$
k+(2 m+3)=(m+1)^{2}+(2 m+3)=(m+2)^{2} \text {. }
$$

And by $m^{2}-(2 m+3)=(m-1)^{2}-4 \geqslant 0$, we know $2 m+3 \leqslant m^{2}$, i.e., $2 m+3 \neq k$.
When $1 \leqslant r \leqslant 2 m$, $(k, 2 m+1-r)$ forms a square pair, because
$$
\begin{array}{l}
k+(2 m+1-r)=\left(m^{2}+r\right)+(2 m+1-r) \\
=(m+1)^{2} .
\end{array}
$$

And $1 \leqslant 2 m+1-r \leqslant 2 m<m^{2}$, thus,
$$
2 m+1-r \neq k \text {. }
$$

Therefore, for each $k$ satisfying $7 \leqslant k \leqslant(m+1)^{2}$, all have $k \in P$.

Thus, for all positive integers $k$ satisfying $7 \leqslant k \leqslant m^{2} (m \geqslant 3)$, all have $k \in P$, i.e., for all positive integers $k \geqslant 7$, all have $k \in P$.
Therefore, the minimum value of $n$ is 7.