Four. (50 points) On a plane, there are $n$ points, no three of which are collinear. Each pair of points is connected by a line segment, and each line segment is colored either red or blue. A triangle with all three sides of the same color is called a "monochromatic triangle." Let the number of monochromatic triangles be $S$.
(1) If $n=6$, for all possible colorings, find the minimum value of $S$;
(2) If $n=2 k$ (integer $k \geqslant 4$), for all possible colorings, find the minimum value of $S$.
For $n=2 k(k \geqslant 3)$, we uniformly prove: the minimum value of $S$ is $\frac{k(k-1)(k-2)}{3}$.

Since there are $\mathrm{C}_{2 k}^{3}$ triangles, the number of non-monochromatic triangles is $\mathrm{C}_{2 k}^{3}-S$.

We call an angle with two adjacent sides (sharing a common point) of the same color a monochromatic angle.
Next, we calculate the number of monochromatic angles.
On one hand, the number of monochromatic angles is
$$
3 S+\left(\mathrm{C}_{2 k}^{3}-S\right)=2 S+\mathrm{C}_{2 k}^{3} \text {. }
$$

On the other hand, for each point $A$, among the $2 k-1$ edges extending from $A$, if there are $i$ edges of one color, then there are $2 k-1-i(i=0,1, \cdots, k-1)$ edges of the other color. Thus, the number of monochromatic angles with $A$ as the vertex is
$$
\begin{array}{l}
\mathrm{C}_{i}^{2}+\mathrm{C}_{2 k-1-i}^{2} \\
=i^{2}-(2 k-1) i+2 k^{2}-3 k+1,
\end{array}
$$

where, when $i=0,1$, $\mathrm{C}_{i}^{2}=0$.
Let $f(x)$
$$
=x^{2}-(2 k-1) x+2 k^{2}-3 k+1(x>0) \text {. }
$$

Thus, when $x \in\left(0, \frac{2 k-1}{2}\right)$, $f(x)$ is strictly decreasing.
Then the number of monochromatic angles with $A$ as the vertex is at least
$$
\begin{array}{l}
f(k-1)=(k-1)^{2} . \\
\text { Hence } 2 S+\mathrm{C}_{2 k}^{3} \geqslant 2 k(k-1)^{2} \\
\Rightarrow S \geqslant \frac{1}{2}\left(2 k(k-1)^{2}-\mathrm{C}_{2 k}^{3}\right) \\
\quad=\frac{k(k-1)(k-2)}{3} .
\end{array}
$$

The following example shows that $\frac{k(k-1)(k-2)}{3}$ is the minimum value of $S$.
Let the $2 k$ points be
$$
A_{1}, A_{2}, \cdots, A_{k}, B_{1}, B_{2}, \cdots, B_{k} \text {. }
$$

Color the lines between $A_{1}, A_{2}, \cdots, A_{k}$ red, and the lines between $B_{1}, B_{2}, \cdots, B_{k}$ red. For all $i, j \in\{1,2, \cdots, k\}$, color the lines between $A_{i}$ and $B_{j}$ blue. Then there are no blue triangles, and the triangles formed by any three points among $A_{1}, A_{2}, \cdots, A_{k}$ are all red, and the triangles formed by any three points among $B_{1}, B_{2}, \cdots, B_{k}$ are all red.
Therefore, the number of monochromatic triangles is
$$
2 \mathrm{C}_{k}^{3}=\frac{k(k-1)(k-2)}{3} .
$$