# Substituting elements of lists into an expression

Suppose I have the following lists,

as = {1, 2, 3, 4};
bs = {10, 20, 30, 40};

and the following expression:

a1*(b1 - a1) + a2*(b2 - a2) + a3*(b3 - a3) + a4*(b4 - a4)

I want to substitute the elements of my lists into my expression such that a1 -> 1, a2 -> 2, and so on and b1 -> 10 and b2 -> 20 and so on. I wonder how to do this efficiently?

$$a_1 \left(b_1-a_1\right)+a_2 \left(b_2-a_2\right)+a_3 \left(b_3-a_3\right)+a_4 \left(b_4-a_4\right)$$