It is a well known theorem that given a eigneform $f$ of weight $k$ and level $N$, Deligne, Serre, Shimura and others have constructed continuous $\ell$-adic Galois representation $\rho_f : \mathrm{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})\to \mathrm{GL}_2(E)$ such that the trace and determinant of the image of Frobenius at prime $p$ different from $\ell$ and not dividing $N$ satisfies nice properties which connects it to the Fourier coefficients of $f$. But I have seen far too many times that an expert while giving a talk says that we can take the representation $\rho_f : \mathrm{Gal}(\bar{\mathbb{Q}}/\mathbb{Q}) \to \mathrm{GL}_2(\mathcal{O}_E)$. What is the reason of this switch from $\mathrm{GL}_2(E)$ to $\mathrm{GL}_2(\mathcal{O}_E)$ ? Does it have something to do with the compactness of $\mathrm{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})$ ?
Thanks for the help !!
This follows from the compactness of $\mathrm{Gal}(\overline{\mathbb Q}/\mathbb Q)$. Let $G$ be the image of $\rho_f$. The point is that, since $G$ is compact, there is a $G$-stable lattice in $\Lambda \subset E^2$ and $\mathrm{Aut}(\Lambda)\cong \mathrm{GL}_2(\mathcal O_E)$
Indeed, $G$ is a compact subgroup of $\mathrm{GL}_2(E)$ so, in particular, its denominators are bounded.
Consider $\Lambda = \sum_{g\in G}g\mathcal O_E^2$, an $\mathcal O_E$-module preserved by $G$. Then $$\mathcal O_E^2\subseteq\Lambda\subseteq \pi^{-k}\mathcal O_E^2$$ for some $k$, where $\pi$ is a uniformiser of $E$. It follows that $\Lambda$ is a free $\mathcal O_E$-module and hence there exists $h\in\mathrm{GL}_2(E)$ such that $h\mathcal O_E^2 = \Lambda$. Then $h^{-1} G h\subset \mathrm{GL}_2(\mathcal O_E)$.