Image of Galois representation of ordinary elliptic curve Let $K$ a local field, $E/K$ elliptic curve, $k$ the residue field, $p=\operatorname{char}(k)$. Assume $\tilde{E}/k$  is a good reduction and assume the elliptic curve has nonzero Hasse invariant, i.e $\tilde E[p]\cong \mathbb Z/p\mathbb Z$. Let $G=Gal(\bar{K}/K)$ and $\rho:G\to Aut(E[p])\cong GL_2(\mathbb F_p)$ the Galois representation.
There is an exact sequence $0\to X_p\to E[p]\to \tilde{E}[p]\to 0$ where $X_p\cong \mathbb  Z/p\mathbb Z$ and which is $G$-stable. Let $\{e_1,e_2\}$ basis for $E[p]$ such that $X_p=\mathbb F_pe_1$.
Then it's a fact that the image $\rho(G)\subset GL_2(\mathbb F_p)$ is contained in the Borel subgroup which consists of the upper triangular matrices and $\rho(I_p)\subset \left\{ \begin{pmatrix} 
 1& *  \\
 0 & 1
 \end{pmatrix} \right\}$
where $I_p$ is the  $p$-Inertia subgroup of the inertia subgroup $I \subset G$ (maximal pro-$p$ group inside $I$). I want to understand why this is true and how do we explicitly use the fact that we have a nonzero Hasse invariant.
If I remember correctly, Galois groups of local fields are solvable and $\rho(G)$ is connected and probably closed (?) which means it must be contained in the Borel subgroup. Is this reasoning correct? I am not sure how the choice of the basis such that $X_p=\mathbb F_pe_1$ helps in all this. I suppose it gives us the right base choice such that the borel subgroup is actually the upper triangular matrices, but I am not sure how. And how can one see about $I_p$ ? Is this because it's the Sylow $p$-subgroup generated by $\begin{pmatrix} 
 1& 1  \\
 0 & 1
 \end{pmatrix} $ ?
Any help to make these ideas a bit more precise or correct me if I am completely wrong would be appreciated.
 A: This just boils down to the follow fact. Let $C \subset E[p]$ be a galois stable subgroup of order $p$, then the image of the representation $\rho$ is contained in a subgroup conjugate to the subgroup
$$
H = \left\{ \begin{pmatrix} * &* \\ 0 &* \end{pmatrix} \right\} \subset GL_2(\mathbb{F}_p)
$$
note that this is independent of the field $K$ (so long as $\operatorname{char}(K) \neq p$).
Why is this? We are free to choose a basis for $E[p]$ so that the first basis element lies in $C$. But then $G$ acts as a $1$-dimensional character $\chi$ on $C$. In particular we have that $\sigma \in G$ acts as a matrix of the form $$
\begin{pmatrix} \chi(\sigma) &* \\ 0 &* \end{pmatrix}
$$
and we are done (your subgroup $X_p$ may be taken to be $C$ and the basis has already been chosen for us as $\{e_1, e_2\}$).
The second statement follows from the fact that $\rho(I_p)$ is a finite quotient of a pro-$p$ group, hence must be of $p$-powered order. As you say, the $p$-sylow subgroup of $H$ is exactly equal to the subgroup of matrices of the form
$$
\begin{pmatrix} 1 &* \\ 0 & 1\end{pmatrix}
$$
so since $\rho(I_p) \subset H$ is a finite $p$-group, we are done.
