Example 3 Suppose there are $2 n(n \geqslant 2)$ points in space, where no four points are coplanar. Connect $N$ line segments arbitrarily between them, and these line segments must form at least one triangle. Find the minimum value of $N$.


Solve: Divide $2 n$ known points into two groups $A$ and $B$:
$$A=\left\{A_{1}, A_{2}, \cdots, A_{n}\right\}, B=\left\{B_{1}, B_{2}, \cdots, B_{n}\right\}$$

Now connect each pair of points $A_{i}$ and $B_{i}$ with a line segment $A_{i} B_{i}$, while no lines are drawn between any two points within the same group. Thus, there are $n^{2}$ line segments in total. At this point, any 3 points among the $2 n$ known points will have at least two points belonging to the same group, and these two points are not connected. Therefore, these $n^{2}$ line segments cannot form any triangles. This indicates that the minimum value of $N$ must be greater than $n^{2}$. Since there are $n^{2}+1$ line segments between the $2 n$ points, on average, each point has more than $n$ line segments extending from it, so it can be conjectured that the sum of the line segments extending from the two endpoints of a certain line segment is not less than $2 n+1$. Below, we prove that the minimum value of $N$ is $2 n+1$.

Let the number of line segments extending from $A_{1}, A_{2}, \cdots, A_{2 n}$ be $a_{1}, a_{2}, \cdots, a_{2 n}$, and for any line segment $A_{i} A_{j}$, we have $a_{i}+a_{j} \leqslant 2 n$. Therefore, the sum of the number of line segments extending from the endpoints of all line segments does not exceed $2 n\left(n^{2}+1\right)$. However, in this count, point $A_{i}$ is counted exactly $a_{i}$ times, so we have
$$\sum_{i=1}^{2 n} a_{i}^{2} \leqslant 2 n\left(n^{2}+1\right)$$

On the other hand, it is clear that $\quad \sum_{i=1}^{2 n} a_{i}=2\left(n^{2}+1\right)$,
thus by the Cauchy-Schwarz inequality, we get

i.e., $\square$
$$\begin{array}{c}
\left(\sum_{i=1}^{2 n} a_{i}\right)^{2} \leqslant 2 n\left(\sum_{i=1}^{2 n} a_{i}^{2}\right) \\
\sum_{i=1}^{2 n} a_{i}^{2} \geqslant \frac{1}{2 n} \cdot 4\left(n^{2}+1\right)^{2}>2 n\left(n^{2}+1\right)
\end{array}$$

Thus, a contradiction arises, proving that there must be a line segment for which the sum of the number of line segments extending from its endpoints is not less than $2 n+1$. Without loss of generality, let $A_{1} A_{2}$ be such a line segment, and there exists $A_{k}(k \geqslant 3)$ such that the line segments $A_{1} A_{k}, A_{2} A_{k}$ both exist, thus $\triangle A_{1} A_{2} A_{k}$ is the desired triangle.