$\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})\ge n^2$ is what I want to prove, where $a_i>0$ and I need to showwhen equality holds. I have tried using Cauchy-Schwarz, where inside the sums I multiply each value by 1 to do it but it doesn't work out. I have also done
$\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})=\sum_{i=1}^n \sum_{i=1}^n(\frac{a_i}{a_i})=\sum_{i=1}^n\sum_{i=1}^n(1)=\sum_{i=1}^n(n)=n^2$, but this proves an equality.
Am I not allowed to do the first step I did in my work?