This may be a simple question to a lot of you, but I can't wrap my head around the idea of iterating a function of multiple variables. I chose an example that I thought would be easy to show a solution for, but I would really appreciate an explanation of what it means to iterate a function of any number of variables.
My guess is this:
$$(f\circ f)(x,y)=(x+y)+(x+y)=2x+2y$$
, since, for a function of only $x$, we simply replace all instances of $x$ with $f(x)$, e.g.: $$f(x)=x^2\implies (f\circ f)(x)=(x^2)^2=x^4$$
. However, this doesn't make much sense to me, as $x+y$ is neither a function of $x$ nor of $y$, but both. I am finishing up my final year of high school (currently taking a calculus class) and we haven't had much of an opportunity to explore the realms of multivariate calculus, as many students in said class still can't long divide [crying in background]. Anyway, any insights or explanations would be much appreciated. Thank you for your time!
As has been pointed out in another answer, $f \circ f$ doesn't work if $f$ maps pairs to individual values.
You can view $(x, y) \mapsto (x + y) + (x + y)$ as a kind of composite built up from $f$ (defined by $f(x, y) = x + y$). But to do so you need a few more notational tools. Define the diagonal function, $\Delta$, by $$\Delta(x) = (x, x)$$ and define the functional pairing of two functions $f$ and $g$ by $$\langle f, g \rangle(x) = (f(x), g(x))$$ Then $(x, y) \mapsto (x + y) + (x + y)$ can be written as: $$f \circ \langle f, f\rangle \circ \Delta$$ (where $\Delta$ is being used to map a pair $(x, y)$ to a pair of pairs $((x, y), (x, y))$).
Keeping track of which combinations of $\Delta$, $\langle \cdot, \cdot\rangle$ and $\circ$ are allowable is a (very elementary) part of category theory that is also very familiar to users of typed functional programming languages.