Element wise product sum of two arrays
Generally, to prove a greedy algorithm is optimal what you do is come up with a theorem that captures the idea of “moving away from” the greedy strategy and show that that decreases the optimal value. It’s important that you phrase the theorem in a way that can be iteratively applied, as otherwise it might be that the objective function goes down immediately after departing from the greedy algorithm, and then goes back up. In this case, you want


  Theorem: If $a\geq b$ and $c\geq d$ then $ac+ bd\geq ad+bc$


Given any way of pairing numbers, this theorem says that if you swap two numbers so that you move closer to the greedy algorithm then the value cannot go down, and if you swap two numbers so that you move further from the greedy algorithm the value cannot go up. So prove this, and the correctness of the greedy algorithm follows. 

It’s sufficient to consider only vectors of length two because any permutation of the vectors can be generated from exchanging two numbers. Equivalently, $S_n$ is generated by its two-cycles for every $n&gt;1$