Wedderburn-Artin theorem for algebras We have the following theorem

Wedderburn-Artin. Let $R$ be a semi-simple ring. There are division rings $D_1,...,D_n$ and $m_1,...,m_n\in\mathbb{Z}_{>0}$ such that $$R\cong\text{Mat}_{m_1}(D_1)\times...\times \text{Mat}_{m_n}(D_n)$$ and the pairs $(D_i,m_i)$ are unique up to permutation.

Now let $K$ be a field. I want to formulate and prove a Wedderburn-Artin theorem for $K$-algebras. Here a $K$-algebra is called semi-simple if it is semi-simple as a ring.
I have already proved (for a field $K$):


*

*Let $R,S$ be rings. If $R\times S$ is a $K$-algebra, so are $R$ and $S$.

*Let $R$ be a ring. If $\text{Mat}_n(R)$ is a $K$-algebra, so is $R$.


I guess the theorem is like

Wedderburn-Artin for $K$-algebras. Let $A$ be a semi-simple $K$-algebra. There are division algebras (i.e. rings being $K$-algebras) $D_1,...,D_n$ and $m_1,...,m_n\in\mathbb{Z}_{>0}$ such that $$A\cong\text{Mat}_{m_1}(D_1)\times...\times \text{Mat}_{m_n}(D_n)$$ and the pairs $(D_i,m_i)$ are unique up to permutation.

Proof. Since A is called semi-simple if it is semi-simple as a ring, we use the Wedderburn-Artin theorem for rings to get unique pairs $(D_i,m_i)$ of division rings $D_i$ and positive integers $m_i$ such that $$A\cong\text{Mat}_{m_1}(D_1)\times...\times \text{Mat}_{m_n}(D_n)$$ as rings. If we know that $\text{Mat}_{m_1}(D_1)\times...\times \text{Mat}_{m_n}(D_n)$ is a $K$-algebra then we can conclude with the two already proved facts above that the $D_i$ are not only division rings but division algebras. The only left point is: Why is $$A\cong\text{Mat}_{m_1}(D_1)\times...\times \text{Mat}_{m_n}(D_n)$$ an isomorphism of $K$-algebras?
 A: You can just repeat step by step the proof for rings, by observing that, if $S$ is a simple $R$-module, then $D=\operatorname{End}_R(S)$ is a $K$-algebra in a natural way and the same for the endomorphism ring of $S$ as a $D$-module.
By the way, you don't need $K$ to be a field; just a commutative ring suffices.
Anyway, you can just apply the first two parts. Since $A$ is a $K$-algebra to begin with, also each $\operatorname{Mat}_{m_i}(D_{i})$ is a $K$-algebra; then $D_i$ is a $K$-algebra. The way you build these structures of $K$-algebras ensure the initial isomorphism is an isomorphism of $K$-algebras.
Let's see why. First, assume $R\times S$ is a $K$-algebra; then also $R\times S/{0}\times S$ is a $K$-algebra. We use this structure and the obvious ring isomorphism $R\times S/{0}\times S\to R$ to endow $R$ with a structure of $K$-algebra. Similarly for $S$. Now you can consider $R\times S$ as a $K$-algebra; a priori the structure could be different from the initial one: prove it is indeed the same.
Suppose $\operatorname{Mat}_n(D)$ is a $K$-algebra, where $D$ is a division ring. Then we have a ring homomorphism $K\to\operatorname{Mat}_n(D)$, with the image contained in the center. The center is formed by the scalar matrices with entries in the center of $D$, so it is isomorphic to the center of $D$. We use this isomorphism for endowing $D$ with the structure of $K$-algebra, which induces on $\operatorname{Mat}_n(D)$ the same structure of $K$-algebra we started with.
A: Suppose that $A$ is a $K$-algebra which is semisimple as a ring and let $\phi:A\to \prod_iM_{m_i}(D_i)$ be the isomorphism given by A-W. For each $j$ the composition $$K\to A\xrightarrow\phi \prod_iM_{m_i}(D_i)\to M_{m_j}(D_j),$$ with the last map being the projection onto the $j$th factor, has image contained in the center of $M_{m_j}(D_j)$, which is isomorphic canonically to the center of $D_j$. This turns each $D_j$ into a $K$-algebra. 
Using this structure, show that $\phi$ is an isomorphism of $K$-algebras.
