Prove if parallelogram law worked in a quadrilateral that shape is parallelogram Image with my solution
We have a quadrilateral ABCD. And we know: $$a^2+b^2+c^2+d^2=p^2+q^2$$ Prove this shape is parallelogram.
I write law of cosines between sides and diameters. Then I write sum of them and with the formula that the question give to us, We have this:
$$ab.cos\hat B+bc.cos\hat C+cd.cos\hat D+da.cos\hat A=0$$
And I don't know what should I do.

Let $K$, $L$, $M$, $N$, $P$ and $Q$ be a midpoints of $AB,$ $BC,$ $CD,$ $DA$, $AC$ and $BD$ respectively.
Thus, since  $PLQN,$ $PKQM$  and $KLMN$ are parallelograms, by your work we obtain:
$$PL^2+LQ^2+QN^2+NP^2=PQ^2+LN^2$$ or
$$AB^2+CD^2=2PQ^2+2LN^2.$$
Also, $$KP^2+PM^2+MQ^2+QK^2=PQ^2+KM^2$$ or
$$BC^2+AD^2=2PQ^2+2KM^2.$$
Id est, $$AB^2+CD^2+BC^2+AD^2=$$
$$=4PQ^2+2(LN^2+KM^2)=4PQ^2+2(KL^2+LM^2+MN^2+NK^2)=$$
$$=4PQ^2+AC^2+BD^2$$ and since
$$AB^2+CD^2+BC^2+AD^2=AC^2+BD^2,$$ we obtain $$PQ=0,$$ $$P\equiv Q$$ and $ABCD$ is a parallelogram.
