I am trying to improve my discrete Math skills by doing some proof exercises. But I am struggling to understand how to start proving the following hypothesis:
$$ S = {x}_1{y}_1 + {x}_2{y}_2 + \ldots + {x}_n{y}_n $$ Where ${x}_1,{x}_2\ldots{x}_n$ and ${y}_1,{y}_2\ldots{y}_n $ are ordering of two different sequences of positive real numbers, each containing n elements. S takes its maximum value when ${x}_1,{x}_2\ldots{x}_n$ and ${y}_1,{y}_2\ldots{y}_n $ are sorted in non decreasing order.
I was thinking that I should maybe use a proof by contradiction. Where the negation of the hypothesis is: S takes it minimum value over all ordering of the two sequences when both sequences are sorted into non increasing order.
However I am not sure my negation of the hypothesis is correct or how proceed from there. I do not want the complete proof because I am trying to learn how to do it myself but if some one can tell me how to make a start on this I would be grateful.