  We characterize when bivariate real analytic functions are "dimension
expanding" when applied to a Cartesian product. If $P$ is a bivariate real
analytic function that is not locally of the form $P(x,y) = h(a(x) + b(y))$,
then whenever $A$ and $B$ are Borel subsets of $\mathbb{R}$ with Hausdorff
dimension $0<\alpha<1$, we have that $P(A,B)$ has Hausdorff dimension at least
$\alpha + \epsilon$ for some $\epsilon(\alpha)>0$ that is independent of $P$.
The result is sharp, in the sense that no estimate of this form can hold if
$P(x,y) = h(a(x) + b(y))$. We also prove a more technical single-scale version
of this result, which is an analogue of the Elekes-R\'onyai theorem in the
setting of the Katz-Tao discretized ring conjecture. As an application, we show
that a discretized non-concentrated set cannot have small nonlinear projection
under three distinct analytic projection functions, provided that the
corresponding 3-web has non-vanishing Blaschke curvature.
