Please help, getting a contradiction with non-commutative tensor products Let $D/{\mathbb Q}$ be a quaternion algebra and $K / {\mathbb Q}$ a quadratic field extension that is contained in $D$.
Then I would like to see $D$ as a module over $K \otimes_{\mathbb Q} D$ via the morphism
$$
\psi \colon K \otimes_{\mathbb Q} D \rightarrow End_{\mathbb Q}(D), \quad (k \otimes d) \mapsto (x \mapsto d \cdot x \cdot k).
$$
This should give $D$ the structure of an $K \otimes_{\mathbb Q} D$-module. Since $K \otimes_{\mathbb Q} D$ is a simple semi-simple $K$-algebra, we then have $D \cong (K \otimes_{\mathbb Q} D)^r$ for some $r$.
However, comparing dimensions gives me $r = \frac 12$, contradiction.
I do not understand what I am doing wrong. Could someone enlighten me?
 A: Since $\dim_\mathbb{Q}D=4$ and $\dim_\mathbb{Q}K=2$ we can say $D$ is $2$D as a right $K$-vector space.
The module structure is a $K$-algebra homomorphism $D\otimes_\mathbb{Q}K\to \mathrm{End}_K(D)$. Both sides of this have the same dimension as $K$-vector spaces, so to confirm this is an algebra isomorphism it suffices to show it is one-to-one, or equivalently its kernel is trivial.
Since $K$ is 2D over $\mathbb{Q}$, all elements of $A=D\otimes_\mathbb{Q} K$ are expressible as $d\otimes k$ or as a simple combination $d_1\otimes k_1+d_2\otimes k_2$. In the first case, we can apply such an algebra element to the module element $1\in D$ to get $dk=0$, which implies $d\otimes k=0$, so next assume there is a kernel element which is not a pure tensor; we can multiply such an element by a pure tensor to get a kernel element of the form $1\otimes1-d\otimes k$. If we apply this to the module element $1\in D$ we get $1-dk=0$, or IOW $d=k^{-1}$. The element $1\otimes1-k^{-1}\otimes k$ is $0$ if $k\in\mathbb{Q}$, so assume otherwise. Since $D$ is central simple over $\mathbb{Q}$, there exists an $\ell\in D$ for which $k\ell\ne\ell k$, and then if we apply $1\otimes1-k^{-1}\otimes k$ to $\ell$ we get $\ell-k^{-1}\ell k=0$, a contradiction, so the kernel is trivial.
Therefore we conclude $A\cong M_2(K)$ is not a simple module over itself and it makes sense $D\cong K^2$ can be a $K$-module over it. Indeed, $M_2(K)$ has two left ideals, corresponding to matrices with first or second column zeroed out, so there ought to be two corresponding ideals of $A$.
Suppose $K$ is generated over $\mathbb{Q}$ by a square root of $a\in\mathbb{Q}$ we call $u$. Then $\frac{1}{2a}(1\otimes a\pm u\otimes u)$ are two orthogonal idempotents $e_\pm$ yielding $A=Ae_+\oplus Ae_-$, just as planned.
We can refine this to the corresponding Peirce decompositions
$$ A\cong (e_+Ae_+) \oplus (e_+Ae_-) \oplus (e_-Ae_+) \oplus (e_-Ae_-) $$
$$ M_2(K) \,\cong\, 
[\begin{smallmatrix} K & 0 \\ 0 & 0 \end{smallmatrix}] \,\oplus\,
[\begin{smallmatrix} 0 & K \\ 0 & 0 \end{smallmatrix}] \,\oplus\,
[\begin{smallmatrix} 0 & 0 \\ K & 0 \end{smallmatrix}] \,\oplus\,
[\begin{smallmatrix} 0 & 0 \\ 0 & K \end{smallmatrix}] $$
and the isomorphism $A\cong M_2(K)$ respects the graded $K$-algebra structures above.
