f(x) = |x – 1|
We know,

Hence,
f(x) is defined for all real numbers x.
Thus,
Domain of f = R
When x < 1, we have
x – 1 < 0 or 1 – x > 0.
Hence,
|x – 1| > 0
⇒ f(x) > 0
When x ≥ 1, we have
x – 1 ≥ 0.
Hence,
|x – 1| ≥ 0
⇒ f(x) ≥ 0
∴ f(x) ≥ 0 or f(x) ∈ [0, ∞)
Thus,
Range of f = [0, ∞)