# Reducing the proof of Stone-Weierstrass theorem to $[0,1]$

Theorem (Stone-Weierstrass). If $f$ is a continuous complex function on $[a,b]$, there exists a sequence of polynomials $P_n$ such that $$\lim \limits_{n\to \infty }P_n(x)=f(x)$$ uniformly on $[a,b]$. If $f$ is real, then $P_n$ may be taken real.

Rudin wrote that "we may assume, without loss of generality, that $[a,b]=[0,1]$". If we found a sequence of polynomials $\{P_n\}_{n=1}^{\infty}$ which converges uniformly to $f(x)$ on $[0,1]$. How to extend it to $[a,b]$?

Can anyone explain it to me please?

Let $F: [0,1] \to [a,b]$ be a linear bijective map. Then both $F, F^{-1}$ are continuous. For all $f\in C[a,b]$, $f\circ F^{-1}$ is a continuous function on $[0,1]$ and so there is $P_n$ so that $P_n$ converges uniformly to $f\circ F^{-1}$ on $[0,1]$. Then $P_n \circ F$ converges uniformly to $f$ on $[a,b]$. Note that $P_n\circ F$ is also a polynomial as $F$ is linear.