Suppose $A$ is a $k$-subalgebra of $M_n(k)$ containing the identity of $M_n(k)$, where $k$ is a field. Suppose $A$ is a domain. I would like to show that $A$ is a division algebra and $\dim_k(A) \mid n$.
Since $A$ is a $k$-subalgebra of $M_n(k)$, $A$ is Artinian and the Jacobson radical $J(A)$ is nilpotent. Since $A$ is a domain, $A$ is Jacobson semisimple and $J(A)=0$. So $A$ Artinian and Jacobson semisimple implies $A$ is semisimple.
By Artin-Wedderburn, $A \cong M_{n_1}(D_1) \oplus \cdots\oplus M_{n_r}(D_r)$, where the $D_i$ are division rings. Since $A$ is a domain, we must have each $n_i=1$ and each $D_i$ a domain, so $A$ is a division algebra.
How do I show that $\dim_k(A) \mid n$?
Also, if $A$ is simple, how can I show that $\dim_k(A) \mid n^2$?