# Domain of multivariate function where inputs are functions sharing a domain

Say we have three disjoint sets $A$, $B$ and $C$. And three functions $f$, $g$ and $h$ where $f:A \rightarrow B$, $g:A\rightarrow C$ and $h$ takes the inputs $h(f(a_1),g(a_2))$ for $a_1, a_2 \in A$ .

What is the domain of $h$?

I'm reading Charles C. Pinter's a Book of Abstract Algebra and drew up a little problem based on the second chapter on operations. I asked myself whether $h$ would be a binary operation or not, assuming its range is $A$. But I'm feeling unsure as to its domain. I've searched for how to determine domains of multi-variate functions and from that I guess that the answer would be some subset of $B \times C$ since those are the ranges of $f$ and $g$ respectively.

But, just looking at the function $h(f(a_1),g(a_2))$, for any two $a_n$ I'd give, I would get a valid answer. So it 'feels' as if $A \times A$ is the domain of $h$ and thus $h$ would be a binary operation.

What I failed to see was that the function $h(f(a_1),g(a_2))$ is a composite function: $h\circ f\times g$ and since the domain of both $h$ and $f$ is $A$ it follows that the domain for $h$ is $A\times A$. Since $h: A\times A \rightarrow A$, $h$ is a binary operation.
Another point of confusion was that I mentally interchanged $h(b,c)$ for $b\in B$ and $c\in C$ with $h(f(a_1),g(a_2))$.