m × n matrix C = A ∗ B = (c_{ij}) where c_{ij} = a_{ij} ∗ b_{ij}, ∀ i, j. Further it is easy to show that the binary operation thus defined on m × n matrices over S is associative. Therefore the collection of all m × n matrices over S together with the binary operation ∗ forms a semigroup. Additionally there is an action of the semigroup S on the m × n matrices over S given by r ∗ A = (r ∗ a_{ij}), ∀ r, a_{ij} ∈ S.
Consider the real numbers together with the associative binary operation +, the usual addition of real numbers, then A + B is the usual definition of matrix addition, but
r + A = (r + a_{ij}) is NOT the usual definition of r + A which usually is shorthand notation for rI + A where I is the n × n identity matrix and A is an n × n matrix.
Now consider the real numbers together with the associative binary operation ·, the usual multiplication of real numbers, then A · B = (a_{ij} · b_{ij}), is NOT the usual definition of matrix multiplication, whereas r · A = (r · a_{ij}) is the usual definition of the multiplication of a matrix (on the left) by a scalar.
If the binary operation of a semigroup is commutative, the semigroup is said to be an Abelian semigroup. If (S, ∗) is an Abelian semigroup, then the set of m × n matrices over S together with the binary operation ∗ forms an Abelian semigroup.
A monoid M is a semigroup with an identity element, an element e &isin M such that e ∗ x = x, &forall x &isin M. An Abelian monoid is an Abelian semigroup with an identity element. A group G is a monoid in which each element has an inverse, i.e. given x &isin G ∃ y &isin G such that
x ∗ y = e. An Abelian group is an Abelian monoid in which each element has an inverse.
An (associative) ring is a nonempty set R together with two binary operations denoted by +:R×R→R and ·:R×R→R written in infix form, called addition and multiplication respectively, such that the set R together with the + binary operation forms an Abelian group; multiplication is associative, x · (y · z) = (x · y) · z, ∀ x,y,z ∈ R; and the two distributive laws hold: x · (y + z) = (x · y) + (x · z), ∀ x,y,z ∈ R and
(y + z) · x = (xy · x) + (z · x), ∀ x,y,z ∈ R. The multiplication sign, ·, is usually omitted,
x y = x · y. Multiplication has precedence over addition: x y + z = (x y) + z and
x + y z = x + (y z). The additive identity is denoted by 0, the additive inverse is denoted by  and subtraction is defined by x  y = x + (y).
A ring R in which multiplication is commutative, x y = y x, ∀ x,y ∈ R, is called a commutative ring.
The multiplicative identity, if it exists, is denoted by 1 in which case 1 x = x. A ring R which contains a multiplicative identity is called a ring with a unit element.
Confusingly, if R is a commutative ring with a unit element, a unit is an invertible element in a ring, x is a unit if there exists a y such that x y = 1.
The addition of m × n matrices defined over a ring (a matrix with elements belonging to a ring) can be defined using the addition of the ring elements. If A = ( a_{ij} ) and B = ( b_{ij} ) are
m × n matrices then C = A + B = ( c_{ij} ), where c_{ij} = a_{ij} + b_{ij}, is an m × n matrix. Matrices defined over a ring can be muliplied by a scalar on either the left or the right, the result need not be the same unless the ring is a commutative ring, x A = ( x a_{ij} ) and A x = ( a_{ij} x ). The collection of m × n matrices defined over a ring R therefore forms a left Rmodule and a right Rmodule. Further if R is a commutative ring with a unit element then one can divide a matrix defined over R by a unit.
Matrix multiplication can be defined in terms of the addition and multiplication ring operations. Let A = ( a_{ij} ) be an m × n matrix and let B = ( b_{ij} ) be an n × p matrix then the m × p matrix
C = A B = ( c_{ij} ), where c_{ij} = Σ^{n}_{k = 1 }a_{ik} b_{kj}.
A division ring is a ring in which the nonzero elements form a group under multiplication. A field is a commutative division ring. If the determinant of a square n × n matrix A over a field is nonzero, the inverse of A exists and the system of linear equations A x = b can be solved for x. If every polynomial with coefficients in a field splits into linear factors, then the field is said to be algebraically closed. The n × n matrices over an algebraically closed field have n eigenvalues, which need not be distinct.
