Inversion formula for the square of a theta function
Let $g\ge0$, $a,b\in\mathbb R^g$, $z\in\mathbb C^g$, and let $\tau$ be a symmetric complex $g\times g$ matrix with positive-definite imaginary part. Put $$\theta[a,b](z,\tau)=\sum_{m\in\mathbb Z^g}\exp\!\left(2\pi i\left[\tfrac12(m+a)^t\tau(m+a)+(m+a)^t(z+b)\right]\right).$$ Then $$\theta[a,b](\tau^{-1}z,-\tau^{-1})^2 =(-i)^g\det(\tau)\,e^{2\pi i z^t\tau^{-1}z}\,e^{4\pi i a^tb}\,\theta[b,-a](z,\tau)^2.$$
Squaring gives the transformation formula with a determinant factor and no choice of a square root.