cross-posted from https://math.stackexchange.com/questions/4708694/curious-symmetry-in-a-theta-like-function Let $\Theta : \mathfrak{h}\times \mathfrak{h} \to \mathbb{R}$ be defined as follows $$ \Theta(z,\tau) = \sum_{\omega_1, \omega_2 \ \in \ \mathbb{Z}\tau + \mathbb{Z}} \exp\Big(-2\pi\frac{| \omega_1 z + \omega_2|^2 + | \omega_1\bar{z} + \omega_2|^2}{\Im(z)\Im(\tau)}\Big) $$ This function is clearly invariant under the action of $\operatorname{SL}_2(\mathbb{Z})\times\operatorname{SL}_2(\mathbb{Z})$ acting on $(z,\tau)$ by linear fractional transformations. However it also satisfies the curious symmetry $$ \Theta(z,\tau) = \Theta(\tau,z).$$ This last symmetry can be proven by brute force by calculating the Fourier series of $\Theta$ and checking the identify, but I am curious to know whether there is a more conceptual proof of this final identity - perhaps a proof which treats all symmetries on an equal footing, and places the function above within a larger framework. Any ideas for a more conceptual proof would be most welcome.