Intuition behind method for finding the inverse of a function To find the inverse of a function, you switch the spots of $x$ and $y$ in the function and solve for the new $y$ output. For example:
$y = 3 + \sin\ x$


*

*Switch positions of $x$ and $y$


$x = 3 + \sin\ y$


*

*Solve for this new $y$


$y = \sin^{-1}(x-3)$
However, I've never wondered why this is the case. Does anyone have an explanation as to where this method came about?
In addition, how would one find the inverse of a function with 3 variables $x$, $y$, and $z$?
 A: Consider this magic box.
$X$ => [ $F$ ] ==> $Y$
Now, by solving for $X$ in terms of $Y$, we have effectively found
$X$ <== [$F^{-1}$] <== $Y$.
Now, we just switch the names of $X$ and $Y$, because convention tell us to always express $Y$ in terms of $X$, even in inverse functions.

As far as inverses of $z=f(x,y)$, if each point $(x,y)$ is associated with exactly one $z$, and each $z$ is associated with exactly one $(x,y)$ which is almost NEVER the case, then we can find an inverse without much hassle.

In $y=f(x)$, we also need to splice the function into a sub-domain, so that on that domain each $x$ maps to one $y$, and each $y$ maps to one $x$.
Otherwise, the inverse of $y=x^2$ would be a sideways parabola.
However, we know that the usual inverse of $y=x^2$ is $y=\sqrt{x}$, because  we only consider to invert the branch of $y=x^2$ that corresponds to $x \in [0,\infty)$.
A: suppose you have a function f:X->Y. If f is bijective, then we can identify a function g:Y->X which maps the images under f to its pre images. This is called the inverse function.
A: Elementary explanation with the example $$y(x)=3+\sin(x)$$
This means that putting a value $x$ into the above equation returns a value $y$.
To make things more simple, we ignore that this function is not bijective and should be restricted to a limited range.
Then, we look for a function $g$ such as putting $y$ into it returns $x$, that is $g(y)=x$. The function $g$ is the inverse function of $y(x)$.
$$g(3+\sin(x))=x \tag 1$$
But we are not familiar with this form of writing. We prefer to write 
$$Y=g(X)\tag 2$$
The use of differents symbols avoid the confusion between $x$ and $X$ and between $y$ and $Y$.
Comparing (1) and (2), we see that $\quad \begin{cases}
g(X)=g(3+\sin(x)) \quad\to\quad X=3+\sin(x) \\
Y=g(X)=x \quad\to\quad Y=x \end{cases}$
Hence :
$$X=3+\sin(Y)$$
So, the recipe which consists in inverting $x$ and $y$ , which gives $x=3+\sin(y)$ , is a short-cut for all the above. Except that this short-cut can make forget that the new $x$ and $y$ are not the same as the previous ones. 
If fact, to be clear, we should write :
$$Y=\sin^{-1}(X-3)$$
which defines a function $Y(X)$. We are allowed to chose any symbol as we want for a given function, for example $\quad f(t)=\sin^{-1}(t-3)\quad$ or any other symbols. Among the infinity of possible notations, why not this one :
$$y=\sin^{-1}(x-3)$$
But, of course the $x$ and $y$ are not the same as the $x$ and $y$ at the beginning.  
A: Yes, I have an explanation about where that method comes from.
As we know, a function $f$ and its inverse function $f^{-1}$ fulfill the following:
$$ f\left(f^{-1}\left(x\right)\right) = x = f^{-1}\big(f\left(x\right)\big) $$
The first time you write $y$ it represents $y=f(x)$. 
$$y_{_1} = f(x) = 3 + \sin (x)$$After the "switch", $y$ represents $f^{-1}(x)$. 
These together lead to;
$$ f\left(f^{-1}\left(x\right)\right) = x = 3 + \sin \left(f^{-1}\left(x\right)\right),$$
and solving for $ f^{-1}\left(x\right) = y_{_2} $
\begin{equation}
f^{-1}\left(x\right) = y_{_2} =  \sin^{-1} \left(x - 3 \right).
\end{equation}
:)
...
Your last question is too vague. Is $z$ a function of $x$ and $y$, i.e. $z=f(x,y)$? or do you mean a function $f(x,y,z)$? Which ever the case, I can tell that you than you should think deeper about when a function from $\mathbb{R^2}$ or $\mathbb{R^3}$ into $\mathbb{R}$ can be a bijection.
