3. When $n=3$, the conclusion is 3.

When $n>4$, construct a regular $n$-sided polygon and slightly adjust its shape to meet the conditions described in the problem. In this $n$-sided polygon, it can be directly calculated that for any vertex, the lines connecting it to its two adjacent vertices are the closest.
When $n=4$, consider two cases.
(1) The four points form the vertices of a convex quadrilateral.
Let this convex quadrilateral be $A B C D$. From the given conditions, we know that the vertex closest to any side of the quadrilateral is unique. Therefore, the two pairs of opposite sides of quadrilateral $A B C D$ are not parallel. Without loss of generality, assume that ray $D A$ intersects $C B$, and ray $A B$ intersects $D C$. In this case, points $A, B, C$ are marked.

If point $D$ is also marked, then it must be the vertex closest to $A C$. Hence, $S_{\triangle A C D}S_{\triangle A C E}>S_{\triangle A C B}$, which is a contradiction.
(2) Among the four points, one point is inside the triangle formed by the other three points.

Let point $O$ be inside $\triangle A B C$. Clearly, $O$ is the point closest to lines $A B, B C, C A$. Without loss of generality, assume that the point closest to line $A O$ is $B$. If the point closest to line $B O$ is $A$, then point $C$ will not be marked. Now assume that the point closest to line $B O$ is $C$. If the remaining point $A$ is marked, then $A$ is the point closest to line $C O$.

Let line $A O$ intersect $B C$ at point $A_{1}$, and similarly define $B_{1}, C_{1}$.
Then $S_{\triangle A A_{1} B}<S_{\triangle A A_{1} C}$, i.e., $A_{1} B<A_{1} C$.
Similarly, $B_{1} C<B_{1} A, C_{1} A<C_{1} B$.
Multiplying these three inequalities, we get
$$
A_{1} B \cdot B_{1} C \cdot C_{1} A<A_{1} C \cdot B_{1} A \cdot C_{1} B,
$$

which contradicts Ceva's theorem.
Therefore, when $n=4$, the maximum number of marked points is 3.
3. Given $n(n>2)$ points on a plane, satisfying that no three points are collinear. Draw a line through any two points, and mark the point among the remaining points that is closest to this line (it is known that in any case, the point satisfying this condition is unique). Question: For each given $n$, what is the maximum number of points that can be marked?

Will the translated text be used for further mathematical exploration or as part of a problem set? If you need any further assistance or a detailed solution, feel free to let me know!