Let $f: \mathbb{R}^3 \rightarrow \mathbb{R}$ be a real valued scalar field and $\mathbf{r}\in\mathbb{R}^3$ a vector with $r = \sqrt{\mathbf{r}\cdot\mathbf{r} }$ its norm. Let's say that $f$ is invariant under rotations, such that \begin{equation} f(R\mathbf{r}) = f(\mathbf{r}) \ , \end{equation} for all $R$, with $RR^{T} = \mathbb{I}$. Is there a straightforward way to prove that there must exist a function $h: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(\mathbf{r}) = h(r)$ for all $\mathbf{r}\in\mathbb{R}^3$?
I understand that this is almost self-evident. If a function is invariant under rotations then it should only depend on the norm. However, I am not able to prove it more formally without relying on that intuition.