Intersection of an absolute-value graph and a line

The absolute-value graph y=xy = |x| is a V-shape with a corner at the origin. It joins two half-lines: y=xy = x for x0x \geq 0 and y=xy = -x for x<0x < 0. We find where this y=xy = |x| meets the line y=2y = 2.

At an intersection x=2|x| = 2. Two numbers have absolute value 22, namely 22 and 2-2, so x=2,2x = 2, -2. Both give y=2y = 2, so the intersection points are (2,2)(2, 2) and (2,2)(-2, 2).

The standard way to remove an absolute value is by cases. For x0x \geq 0, x=x|x| = x, so x=2x = 2; for x<0x < 0, x=x|x| = -x, so x=2-x = 2, that is x=2x = -2. Each fits the condition of its own range, so both are valid.

Sliding the line up and down changes the number of intersections. For y=xy = |x| and a horizontal line y=ky = k: k>0k > 0 gives 2 points, k=0k = 0 gives the single point at the origin, and k<0k < 0 gives none. The large dots on the graph are the intersection points (2,2)(2, 2) and (2,2)(-2, 2).