# Will SADMEP always work to evaluate the inverse of a function, and I should not evaluate right to left?

How do you evalulate $f^{-1}(5)$ where $f(x) = (3 + 2) - (x * 4)$

I understand that if $f(x) = y$ then $f^{-1}(y) = x$

The input and output are essentially reversed. The most common place I have seen and used this is in the trigonometric functions.

So if I wanted to evaluate $f^{-1}(5)$

My approach is to set $(3 + 2) - (x * 4) = 5$

Solve for $x = 0$

Therefore $f^{-1}(5) = 0$

But I was told by a math teacher a long time ago that you could evaluate the inverse of a function by plugging in the values and reversing the order of evaluation. For example, SADMEP instead of PEMDAS.

So I want to do any subtraction first on the expression: $(3 + 2) - (x * 4)$

I believe the first step is therefore $2 - 5$

Now I have $3 + (-3) * 4$

The next step is addition, and then multiplication (since there is no division).

$0 * 4$

$0$

The method apparently works, this time. Will this always work?

Also notice that I took the $2$ and subtracted $x$ or in this case $5$

I solved the expression from left to right, as opposed to doing it right to left. Is it also a requirement to still do things left to right? I believe left to right is still necessary, otherwise this would not have come out right (24 instead of 0).

I will probably make another question asking why $f^{-1}(x) = \frac{1}{f(x)}$ unless someone has a simple answer (you probably do).

-
The last statement ($f^{-1}(x) = \frac{1}{f(x)}$) is false. $\dfrac{1}{\sin x} = \csc x \neq \sin^{-1} x$. The confusion may arise from assuming that $\sin^k x = (\sin x)^k$, but an exception is made for $k = -1$, where we define it as the inverse function. –  George V. Williams Jan 11 '13 at 2:45
It is very rare that $f^{-1}(x) = \frac{1}{f(x)}$. You are thinking of the multiplicative inverse of a number $x$, which is $\frac{1}{x}$. When referring to functions, we want the compositional inverse of that function, which is significantly more complicated to express (in fact, it may not even exist). –  Austin Mohr Jan 11 '13 at 2:50
I see that it is false, I was very suspicious of that statement and now I see why I was mistaken. –  Leonardo Jan 11 '13 at 3:02

The general framework you describe (solve for $x$ in the equation $f(x) = y$) is correct. When you are solving for $x$, you are doing "reverse order of operations", which is what your teacher is calling SADMEP. It is a coincidence that you got the correct answer here (in fact, the first step of $3 + (-3)4$ is incorrect).
First, notice $$(3 + 2) - (x \cdot 4)$$ is more concisely written as $$5 - 4x,$$ so we'll work with that. Now, we want to see what $x$ will give the output of $5$. That is, we want to solve $$5 - 4x = 5$$ for $x$. Subtracting $5$ from both sides gives $$-4x = 0,$$ and finally dividing both sides by $-4$ gives $$x = 0,$$ as you've already found.
@Leonardo "SADMEP" is just an acronym for "reverse order of operations". You seem to understand how to solve for $x$ in this way, but are complicating things by trying to force it directly onto the letters S A D M E P. Notice I subtracted $5$ before dividing by $-4$, as you did in your initial example. –  Austin Mohr Jan 11 '13 at 3:08