{{Short description|Abelian group equipped with compatible ring action on both sides}} In abstract algebra, a '''bimodule''' is an abelian group that is both a left and a right module, such that the left and right multiplications are compatible. Besides appearing naturally in many parts of mathematics, bimodules play a clarifying role, in the sense that many of the relationships between left and right modules become simpler when they are expressed in terms of bimodules.

== Definition == If ''R'' and ''S'' are two rings, then an ''R''-''S''-'''bimodule''' is an abelian group {{nowrap|(''M'', +)}} such that: # ''M'' is a left ''R''-module with an operation '''·''' and a right ''S''-module with an operation <math>*</math>. # For all ''r'' in ''R'', ''s'' in ''S'' and ''m'' in ''M'': <math display="block">(r\cdot m)*s = r\cdot (m*s) .</math>

An ''R''-''R''-bimodule is also known as an ''R''-bimodule.

== Examples == * For positive integers ''n'' and ''m'', the set ''M''<sub>''n'',''m''</sub>('''R''') of {{nowrap|''n'' × ''m''}} matrices of real numbers is an {{nowrap|''R''-''S''-bimodule}}, where ''R'' is the ring ''M''<sub>''n''</sub>('''R''') of {{nowrap|''n'' × ''n''}} matrices, and ''S'' is the ring ''M''<sub>''m''</sub>('''R''') of {{nowrap|''m'' × ''m''}} matrices. Addition and multiplication are carried out using the usual rules of matrix addition and matrix multiplication; the heights and widths of the matrices have been chosen so that multiplication is defined. Note that ''M''<sub>''n'',''m''</sub>('''R''') itself is not a ring (unless {{nowrap|1=''n'' = ''m''}}), because multiplying an {{nowrap|''n'' × ''m''}} matrix by another {{nowrap|''n'' × ''m''}} matrix is not defined. The crucial bimodule property, that {{nowrap|1=(''r''.''x'').''s'' = ''r''.(''x''.''s'')}}, is the statement that multiplication of matrices is associative (which, in the case of a matrix ring, corresponds to associativity). * Any algebra ''A'' over a ring ''R'' has the natural structure of an ''R''-bimodule, with left and right multiplication defined by {{nowrap|1=''r''.''a'' = ''φ''(''r'')''a''}} and {{nowrap|1=''a''.''r'' = ''aφ''(''r'')}} respectively, where {{nowrap|''φ'' : ''R'' → ''A''}} is the canonical embedding of ''R'' into ''A''. * If ''R'' is a ring, then ''R'' itself can be considered to be an {{nowrap|''R''-''R''-bimodule}} by taking the left and right actions to be multiplication – the actions commute by associativity. This can be extended to ''R''<sup>''n''</sup> (the ''n''-fold direct product of ''R''). * Any two-sided ideal of a ring ''R'' is an {{nowrap|''R''-''R''-bimodule}}, with the ring multiplication both as the left and as the right multiplication. * Any module over a commutative ring ''R'' has the natural structure of a bimodule. For example, if ''M'' is a left module, we can define multiplication on the right to be the same as multiplication on the left. (However, not all ''R''-bimodules arise this way: other compatible right multiplications may exist.) * If ''M'' is a left ''R''-module, then ''M'' is an {{nowrap|''R''-'''Z'''-bimodule}}, where '''Z''' is the ring of integers. Similarly, right ''R''-modules may be interpreted as {{nowrap|'''Z'''-''R''-bimodules}}. Any abelian group may be treated as a {{nowrap|'''Z'''-'''Z'''-bimodule}}. * If ''M'' is a right ''R''-module, then the set {{nowrap|End<sub>''R''</sub>(''M'')}} of ''R''-module endomorphisms is a ring with the multiplication given by composition. The endomorphism ring {{nowrap|End<sub>''R''</sub>(''M'')}} acts on ''M'' by left multiplication defined by {{nowrap|1=''f''.''x'' = ''f''(''x'')}}. The bimodule property, that {{nowrap|1=(''f''.''x'').''r'' = ''f''.(''x''.''r'')}}, restates that ''f'' is a ''R''-module homomorphism from ''M'' to itself. Therefore any right ''R''-module ''M'' is an {{nowrap|End<sub>''R''</sub>(''M'')-''R''}}-bimodule. Similarly any left ''R''-module ''N'' is an {{nowrap|''R''-End<sub>''R''</sub>(''N'')<sup>op</sup>}}-bimodule. * If ''R'' is a subring of ''S'', then ''S'' is an {{nowrap|''R''-''R''-bimodule}}. It is also an {{nowrap|''R''-''S''-}} and an {{nowrap|''S''-''R''-bimodule}}. * If ''M'' is an ''S''-''R''-bimodule and ''N'' is an {{nowrap|''R''-''T''-bimodule}}, then {{nowrap|''M'' ⊗<sub>''R''</sub> ''N''}} is an ''S''-''T''-bimodule.

