Let $A$ be an artinian ring and $B$ be an $A$algebra such that $B \otimes_A B \to B$ is an isomorphism, i.e. that $A \to B$ is an epimorphism in the category of commutative rings, see the Seminar Les épimorphismes d'anneaux for a detailed account. In Exposé 3, page 10, it is claimed that in this situation $A \to B$ is surjective. But the proof is only sketched and I don't understand it. Can someone fill in the details, or even better give a different proof? Remark that we may assume that $A$ is local artinian.
I won't be surprised if you already know this, but here is a proof for $A$ noetherian and/or $B$ finite over $A$: 0) We can replace $A$ with its image in $B$ and assume $A\rightarrow B$ is injective. 1) The result is clear if $A$ is a field. 2) The isomorphism $B\otimes_AB\rightarrow B$ descends to an isomorphism $\overline{B}\otimes_{\overline{A}}\overline{B}$, where the overbar means reduction mod the maximal ideal. From this and 1) we have surjectivity of $\overline{A}\rightarrow\overline{B}$. 3) Now if $A$ is noetherian we are done: By 2), $B=A+MB$ where $M$ is the maximal ideal in $A$; from this we have $B=A+M^nB$ for all $n$; but if $A$ is noetherian then $M$ is nilpotent so $B=A$. 4) Alternatively, if $B$ is finite as an $A$module, then the cokernel of $A\rightarrow B$ vanishes mod $M$ and hence vanishes by Nakayama. 


For completeness and so that I find something useful the next time I google for this:
A simple example is the inclusion $T\to M_2(k)$ of the algebra $T$ of upper triangular $2\times 2$ matrices into the full matrix algebra — that it is epic can be proven by hand. A general nonsense reason for this map to be epic is that it is a Cohn localization. Indeed, and more generally, if $Q$ is an acyclic quiver, the natural map from the path algebra $kQ$ to the Leavitt path algebra $L(Q)$ on $Q$ is a Cohn localization (one forces certain maps between certain projectives of $kQ$ to become isomorphisms) If $Q$ is of type $A_2$, then $kQ$ is $T$ and $L(Q)$ is $M_2(k)$. 

