Sum of two absolute values

Consider the graph of y=x+1+x1y = |x + 1| + |x - 1|, the sum of the distances from a point xx on the number line to 1-1 and to 11.

For 1x1-1 \le x \le 1 it is constant, (x+1)+(1x)=2(x + 1) + (1 - x) = 2, so the graph is flat. For x>1x > 1 it is 2x2x, and for x<1x < -1 it is 2x-2x, rising with slope ±2\pm 2. The corners are at (1,2)(-1, 2) and (1,2)(1, 2), and the flat bottom is the minimum value 22. The large dots mark the corners and the middle point (0,2)(0, 2).