Suppose I have a function $f:\mathbb{R}_+ \to [0,1]$ and another similar function $g$.
I consider $g$ to be a fixed function, and I want to know how close $f$ is to $g$.
For this purpose, I define a `residual operator' $R$ which calculates the difference between the two functions, but as a function of $f(x)$. Can I write:
$R: f \mapsto (f(x) \mapsto (f(x) - g(x)\;)$?
In other words, the output of $Rf$ is a function whose output is the difference evaluated at $f(x)$.
P.s. I suppose to be more rigorous I could write this as
$R: (f,g) \mapsto (f(x) \mapsto (f(x) - g(x)\;)$.
I'm getting a lot of answers that I should write $R: (f,g) \mapsto f - g$. However, please notice that when I plot $Rf$ I want the horizontal axis to be the value of $f(x)$. I know this is possible in practice, because I have plotted this many times, but I'm having difficulty representing what I am calculating in function notation.
With the help of the very nice responses, I think I know how to write this in rigorous function notation. The object I'm interested in is a plot, and a plot is really just a collection of points in two dimensions. How do I write "a collection of points in two dimensions"? One such collection might be written:
$\{(x(t),y(t)) \;|\; x,y: \mathbb{R}_+ \to \mathbb{R} , t\ge 0\} \subset \mathbb{R}^2$.
My operator becomes
$R: (f,g) \mapsto \{\,(f(t),f(t)-g(t)) \;|\; f,g: \mathbb{R}_+ \to \mathbb{R} , t\ge 0\}$.
In summary, we can think of $R(f,g)$ as a subset of $\mathbb{R}^2$.