# Theta function squared is a weight $1$ modular form

Let $$\vartheta(\tau) = \sum_{n\in\mathbb{Z}}e^{\pi in^2\tau}.$$ I know that $$\vartheta$$ satisfies the transfromation properties $$\vartheta(\tau + 2) = \vartheta(\tau), \quad \vartheta\left(-\frac{1}{\tau}\right) = \sqrt{\frac{\tau}{i}}\vartheta(\tau).$$ What I am interested in is the transformation properties of $$f(\tau) = \vartheta(2\tau)^2.$$ I have seen it mentioned in some notes by Kevin Buzzard and elsewhere that $$f(\tau)$$ is a weight $$1$$ modular form on the congruence subgroup $$\Gamma_0(4)$$ with Nebentypus $$\chi$$, the Dirichlet character coming from the Legendre symbol mod $$4$$. In other words, $$f\left(\frac{a\tau + b}{c\tau + d}\right) = \chi(d)(c\tau + d)f(\tau), \quad \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in \Gamma_0(4).$$ I cannot find a reference for this fact nor does it seem obvious from the transformation properties of $$\vartheta(\tau)$$. I know that given a modular form $$g(\tau)$$ of weight $$k$$ on $$\Gamma_0(N)$$ for some $$N$$, the function $$g(2\tau)^2$$ is modular of weight $$2k$$ on $$\Gamma_0(2N)$$. But the problem is that the subgroup on which $$\vartheta(\tau)$$ is modular (of weight $$1/2$$) is not one of the congruence subgroups $$\Gamma_0(N)$$. I would greatly appreciate any help tracking down a reference for this fact.

$$g = \vartheta^2(2\tau)$$ is invariant under $$\Gamma_1(4)$$ is easily checked: since $$\Gamma_1(4)$$ is generated by $$\begin{pmatrix}1 & 1 \\ 0 & 1 \end{pmatrix}\qquad \begin{pmatrix}1 & 0 \\ 4 & 1 \end{pmatrix}$$ Obviously $$g$$ is weight-$$1$$ invariant under the first one. For second one, \begin{aligned}g\left[\begin{pmatrix}1 & 0 \\ 4 & 1 \end{pmatrix}\right]_1 (\tau)&= (4\tau +1)^{-1}\vartheta^2(\frac{2\tau}{4\tau+1}) \\&= (4\tau +1)^{-1} \frac{i(4\tau+1)}{2\tau}\vartheta^2(-\frac{4\tau+1}{2\tau}) \\& = \frac{i}{2\tau}\vartheta^2(\frac{-1}{2\tau}) = \vartheta^2(2\tau) \end{aligned}
To check $$g$$ has nebentypus $$\chi$$, it suffices to show $$g\left[\begin{pmatrix}-1 & 0 \\ 4 & -1 \end{pmatrix}\right]_1(\tau)=-g(\tau)$$ I shall leave this checking to you.