I would like to know if my solution to the following exercise is correct.
Let $A$ be an integral domain (with a unit) which has a field $\mathbb K$ as a subring and such that $A$ is a finite-dimensional vector space over $\mathbb K$. Show that $A$ is a field.
Here is what I do : let $n=dim_{\mathbb K}A$. Let $x$ be in $A$. Then $\{1,x,x^2,...,x^n\}$ is a linearly dependent family in A as a vector space. Therefore there exist $\beta_0,\beta_1,...,\beta_n \in \mathbb K$ such that $$\sum_{i=0}^{n}\beta_ix_i=0$$ Therefore $$\beta_1x+\beta_2x^2+...+\beta_{n-1}x^{n-1}+\beta_nx^n=-\beta_0$$
So $$x(\beta_1+\beta_2x+...+\beta_nx^{n-1})=-\beta_0$$
Since $\beta_0 \in \mathbb K$ it has an inverse so $$x \times (\beta_1+\beta_2x+...+\beta_nx^{n-1})(-\beta_0^{-1})=1$$
Therefore $x$ has an inverse, therefore $A$ is a field. Is there anything to add or to justify ? Where does the integrity of the ring come in ? Thanks in advance for your time.