This is an old post with already excellent answers addressing the neatly disguised mathematical problem of How to turn addition into multiplication?
Below is the way to easily construct multiplicative 3x3 magic squares with nonnegative integer values. Let $x, y, z$ be nonnegative integers so that $xy$ is a square number. Then
$\sqrt{xy}z^2 \qquad x^2y \qquad yz\sqrt{xy}$
$xy^2 \qquad\quad xyz \qquad xz^2$
$xz\sqrt{xy} \qquad yz^2 \qquad xy\sqrt{xy}$
is a magic square of (not necessarily distinct) nonnegative integers where the product of the rows, columns, and diagonals are all equal to $(xyz)^3$. It is left as an exercise to see that a magic square with the listed properties is necessarily in this form.
To see a slightly less abstract (and working!) example, set $x:=1$, $y:=4$, and $z:=3$, obtaining a magic square with distinct elements, and with the magic product $1728=(1\cdot 4\cdot 3)^3$.
$18 \quad 4\quad 24$
$16 \quad 12\quad 9$
$6 \quad 36 \quad 8$
Here we see that the elements are not pure integer powers, and, in addition, it is quite easy to see that, e.g., the numbers in the first row cannot be represented by the function proposed by elias.
Finally, to answer the OP's question, we remark that the obvious bijection between the two squares serves as an "as simple as possible" function $f$. (So in particular, $f(4)=18$, $f(9)=4$, ..., $f(6)=8$, and undefined otherwise.)