# Elliptic curve with CM and image of Galois representation in normalizer of nonsplit Cartan

I am trying to understand the following. Let $$E/\mathbb{Q}$$ be an elliptic curve with complex multiplication given by the ring of integers $$\mathcal{O}_K$$. We are given a fixed rational prime $$p$$ which is inert in $$\mathcal{O}_K$$. Then the image of the mod $$p$$ Galois representation $$\overline{\rho}_{p,E}(G_\mathbb{Q})$$ is conjugate to a subgroup of the normalizer of non-split Cartan.

The way I think about it is the following. We know End$$(E)\cong \mathcal{O}_K$$, hence there is an isogeny: $$[\sqrt{-d}]: E \to E.$$ I would like to make a choice of basis for $$E[p]$$ such that the Galois action with respect to this basis gives an element of the normalizer of a non-split Cartan group.

Any help is much appreciated.

By cm theory, $$E[p]$$ is isomorphic to $$\mathcal{O}_K/(p)$$ as an $$\mathcal{O}_K$$-module. Elements in $$\operatorname{Gal}(\bar{\mathbb{Q}}/K)$$ act $$\mathcal{O}_K$$-linearly on $$E[p]$$ since they commute with endomorphisms, which means they act by multiplication with an element in $$\bigl(\mathcal{O}_K/(p)\bigr)^{\times}$$. When viewing $$E[p]$$ as a $$\mathbb{F}_p$$-vector space, this means that the representation from $$\operatorname{Gal}(\bar{\mathbb{Q}}/K)$$ has image in a non-split Cartan subgroup of $$\operatorname{GL}\bigl(E[p]\bigr)$$.
The image of $$\operatorname{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})$$ might at most be twice as large, therefore it is contained in the normaliser of this non-split Cartan subgroup. By the way, it cannot be contained in the non-split Cartan subgroup itself as complex conjugation is not equal to the multiplication by a unit modulo $$p$$. For large enough $$p$$, the image should be the full normaliser.