Equivalent definition of an algebra

I believe that an $R$ module is nothing but an abelian group $G$ together with a ring homomorphism $R \to \text{End}_{\mathsf{Ab}}(G)$. So is an equivalent characterization of an $R$ algebra a ring $A$ with a homomorphism $R \to \text{End}_{\mathsf{Ring}}(A)$? Does this definition apply equally mutatis mutandis when $A$ is not unital, or when $R$ is not commutative, or when $R$ has no unity?

• When $R$ is not commutative, the notion of an $R$-algebra depends on whom you ask. – darij grinberg Jan 12 '15 at 21:24
• A homomorphism $R \to \operatorname{End}_{\mathrm{Ring}} A$ is not the same as an $R$-algebra structure on the ring $A$. Indeed, scalar multiplication rarely acts as ring homomorphisms, and $\operatorname{End}_{\mathrm{Ring}} A$ is not a ring! – darij grinberg Jan 12 '15 at 21:25
• What you want is a ring homomorphism $R \to A$ when $A$ is unital commutative; then define $r \cdot a=f(r)a$. Conversely every $R$-algebra structure on $A$ comes from such a map; define $f(r)=r \cdot 1$. I don't know if you can salvage this without a unit, but what sick ring doesn't have a unit? – user98602 Jan 12 '15 at 21:42
• Why should it be? A sum of two ring maps is not generally a ring map. – darij grinberg Jan 13 '15 at 0:41

Algebras over noncommutative rings are rarely studied. If $A$ is an $R$ algebra, we're fine with $A$ being noncommutative, but we'd like to retain the property that elements of $R$ commute with elements of $A$.
For this reason, the "usual" counterpart to your definition of an $R$ module is this:
An $R$ algebra is a ring $A$ and (unital) ring homorphism from $R\to Center(A)$.
I suppose you could venture into dropping the condition that the map preserves identity if you liked, but the image of $R$ still ought to be central.
One can try to define an $R$ algebra $A$ over a noncommutative ring $R$ by asking for $A$ to be an $R,R$ bimodule, such that $(ra)b=r(ab)$ and $(ar)b=a(rb)$ and $a(br)=(ab)r$ for all choices of $a,b\in A$ and $r\in R$, but then you are dealing with a much more general (and potentially pathological) object.