Function notation says that any operations applied to a variable inside the parenthesis are applied to the variable before it enters the function, and anything applied to the function as a whole is applied to the entire function or to the result of the function. So you could say that...
If $f(x)=x^2$, then $f(3x-2)=(3x-2)^2$, and $3f(x)-3=3x^{2}-3$.
I understand that $f^{-1}(x)$ is used to denote the inverse of a function so...
$$f^{-1}(x)=\pm\sqrt{x}.$$
But putting something to the $-1$ power gives you its reciprocal like...
$$x^{-1}=\frac{x^{-1}}{1}=\frac{1}{x^1}= \frac{1}{can}$$
So would it not make sense that...
$$f^{-1}(x)=\frac{1}{x^2}.$$
My question is why $f^{-1}(x)$ is considered the inverse of $f(x)$? Was this notation chosen randomly, or is there some logical explanation for why it is that way?
The notation $f^n$ was adopted in set theory to denote iterated functions: functions composed with themselves numerous times. $f^n(x) = f\circ f^{n-1}(x) = f(f^{n-1}(x))$
It is from this we get the definition of the inverse of a function; being that function which when composed with the function $f$ produces the identity function. That is: $f\circ f^{-1}(x) = f^0(x) = x$
Meanwhile the notation $f^n$ was adopted independently in trigonometric theory to denote exponentiated functions: when function are multiplied with themselves numerous times. Here we obtain the more familiar use, $f^n(x) = f\cdot f^{n-1}(x) = f(x)\cdot f^{n-1}(x)$
While this meaning of the notation is more commonly encountered, both uses remain in practice, depending entirely on context to identify the meaning. Although sometimes mathematicians do adopt the notation $f^{\circ n}$ to clarify when they mean iteration rather than exponentiation.
Confusingly even when exponentiation is otherwise used it has become standard practice for the $f^{-1}$ notation to always mean the iterated inverse of functions.
It's a historic anomaly.