A finite dimensional algebra over a field has only finitely many prime ideals and all of them are maximal Let $K$ be a field and let $R$ be a $K$-algebra with unity which is finite dimensional as a $K$-vector space. Prove that $R$ has only finitely many prime ideals all of which are maximal. (Hint: Chinese remainder theorem)


My attempt: We have $R \simeq K^n$, for some $n$, as vector spaces. I claim that there are finitely many ideals of $K^n$. Let $I$ be an ideal of $K^n$ and $(a_1, a_2,...,a_n) \in I$. For every entry $a_i$, we have two choices, either $a_i=0$ or not.  So we get $2^n$ many cases, and any case give a particular ideal of $K^n$ which are distinct from others.

Is my proof correct or am I missing some point? If it is true, how can we give a proof by using the Chinese remainder theorem? Thanks!
A finite dimensional (commutative or not) algebra over a field is an artinian ring, because it certainly satisfies the descending chain condition on left or right ideals.

Let $A$ be a commutative artinian ring and let $P$ be a prime ideal. Then $A/P$ is an artinian domain, which is a field: if $D$ is an artinian domain, consider $d\in D$ and the chain of ideal $(d)\supseteq(d^2)\supseteq\dots\supseteq(d^n)\supseteq\dotsb$. This chain stabilizes, so $(d^n)=(d^{n+1})$ for some $n$, which means that $d^n=td^{n+1}$. Since $D$ is a domain, $1=td$ or $d=0$. Therefore all prime ideals of $A$ are maximal.

Consider now a minimal element in the family of products of finitely many maximal ideals, let it be $M_1\cdots M_k$. If $M$ is a maximal ideal, then
$$
MM_1\cdots M_k\subseteq M_1\cdots M_k
$$
so, by minimality, $MM_1\cdots M_k=M_1\cdots M_k$ and
$$
M_1\cdots M_k\subseteq M
$$
Since $M$ is prime, it follows that $M_i\subseteq M$, for some $i=1,\dots,k$; therefore $M_i=M$.

Here we don't use any general fact about artinian rings, just that any nonempty set of ideals has a minimal element (which is general theory of lattices). The Chinese remainder theorem can be used to get an upper bound on the number of maximal ideals; let $M_1,\dots,M_k$ be the set of (pairwise distinct) maximal ideals; then the Jacobson radical $J(A)=M_1\cap\cdots\cap M_k=M_1\cdots M_k$ by coprimality; so
$$
A/J(A)\cong A/M_1\times\cdots\times A/M_k
$$
by the CRT. If $A$ is a finite dimensional $K$-algebra, then $k\le\dim_K A/J(A)\le\dim_K A$. The upper bound can be reached: the product algebra $K^n$ has exactly $n$ maximal ideals.
I have the impression that the underlying additive structure is that of a $K$-vector space. But can one conclude that $R=K^n$ (isn't the ring $\mathbb{F}_p\times \mathbb{F}_{p^2}$ also a $\mathbb{F}_p$-algebra?). In any case, $R$ is a direct sum of fields $\oplus^k_{i=1} F_i $, so every ideal is of the form $\oplus_{i\in S} F_i$ with $S\subseteq\{1,\ldots,k\}$, and the maximal ideals are those where $S=\{1,\ldots,i-1,i+1,\ldots,k\}$.