composition of fraction function with restrictions and finding the corresponding graph Given the function:
$$
f(x) = \begin{cases}\frac{1}{x} & x \neq 0 \\
                          0& x = 0
                          \end{cases}
$$
I need to graph the function: $f(f(x))$. This is what I got:
$$
f(f(x)) = \begin{cases}f(\frac{1}{x}) & x \neq 0 \\
                          f(0)& x = 0
                          \end{cases} \\ \iff
$$
$$
\begin{cases}\frac{1}{1 \over x} & x \neq 0 \\
                          0 & x = 0
                          \end{cases} \\ \iff
$$
$$
\begin{cases}x & x \neq 0 \\
                          0 & x = 0
                          \end{cases}
$$
I think my answer is not correct but not sure because we need to choose a graph from the picture below and I'm not sure that "d" is the correct one. Specifically, shouldn't it be $[0,0]$ and not $(0,0)$ as in "d"?

 A: As I mention in the comments, you are right in your answer. As can be seen by considering cases. I will right out a full argument, hopefully that helps.
We are evaluating $f (f (x)) $, and $f $ takes two values depending on what its argument is (in this case $f (x) $). Consider cases on this:
Case 1: $f (x) \neq 0$. Then $f (f (x))=1/f (x)$. And what is $f (x)$? Given the definition, and the assumption that $f (x) \neq 0$, we must be in the case when  $f (x)=1/x $, which only happens when $x\neq 0$ (again using the definition of $f $).
Case 2: $f (x) =0$. Then $f (f (x)) =0$. Note that this only happens when  $x=0$ (by the definition of $f $).
So indeed $$f(f (x))=\begin{cases}x,&x\neq 0;\\
0,&\text {otherwise}.\end{cases} $$
Now notice that this is equivalent to saying  $$f (f(x))=x $$for all $x $. It should then be clear which of the sketches shows the graph of $f (f (\cdot)) $. (Notice that graph (b) is the same as graph (d) except that the function is defined at $0$.)
P.S. it was an exclamation mark
