# How do you find the compositions given f(x) = |x - 2|, g(x) = sqrtx?

Jul 5, 2018

$f \left(g \left(x\right)\right) = f \left(\sqrt{x}\right) = | \sqrt{x} - 2 |$ and $g \left(f \left(x\right)\right) = g \left(| x - 2 |\right) = \sqrt{| x - 2 |}$

#### Explanation:

Every function has an input and an output. Composing two functions means to use the output of the first as the input for the second.

So, $f \left(x\right)$ takes an input $x$ and outputs the absolute value of the input minus two.
$g \left(x\right)$ takes an input $x$ and ouputs the square root of the input.

So, $f \left(g \left(x\right)\right) = f \left(\sqrt{x}\right) = | \sqrt{x} - 2 |$ and $g \left(f \left(x\right)\right) = g \left(| x - 2 |\right) = \sqrt{| x - 2 |}$