The inverse function in this case is itself, since swapping x and y results in the same function.
To find an inverse (which sometimes cannot be done explicitly/may not exist)
Let f be a function that is one-to-one over a particular domain.
1) Write y = f(x)
2) Change the subject to x
3) Swap x and y around (i.e replace x with y and each y with x, and that is your inverse function.
For y = x, (1)
x = y, (2) - making x the subject, and y = x (swapping x and y)
We see that the inverse is the same.
Geometrically, an inverse function is the original function reflected along the line y = x.
Note that y = x when reflected on the line y = x yields the same line.