Converse of the British Flag Theorem Exist a theorem known as British Flag Theorem. It say that in a rectangle $ABCD$ we have $PA^2 - PB^2 + PC^2 - PD^2 = 0$, for any point $P$ in the plane.
I was thinking in a type of converse of this theorem. Given a polygon with vertices $A_1,A_2,\ldots,A_n$, consider the function
$$f(P) = \sum_{i=1}^{n} (-1)^{i} {PA_i}^2, $$
where $P$ is a point in the plane. So I conjectured that

If a polygon with vertices $A_1,A_2,\ldots,A_n$ is such that $f(P) = 0$, for all point $P$ in the plane, then this polygon is a rectangle.

I can to prove easily that if $n = 4$, then this is true. Somebody know this problem? This conjecture is true? If this question is easy, but requires a expert argument, can to give me a hint of how to solve this?
 A: I think you can use linear algebra to get a necessary and sufficient condition for your $f$ to be zero.
Write points in the plane as vectors. Then the hypothesis is that $A_1, \ldots, A_n$ are such that
$$\sum_{i=1}^n (-1)^i ||P-A_i||^2 = 0$$ for all $P$. You can expand this into
$$\sum_{i=1}^n (-1)^i\langle P-A_i, P-A_i \rangle = 0$$
or
$$(\sum_{i=1}^n (-1)^i)||P||^2 + \sum_{i=1}^n (-1)^i ||A_i||^2 -2\langle P , \sum_{i=1}^n (-1)^i A_i \rangle = 0.$$
If this is true for $P$, it must also be true for $kP$ for any scalar $k$. So for a fixed $P$ you have a polynomial of degree $2$ in $k$, which must vanish identically. It follows that a necessary and sufficient condition to have $f(P)$ identically zero is


*

*$n$ is even.

*$\sum_{i=1}^n(-1)^i ||A_i||^2 =0.$

*$\sum_{i=1}^n (-1)^i A_i = 0.$


You can find many polygons satisfying these. For example, let all the $A_i$ have equal length and let $n$ be even. Then you just need $A_1-A_2 + \cdots - A_{n-1} + A_n =0$.
A: Consider the points 
$A_1 = (a,b), A_2 = (a,d) A_3 = (w,x), A_4 = (y,x), A_5 = (c,d), A_6 = (c,b), A_7 = (y,z), A_8 = (w,z) $
This satisfies your conditions, since the vertices are the union of vertices of 2 rectangles.
Proof:

 We know that $PA_1^2 - PA_2^2 + PA_5^2 - PA_6^2 = 0$ and $PA_3^2 - PA_4^2 + PA_7^2 - PA_8^2 = 0$. Add up both equations.

It is clearly not a rectangle. Note that this polygon can be self-intersecting. 
You can easily set conditions on $a, b, c, d, w, x, y, z$ to find a convex polygon. A simple example would be the regular octagon.
