[This is much in the spirit (but different from) the questions from different posters: How many squares can be formed by using n points? and How many squares can be formed by using n points: revisited?]

Let $A$ be a set of $n$ points in the plane in general position. By general position we mean that no $3$ points are co-linear. What is the maximum number of squares that can be formed with vertices in $A$?

I note that there are trivial upper and lower bounds for this problem:

[**Trivial Upper Bound**] Given $n$ arbitrary points in the plane, noting that any two points determine at most $3$ squares it follows that there are at most $O(n^2)$ squares with vertices in $A$.

[**Trivial Lower Bound**] Place four points at the corner of a square, and repeat taking care to avoid all lines generated by pairs of points already placed in the plane until we've placed $n$ points. This clearly gives a lower bound of $\Omega(n)$.

I can improve the implied constant in both the upper and lower bound by being a bit more clever. The problem, however, is to

Improve (asymptotically) on either the upper or lower bound just given.

1square (either an edge or a diagonal). Since a square has 6 pairs of vertices, this gives a trivial upper bound $n(n-1)/12$. $\endgroup$ – Pietro Majer Jul 27 at 19:28