2. For a finite set of points $M$ in the plane, it has the property: for any two points $A, B$ in $M$, there must exist a third point $C \in M$ such that $\triangle A B C$ is an equilateral triangle. Find the maximum value of $|M|$.
2. Let $A, B \in M$ and $AB$ be the longest, by the given condition there exists $C \in M$, such that $\triangle ABC$ is an equilateral triangle. Clearly, the point set $M$ is entirely within the union of the three segments $CAB$, $ABC$, $BCA$ with $A$, $B$, $C$ as centers and $AB$ as the radius, as shown in the figure.

If there is a 4th point $D \in M$, then there must be a point $D' \in M$, such that $D'$, $A$, $D$ form an equilateral triangle, $\angle DAD' = 60^\circ$, so one of the points must be outside $\triangle ABC$. Therefore, without loss of generality, assume $D$ is within the segment $AC$, and $BD$ intersects the chord $AC$ at $K$. Also, without loss of generality, assume $D'$ is within the segment $BC$. Rotating $\triangle ABD$ by $60^\circ$ around $B$ to coincide with $\triangle CBD'$, then $K$ coincides with a point $K'$ on $BD'$. $\angle BCK' = \angle BAK = 60^\circ > 30^\circ$. Thus, $K'$ is not within the segment $BC$, and $D'$ is not within the segment $BC$, leading to a contradiction. Therefore, $M$ cannot contain a 4th point.
Therefore, $M$ contains exactly three points, which form an equilateral triangle.