Plot[Piecewise[{{1+x, -1 < x < 0}, {1 - x, 0 < x < 1}}], {x, -1, 1}]