Given that $x^y=y^x$, what could $x$ and $y$ be? It's not too difficult to figure out that $x$ and $y$ can both be 1, and also $x$ can be 2 and $y$ can be 4 (and vice versa). But I can't rule out if there are other solutions. Does it have anything to do with inverse functions? Is there a way to see the solutions by graphing, or algebraically?
 A: There is an explicit solution to this equation given by $$y = -\dfrac{x \operatorname{W}\left(-\dfrac{\log(x)}{x}\right)}{\log(x)}$$
where $\operatorname{W}(x)$ is the Lambert W-function.
Consider: $$x^y = y^x$$
Take the logarithm of both sides
$$y\log(x) = x\log(y)$$
$$\dfrac{y\log(x)}{x} = \log(y)$$
Multiply by $-1$ and exponentiate
$$\exp\left(-\dfrac{y\log(x)}{x}\right) = \dfrac{1}{y}$$
Multiply each side by $-\dfrac{y\log(x)}{x}.$
$$-\dfrac{y\log(x)}{x}\exp\left(-\dfrac{y\log(x)}{x}\right) = -\dfrac{\log(x)}{x}$$
Solve using the properties of the $\operatorname{W}$ function.
$$-\dfrac{y\log(x)}{x} = \operatorname{W}\left(-\dfrac{\log(x)}{x}\right)$$
$$y = -\dfrac{x \operatorname{W}\left(-\dfrac{\log(x)}{x}\right)}{\log(x)}$$
A: If we convert everything to polar form, we end up with
$$(r\cos\theta)^{r\sin\theta}=(r\sin\theta)^{r\cos\theta}$$
Take the $r$th root of both sides and you'll get
$$(r\cos\theta)^{\sin\theta}=(r\sin\theta)^{\cos\theta}$$
$$r^{\sin\theta}(\cos\theta)^{\sin\theta}=r^{\cos\theta}(\sin\theta)^{\cos\theta}$$
$$r^{\sin\theta-\cos\theta}=\frac{(\sin\theta)^{\cos\theta}}{(\cos\theta)^{\sin\theta}}$$

$$r=\left(\frac{(\sin\theta)^{\cos\theta}}{(\cos\theta)^{\sin\theta}}\right)^{1/(\sin\theta-\cos\theta)}$$

which is the curve you are interested in.  A graph may be found here.
Plugging in $\theta=\arctan(0.5)$ will yield the rectangular coordinate $(4,2)$.
A: Here's a good way to look at this: 
$$
x^y = y^x \implies \\
y \ln x = x \ln y \implies\\
\frac{\ln x}x = \frac{\ln y}y
$$
So one way of solving this is looking at the graph of $y = \frac{\ln x}{x}$ and seeing where it hits a particular value twice.
However, I'm going to go a step further.  I will say that I want my solution $(x,y)$ of $x^y = y^x$ to be of the form $(x,ax)$ so that $y = ax$ for some value $a$.  Furthermore, I'll assume that $x \neq y$ so that $a \neq 1$ (of course, $x = y$ is always a solution if $x^x$ is defined). With that, we have
$$
\frac{\ln x}x = \frac{\ln (ax)}{ax} \implies (\text{assume } x\neq 0)\\
\ln x = \frac{\ln (ax)}{a} \implies\\
\ln x = \frac{\ln (a)}{a} + \frac{\ln x}{a} \implies\\
\frac{a-1}{a}\ln x = \frac {\ln(a)}{a} \implies (\text{we assumed }a \neq 1)\\
\ln x = \frac{\ln(a)}{a-1} \implies\\
x = a^{\frac{1}{a-1}}
$$
So, for any value $a \neq 1$, the pair $x = a^{1/(a-1)},$ $y = a \cdot a^{1/(a-1)} = a^{a/(a-1)}$ will give you a solution to the original equation. 
For example, plugging in $a = 2$ gives you $x=2$ and $y = 4$.  Try some other values.
A: Hint:
Algebra says that after taking $\ln$ both sides, 
$$y\ln(x) =x\ln(y) $$
This implies $\ln(x) /x=\ln(y) /y$
What can you say about the function $x\to \ln(x)/x $? 
A: For finding solutions by graphing, take the logarithm of both sides of the equation to get $y\cdot\log(x)=x\cdot\log(y)$. Assuming $x$ and $y$ are not zero, divide by them and get $\frac{\log(x)}{x}=\frac{\log(y)}{y}$ and consider the map $f:(0,\infty)\rightarrow \mathbb{R}, x\mapsto \frac{\log(x)}{x}$. Now your question is equivalent to finding values $x,y$ with $f(x)=f(y)$.
A: all numbers of the form $x^{1/(x-1)}$, $x>1$ satisfy this.
