Example 9 Let $M=\{1,2,3, \cdots, 40\}$, find the smallest positive integer $n$, such that $M$ can be divided into $n$ pairwise disjoint subsets and for any 3 numbers $a, b, c$ (not necessarily distinct) taken from the same subset, $a \neq b+c$.


Solve for $n=4$, divide $M$ into the following 4 pairwise disjoint subsets: $A=\{1,4,10,13,28,31,37,40\}$, $B=\{2,3,11,12,29,30,38,39\}$, $C=\{14,15,16, \cdots, 25,26,27\}$, $D=\{5,6,7,8,9,32,33,34,35,36\}$. For any 3 numbers $a, b, c$ (not necessarily distinct) taken from the same subset, $a \neq b+c$. Therefore, the smallest positive integer $n \leqslant 4$.

Next, assume that $M$ can be divided into 3 pairwise disjoint subsets $A, B, C$ such that for any 3 numbers $a, b, c$ taken from the same subset, $a \neq b+c$. Without loss of generality, assume $|A| \geqslant|B| \geqslant|C|$, and the elements of $A$ are arranged in ascending order as $a_{1}$, $a_{2}, \cdots, a_{|A|}$. Thus, $a_{1}, a_{2}, \cdots, a_{|A|}$ and $a_{2}-a_{1}, a_{3}-a_{1}, \cdots, a_{|A|}-a_{1}$ are distinct numbers in $M$ (in fact, for any $1 \leqslant i<j \leqslant 3, a_{j}-a_{i}$ is in $M$ but not in $A$. Similarly, for any $1 \leqslant i<j \leqslant 3, b_{i}-b_{j} \notin B$, so the three differences $a_{2}-a_{1}=b_{1}-b_{2}, a_{3}-a_{1}=b_{1}-b_{3}, a_{3}-a_{2}=b_{2}-b_{3} \notin A \cup B$, they are all in $C=M \backslash(A \cup B)$. Let $a=a_{3}-a_{1}, b=a_{3}-a_{2}, c=a_{2}-a_{1}$, then $a=b+c$, a contradiction, so the minimum value of $n \geqslant 4$.
In summary, the minimum value of $n$ is 4.