== Further notions and facts == If ''M'' and ''N'' are ''R''-''S''-bimodules, then a map {{nowrap|''f'' : ''M'' → ''N''}} is a ''bimodule homomorphism'' if it is both a homomorphism of left ''R''-modules and of right ''S''-modules.

An ''R''-''S''-bimodule is actually the same thing as a left module over the ring {{nowrap|''R'' ⊗<sub>'''Z'''</sub> ''S''<sup>op</sup>}}, where ''S''<sup>op</sup> is the opposite ring of ''S'' (where the multiplication is defined with the arguments exchanged). Bimodule homomorphisms are the same as homomorphisms of left {{nowrap|''R'' ⊗<sub>'''Z'''</sub> ''S''<sup>op</sup>}} modules. Using these facts, many definitions and statements about modules can be immediately translated into definitions and statements about bimodules. For example, the category of all {{nowrap|''R''-''S''-bimodules}} is abelian, and the standard isomorphism theorems are valid for bimodules. There are however some new effects in the world of bimodules, especially when it comes to the tensor product: if ''M'' is an {{nowrap|''R''-''S''-bimodule}} and ''N'' is an {{nowrap|''S''-''T''-bimodule}}, then the tensor product of ''M'' and ''N'' (taken over the ring ''S'') is an {{nowrap|''R''-''T''-bimodule}} in a natural fashion. This tensor product of bimodules is associative (up to a unique canonical isomorphism), and one can hence construct a category whose objects are the rings and whose morphisms are the bimodules. This is in fact a 2-category, in a canonical way – 2 morphisms between {{nowrap|''R''-''S''-bimodules}} ''M'' and ''N'' are exactly bimodule homomorphisms, i.e. functions : <math>f: M \rightarrow N</math> that satisfy # <math>f(m+m') = f(m)+ f(m')</math> # <math>f(r.m.s) = r.f(m).s</math>, for {{nowrap|''m'' ∈ ''M''}}, {{nowrap|''r'' ∈ ''R''}}, and {{nowrap|''s'' ∈ ''S''}}. One immediately verifies the interchange law for bimodule homomorphisms, i.e. : <math>(f'\otimes g')\circ (f\otimes g) = (f'\circ f)\otimes(g'\circ g) </math> holds whenever either (and hence the other) side of the equation is defined, and where <math>\circ</math> is the usual composition of homomorphisms. In this interpretation, the category {{nowrap|1='''End'''(''R'') = '''Bimod'''(''R'', ''R'')}} is exactly the monoidal category of {{nowrap|''R''-''R''-bimodules}} with the usual tensor product over ''R'' the tensor product of the category. In particular, if ''R'' is a commutative ring, every left or right ''R''-module is canonically an {{nowrap|''R''-''R''-bimodule}}, which gives a monoidal embedding of the category {{nowrap|1= ''R''-'''Mod'''}} into {{nowrap|1='''Bimod'''(''R'', ''R'')}}. The case that ''R'' is a field ''K'' is a motivating example of a symmetric monoidal category, in which case {{nowrap|1=''R''-'''Mod''' = ''K''-'''Vect'''}}, the category of vector spaces over ''K'', with the usual tensor product {{nowrap|1=⊗ = ⊗<sub>''K''</sub>}} giving the monoidal structure, and with unit ''K''. We also see that a monoid in {{nowrap|'''Bimod'''(''R'', ''R'')}} is exactly an ''R''-algebra.{{clarify|reason=Are we still requiring that ''R'' is commutative?|date=June 2024}}<ref name=arXiv>{{cite arXiv|last1=Street|first1=Ross|title=Categorical and combinatorial aspects of descent theory|date=20 Mar 2003|eprint=math/0303175 }}</ref> Furthermore, if ''M'' is an {{nowrap|''R''-''S''-bimodule}} and ''L'' is an {{nowrap|''T''-''S''-bimodule}}, then the set {{nowrap|Hom<sub>''S''</sub>(''M'', ''L'')}} of all ''S''-module homomorphisms from ''M'' to ''L'' becomes a {{nowrap|''T''-''R''-bimodule}} in a natural fashion. These statements extend to the derived functors Ext and Tor.

Profunctors can be seen as a categorical generalization of bimodules.

Note that bimodules are not at all related to bialgebras.

== See also == * Profunctor

== References == {{reflist}} * {{cite book | author=Jacobson, N. | author-link=Nathan Jacobson| title=Basic Algebra II | publisher=W. H. Freeman and Company | year=1989 | pages=133&ndash;136 | isbn=0-7167-1933-9 }} Category:Module theory