Is the median preserved for any strictly monotonic mapping? Problem
Let $X\sim f_X$, where $f_X$ is the probability density function of $X$. Let $g: \mathbb{R} \to \mathbb{R}$ a strictly monotonic (decreasing or increasing) mapping. I aim to prove or disprove:
$$
g[\mathrm{median} (X)] = \mathrm{median}[g(X)]
$$

Try
Let $x_0 = \mathrm{median} (X)$, $Y=g(X)$, $y_0 = g(x_0)$. Then, we want to show:
$$
0.5 = \int_{-\infty}^{y_0} f_Y (y) dy
$$
WLOG, assume $g$: increasing. By change of variables, $f_Y(y) = f_X(x)/g'(x)$ and $dy=dx g'(x)$. Thus,
$$
\begin{align}
\int_{-\infty}^{y_0} f_Y (y) dy &= \int_{-\infty}^{y_0} f_X(x) dx \\
&\neq \int_{-\infty}^{x_0} f_X(x) dx = 0.5
\end{align}
$$
So, if $f_X>0$ a.s., then the above statement holds only if $g(x_0) = x_0$. However, take an example of log-normal distribution, where $X\sim N(\mu, \sigma^2)$ and $g(x)=\exp(x)$. There is no real solution to $g(x_0) = x_0$, and $f_X >0$ a.s. But it is still true that $\mathrm{median}[g(X)] = g(\mu)$.
So my disproof is invalid? Any suggestions are welcome.

The claim is obviously true for a discrete variable (i.e. we consider a probability distribution over a finite number of events): given a set $A$, the median is a number $a_0$ such that $\sum_{\{a: a \leq a_0\}}p(a)=\sum_{\{a: a \geq a_0\}}p(a)$. Clearly, $\sum_{\{g(a): g(a)\leq g(a_0)\}}p(g(a))=\sum_{\{a: a\leq a_0\}}p(a)$, and $\sum_{\{g(a): g(a) \geq g(a_0)\}}p(g(a))=\sum_{\{a: a \geq a_0\}}p(a)$, so $\sum_{\{g(a): g(a)\leq g(a_0)\}}p(g(a))= \sum_{\{g(a): g(a) \geq g(a_0)\}}p(g(a))$
We can then extend it to the continuous case by taking Reimann sums: partition the domain into a finite number of intervals, find the probability density of the interval, and multiply by the size of the interval. Then we let the lengths of the intervals go to zero.
When we transform an interval by $g$, we multiply the length of the interval by $g'$, and divide the probability density by $g'$, so the total probability mass is unchanged. This is a bit handwavy, since we need to take this "in the limit" for $g'$ to be constant over the interval, but the basic concept should be reasonably intuitive. The error in your logic is that you essentially only changed the probability density, and ignored that since each interval will be scaled, the overall domain is also scaled.
