Given two ascending distinct integer sets, $A = A(0), A(1), \dots, A(n)$, and $B = B(0), B(1), \dots, B(n)$, I'm looking for the maximum sum, where elements from $B$ are multiplied by elements from $A$, for example:
$$\begin{align} \max \{ & A(0)B(0) + A(1)B(1) + \dots, \\ & A(0) B(1) + A(1) B(0) + \dots, \\ & \dots \} \end{align}$$
My instinct says that the maximum sum will always be the largest elements from $B$ multiplied by the largest elements from $A$. That is,
$$\max = A(n)B(n) + A(n-1)B(n-1) + \dots$$
Is this correct and can it be shown/proven?