danika concludes that the following functions are inverses of each other because f(g(x)) = x. do you agree…

danika concludes that the following functions are inverses of each other because f(g(x)) = x. do you agree with danika? explain your reasoning. f(x) = |x| g(x) = -x
Answer
Explanation:
Step1: Calculate $f(g(x))$
Substitute $g(x)= - x$ into $f(x)$. So $f(g(x))=f(-x)=\vert - x\vert$. Since $\vert - x\vert=\vert x\vert$, when $x = - 1$, $f(g(-1))=f(1)=\vert1\vert = 1$, but if two functions $f$ and $g$ are inverses, then $f(g(x))=x$ for all $x$ in the domain of $g$ and $g(f(x))=x$ for all $x$ in the domain of $f$. Also, we need to check $g(f(x))$.
Step2: Calculate $g(f(x))$
Substitute $f(x)=\vert x\vert$ into $g(x)$. So $g(f(x))=g(\vert x\vert)=-\vert x\vert$. When $x = 1$, $g(f(1))=g(1)= - 1\neq1$. For two functions to be inverses, both $f(g(x)) = x$ and $g(f(x))=x$ must hold for all $x$ in the appropriate domains. Since $g(f(x))\neq x$ for positive - valued $x$, the functions are not inverses.
Answer:
No, the functions $f(x)=\vert x\vert$ and $g(x)=-x$ are not inverses of each other because while $f(g(x))=\vert x\vert$, $g(f(x)) =-\vert x\vert$ and $g(f(x))\neq x$ for positive values of $x$.