# How do you find the inverse of f(x) = |x-2|?

Mar 30, 2017

Using the definition of the absolute value function:

|a| = {(a; a >=0), (-a; a < 0):}

The given function:

$f \left(x\right) = | x - 2 |$

Becomes the piece-wise continuous function:

f(x) = {(x - 2; x >=2), (-(x-2); x < 2):}

The formal way to find an inverse of a function is:

Substitute ${f}^{-} 1 \left(x\right)$ for x into $f \left(x\right)$:

f(f^-1(x)) = {(f^-1(x) - 2; x >=2), (-(f^-1(x)-2); x < 2):}

Invoke the property $f \left({f}^{-} 1 \left(x\right)\right)$

x = {(f^-1(x) - 2; f^-1(x) >=2), (-(f^-1(x)-2); f^-1(x) < 2):}

And then solve for ${f}^{-} 1 \left(x\right)$

But we cannot do this, because this will give us two equations for ${f}^{-} 1 \left(x\right)$ which indicates that it is not a function.

Therefore, this function does not have an inverse.