# Find $$gof$$ and $$fog$$, if $$f(x) = |\;x\;| \, and \, g(x) = |\;5x-2\;|$$

Note: This is part 1st of a 2 part question, split as 2 separate questions here.

Toolbox:
• Given two functions $f:A \to B$ and $g:B \to C$, then composition of $f$ and $g$, $gof:A \to C$ by $gof (x)=g(f(x))\;for\; all \;x \in A$
• Given two functions $g:A \to B$ and $f:B \to C$, then composition of $g$ and $g$, $fog:A \to C$ by $fog (x)=f(g(x))\;for\; all \;x \in A$
Given $f(x)=|x|, \; g(x)=|5x-2|$
Step 1: Given two functions $f:A \to B$ and $g:B \to C$, then composition of $f$ and $g$, $gof:A \to C$ by $gof (x)=g(f(x))\;for\; all \;x \in A$
Since $f(x) = |x|, \rightarrow gof = g(f(x)) = g(|x|) =|5|x|-2|$,
Step 2: Given two functions $g:A \to B$ and $f:B \to C$, then composition of $g$ and $g$, $fog:A \to C$ by $fog (x)=f(g(x))\;for\; all \;x \in A$
Since $g(x) = |5x-2|, \rightarrow fog = f(g(x)) = f(|5x-2|) =||5x-2|| = |5x-2|$,
edited Mar 19, 2013