Q:

Rescale a function

Lets assume that $A_1$ a function with maximal value $M$ and minimal value $m$ with $M \neq m $
How can i find the transformation that maps this function to $A_2$ with $N$ as new maximal value and $0$ as new minimal value?

A:

First we want to "move" the function "down" by $m$, so we take $A_1-m$. Now the maximal value is $M-m$, and we want to make it $N$ so we multiply by $\frac{N}{M-m}$, and so: $$A_2 = \frac{N(A_1-m)}{M-m}$$
Note that $M-m>0$ because $M>m$. The minimal value is when $A_1$ attains its minimal value which is $m$, so we have $N(m-m)=0$ in the nominator and so the minimal value is $0$, and similarly one shows that the maximal value is $N$.

