Modes under transformation Let $f_{X}(x)$ be the  probability density function of the continuous random variable $X$. Suppose that the function $g:\mathbb{R}\rightarrow\mathbb{R}$ is differentiable and monotonic and define a new random variable $Y$, s.t. $X = g(Y)$. The corresponding probability density function for $Y$ is then given by
\begin{align}
f_{Y}(y) = f_{X}(g(y))\left|g^{\prime}(y)\right|.
\end{align}
Let $\hat{y}$ be a mode of $f_{Y}(y)$. Show that $g(\hat{y})$ is not necessarily a mode of $f_{X}(x)$, but is a mode of $f_{X}(x)$ if $g$ is linear. 
Additional assumptions may be added as needed, e.g. differentiability, unimodality, concavity etc, to simplify the proof.
This comes from Bishop, Pattern Recognition And Machine Learning, 2006:

There is also an assosiated exercise that goes with this paragraph:

What I want to do is to make the statement more formal/rigorous. 
 A: In the case of a linear transformation
$$
g(y) = ay + b,
$$
you see that $|g'(x)| = |a|,$ hence:
$$
f_X(x) = f_Y(a^{-1}(x-b))|a|^{-1}
$$
This is just a shift and a rescaling of the function, hence it does not change the points that attain the maxima, it just shifts them around and changes the value of the maximum.
In my opinion the simplest way to see this is to convince yourself through a picture. In any case you can see this analytically: suppose $\hat{y}$ is the mode for $f_Y.$ Then
$$
f_Y(y) \le f_Y(\hat{y}), \ \forall y \in \mathbb{R}.
$$
Thus
$$
|a|^{-1}f_Y(y) \le |a|^{-1}f_Y(\hat{y}) , \ \forall y \in \mathbb{R}.
$$
and thus, since 
$$
y = a^{-1}(g(y)-b)
$$
we find that by calling $x = g(y),\  \hat{x} = g(\hat{y})$:
$$
f_X(x) = |a|^{-1}f_Y(a^{-1}(x-b)) \le |a|^{-1}f_Y(a^{-1}(\hat{x}-b)) = f_X(\hat{x}), \ \forall x \in \mathbb{R}.
$$
Proving that $\hat{x}$ is a mode for $f_X.$
For a counterexample just consider a normally distributed r.v. $Y \sim N(0,1).$ Take $g(y) = e^y.$ Then $X= g(Y)$ has lognormal distribution. The mode of the lognormal with paramteres $(0,1)$ is $$\hat{x} = e^{-1} \neq 1 = g(0) = g(\hat{y}).$$
