I am currently studying Stone–Weierstrass approximation theorem, and some parts really confuse me. basically, the Weierstrass approximation theorem states that every continuous function defined on an interval [a,b] can be uniformly approximated as closely as desired by a polynomial function. In the proof, at first they say on [a,b]=[0,1] f(0)=f(1)=0. Why do they want to say that at the end points function must be zero? second, if the theorem is proved for this case, consider g(x)= f(x)- f(0) - x[f(1)-f(0)] (0<= x <= 1) Here g(0)=g(1)=0 Can anyone explain the meaning and purpose of these transformation? My guess is that they want to define function f and then find a g(x) which looks like polynomials. Is that right? and also, is there any relationship between these transformation and uniformly convergence?