Rings as algebras

I'm trying to make sense of two different definitions of an algebra over a ring. The definitions are as follows:

If R is a commutative ring, then
1) S is an R-algebra if S is an R-module and has a compatible ring structure (such that addition agrees)
2) If [itex] \alpha:R \to S [/itex] is a ring homomorphism such that [itex] \alpha(R) [/itex] is in the centre of S, then [itex] \alpha [/itex] is an R-algebra. We normally abuse notation in this instance and say that S is the R-algebra when [itex] \alpha [/itex] is understood.

I think the second definition is more technically valid, albeit more complicated. So my first question: Via the first definition, are all commutative rings R also R-algebras? It seems like this would be true, since R is an R-module over itself and it certainly has a compatible ring structure.

Secondly, I want to make sure we can get from the second definition the first. I think I can do it as follows:

I'm trying to make sense of two different definitions of an algebra over a ring. The definitions are as follows:

If R is a commutative ring, then
1) S is an R-algebra if S is an R-module and has a compatible ring structure (such that addition agrees)
2) If [itex] \alpha:R \to S [/itex] is a ring homomorphism such that [itex] \alpha(R) [/itex] is in the centre of S, then [itex] \alpha [/itex] is an R-algebra. We normally abuse notation in this instance and say that S is the R-algebra when [itex] \alpha [/itex] is understood.

I think the second definition is more technically valid, albeit more complicated. So my first question: Via the first definition, are all commutative rings R also R-algebras? It seems like this would be true, since R is an R-module over itself and it certainly has a compatible ring structure.

Yes, this is easily seen by taking the ring homomorphism [itex]\alpha:R\rightarrow R:x\rightarrow x[/itex]. So the second definition is verified. I guess we can call this the canonical algebra structure on a ring.

Secondly, I want to make sure we can get from the second definition the first. I think I can do it as follows:

Well, you must first find out what the first definition actually means. Here is the list of properties that must be verified:

S is a ring (this is trivial)

S is an R-module. The only things that need to be verified here are
[tex](r_1+r_2)s=r_1 s+r_2 s~\text{and}~r(s_1+s_2)=rs_1+rs_2~\text{and}~(r_1r_2)s=r_1(r_2 s)[/tex]
If R has a multiplicative identity 1, then we demand that 1s=s.

Compatibility of multiplication. We have a scalar multiplication . and a ring multiplication * in S. It must hold that
[tex]r.(s_1*s_2)=(rs_1)*s_2=s_1*(rs_2)[/tex]

Okay, so (2) is really just verification that we have given S an R-module structure, but that follows simply because [itex] \alpha [/itex] is a ring homomorphism. In particular, we don't need that [itex] \alpha(R) [/itex] is in the centre of S.

So maybe this is silly, but why is this definition of multiplicative compatibility necessary? Where does the theory break down if this isn't satisfied?

Edit: Or is this somehow just implied in the first definition? Namely that multiplication also behave in a "symmetric" manner with scalar multiplication?

In the second definition, the compatibility of multiplication is a consequence of the definition. What I'm not sure about is why this form of compatibility is implied in the first definition. I don't see what part of S being a ring or a module would require this scalar-symmetry. Clearly it's there for a reason, but I don't see why.

Okay, so (2) is really just verification that we have given S an R-module structure, but that follows simply because [itex] \alpha [/itex] is a ring homomorphism. In particular, we don't need that [itex] \alpha(R) [/itex] is in the centre of S.

So maybe this is silly, but why is this definition of multiplicative compatibility necessary? Where does the theory break down if this isn't satisfied?

Edit: Or is this somehow just implied in the first definition? Namely that multiplication also behave in a "symmetric" manner with scalar multiplication?

In the second definition, the compatibility of multiplication is a consequence of the definition. What I'm not sure about is why this form of compatibility is implied in the first definition. I don't see what part of S being a ring or a module would require this scalar-symmetry. Clearly it's there for a reason, but I don't see why.

What are you asking here?? Are you asking why the compatibility condition is there?

Sorry if I seem somewhat confused. I got that the condition that [itex] \alpha(R) [/itex] in the centre of S gives all the conditions that you gave, and in particular was necessary for the multiplicative compatibility. What I'm uncertain about is precisely where the compatibility condition comes from.

Namely, if we look over the definition of a ring and a module, there's nothing resembling that condition. I assume as such it arises precisely for its namesake; that is, to make the module and ring structures compatible. Is there some formal notion of "compatibility" of which I am unaware? Or is that condition something that becomes implicitly necessary in order to avoid some sort of contradiction when playing around with the algebra's operations?

Sorry if I seem somewhat confused. I got that the condition that [itex] \alpha(R) [/itex] in the centre of S gives all the conditions that you gave, and in particular was necessary for the multiplicative compatibility. What I'm uncertain about is precisely where the compatibility condition comes from.

Namely, if we look over the definition of a ring and a module, there's nothing resembling that condition. I assume as such it arises precisely for its namesake; that is, to make the module and ring structures compatible. Is there some formal notion of "compatibility" of which I am unaware? Or is that condition something that becomes implicitly necessary in order to avoid some sort of contradiction when playing around with the algebra's operations?

Ah you mean it that way!! No there is no a priori reason to accept compatibility. But a lot of the theory of algebra's depend on compatibility, so it is an axiom that we want to hold true.

In the same way, there is no reason to accept a compatibility between + and . That is, we may work in structures where a(b+c)=ab+bc doesn't hold. But this would limit our theory severely.