show that $x_1^2+x_2^2+\cdots+x_{2020}^2\geqslant x_1x_2+x_2x_3+\cdots+x_{2020}x_1$ how can i use AM-GM inequality to show that $$x_1^2+x_2^2+\cdots+x_{2020}^2\geqslant x_1x_2+x_2x_3+\cdots+x_{2020}x_1 ?$$
Where $x_1,x_2,\ldots,x_n$ 
are any real numbers.
to get an idea I tried to do for particular cases with $n=3,4.$
for $n=3$, I could use AM-GM doing $$x_1^2+x_2^2+x_3^2=\frac{x_1^2+x_2^2}{2}+\frac{x_2^2+x_3^2}{2}+\frac{x_3^2+x_1^2}{2}\geqslant x_1x_2+x_2x_3+x_3x_1.$$
for $n=4$  couldn't with that same idea. 
but it is possible to show 
developing the inequality below $$(x_1-x_2)^2+(x_2-x_3)^2+(x_3-x_4)^2+(x_4-x_1)^2 \geqslant 0.$$
 A: The idea is the same:
$$
x_1x_2 + x_2x_3 + \cdots + x_{2020}x_1 \leq \frac{x_1^2 + x_2^2}{2} + \frac{x_2^2 + x_3^2}{2} + \cdots + \frac{x_{2020}^2 + x_1^2}{2} = x_1^2 + x_2^2 + \cdots + x_{2020}^2
$$
A: Let $x_{n+1}=x_1.$ We have $$\sum_{i=1}^nx_i^2-\sum_{i=1}^nx_ix_{i+1}=$$ $$=\sum_{i=1}^n \frac {1}{2}(x_i^2+x_{i+1}^2)-\sum_{i=1}^nx_ix_{i+1}=$$ $$=\sum_{i=1}^n\frac {1}{2}(x_i^2+x_{i+1}^2-2x_ix_{i+1})=$$ $$=\sum_{i=1}^n\frac {1}{2}(x_i-x_{i+1})^2\ge 0.$$ See " Cauchy-Schwartz inequality " in Wikipedia. In the notation of that article, this Q is a special case with $u=(x_1,...,x_n)\in \Bbb R^n$ and $v=(x_2,...,x_{n+1})\in \Bbb R^n$ with $x_{n+1}=x_1. $
BTW. In $\Bbb R^m,$ with $m\ge 2,$ define the distance from  $A=(a_1,...,a_m)$ to $B=(b_1,...,b_m)$  as $AB=(\sum_{i=1}^m(a_i-b_i)^2)^{1/2}.$ Now take any two vectors $A,B \in \Bbb R^m,$ neither of them equal to the origin $O,$ and neither of them a scalar (real-number) multiple of the other. Then the $2$-dimensional vector subspace generated by $A$ and $B$ is geometrically isomorphic to $\Bbb R^2,$ and $$\sum_{i=1}^ma_ib_i=AO\cdot BO\cdot \cos \angle AOB.$$
