3. In the plane, points $A_{1}, A_{2}, \ldots, A_{n}$ are given such that no three of them are collinear. Let $p_{i j}$ be the line defined by points $A_{i}$ and $A_{j}$. Determine the maximum number of intersection points of the lines $p_{i j}$ and $p_{k l}$, where $i, j, k, l$ are distinct elements of the set $\{1,2, \ldots, n\}$.
Solution. Let's determine the number of intersection points that are different from the points $A_{1}, A_{2}$, $\ldots, A_{n}$. Each 4-combination $\left\{A_{i}, A_{j}, A_{k}, A_{i}\right\}$ of elements from the set $\left\{A_{1}, A_{2}, \ldots, A_{n}\right\}$ defines at most three new intersection points (see the diagram on the right). Since the number of 4-combinations of elements from this set is $\binom{n}{4}$, we get that the number of intersection points that are different from the points $A_{1}, A_{2}, \ldots, A_{n}$ is at most $3\binom{n}{4}$.

![](https://cdn.mathpix.com/cropped/2024_06_05_45d0daa1fd152b0afea5g-8.jpg?height=339&width=418&top_left_y=720&top_left_x=1048)