Answer:
The domain is:
x: (-∞, 0] U (0, ∞)
The range is
y: [0, ∞)
Step-by-step explanation:
These types of functions are known as piecewise functions. It has two pieces of functions, you must graph both pieces for each interval.
First, graph:
y = -x for x from -∞ to x = 0
Note that y = -x is the equation of a negative slope line = -1 that passes through the origin
Second, graph:
y = x for x from x = 0 to ∞
Note that y = x is the equation of a positive slope line = 1 that passes through the origin.
The graph of this function is shown in the attached image. Note that it matches the absolute value graph of x.
y = | x |
In this function y it is always positive, and x can be any real number.
Therefore the domain is:
x: (-∞, 0] U (0,∞)
The range is:
y: [0, ∞)