# Is composition of piecewise linear functions again a piecewise linear function?

I have some piecewise linear (not necessarily continuous) functions (also, in case it matters, in my specific case 'a' is larger than 0 in all functions). Is every the composition of those functions again a piecewise linear (not necessarily continuous) function?

If yes, how about the slightly more complicated scenario. The functions are still piecewise, but now the pieces are not ideal linear functions anymore but include a small amount of 'noise': f(x)= a*x+b+randomNoise (randomNoise is different for every call to f(), but always smaller than a). Is the composition of such functions again a piecewise linear function of the form f(x)= a*x+b+randomNoise for all pieces?

-

$$f(x) = \max(0,x) + 0\cdot\mathit{noise}$$ $$g(x) = 0 + 1\cdot\mathit{noise}$$
Then $f(g(x))$ is $0$ plus some one-sided noise, which probably isn't what you were expecting to get.