# Transformation from [a,b] to [-h,h]

I am looking for a transformation (and the inverse of that transformation) that takes $[a,b]$ into $[-h,h]$ (where $a$, $b$, $h$ are given and are different real numbers).

I tried doing this and got: $T(x)= 2h(x-a)/(b-a)$

I am looking for a transformation (and the inverse of that transformation) that takes $[a,b]$ into $[-h,h]$ (where $a$, $b$, $h$ are given and are different real numbers).I tried doing this and got: $T(x)= 2h(x-a)/(b-a) - h$.

It holds that $T(a)=0-h=-h$, $T(b)=2h-h=h$. I tried finding $T^{-1}$ and got $T^{-1}(x)=[(b-a)/2h][h+x+2ha/(b-a)]$.

But when I composed I didn't get the Id function.

What is the transformation to doing this ? (I think I got only $T^{-1}$ wrong, but I'm not sure).

**I was unsure about the tags - I tagged as linear algebra though the transformation is also have a translation in it, if anyone have a better idea for a tag tell me so I can change it.

-
$T(a) = 0$, $T(b) = 2h$ - close, but no cigar. There is an infinite number of transformations satisfying your condition. – Alexei Averchenko Mar 25 '12 at 12:54
You could just take $y={2h(x-a)\over b-a }-h$ and solve for $x$ in terms of $y$. This would give you the formula for the inverse. – David Mitra Mar 25 '12 at 12:57

$T^{-1}(x) = (x+h)(b-a)/2h + a$.
Let $[a,b]$ be any nontrivial interval. The function $T_{[a,b]}:\mathbb{R}\to\mathbb{R}$ given by $T_{[a,b]}(x)=(x-a)/(b-a)$ maps $[a,b]$ onto $[0,1]$ and its inverse maps $[0,1]$ onto $[a,b]$. So $T_{[-h,h]}^{-1}\circ T_{[a,b]}$ would give you the needed function.