when you switch the inputs and outputs of any function the resulting relation is a function

nope

consider y=x^2