In abstract algebra, a **matrix ring** is a set of matrices with entries in a ring *R* that form a ring under matrix addition and matrix multiplication (Lam 1999). The set of all *n* × *n* matrices with entries in *R* is a matrix ring denoted M_{n}(*R*)^{[1]}^{[2]}^{[3]}^{[4]} (alternative notations: Mat_{n}(*R*)^{[2]} and *R*^{n×n}^{[5]}). Some sets of infinite matrices form **infinite matrix rings**. Any subring of a matrix ring is a matrix ring. Over a rng, one can form matrix rngs.

When *R* is a commutative ring, the matrix ring M_{n}(*R*) is an associative algebra over *R*, and may be called a **matrix algebra**. In this setting, if *M* is a matrix and *r* is in *R*, then the matrix *rM* is the matrix *M* with each of its entries multiplied by *r*.

## Examples

- The set of all
*n*×*n*matrices over*R*, denoted M_{n}(*R*). This is sometimes called the "full ring of*n*-by-*n*matrices". - The set of all upper triangular matrices over
*R*. - The set of all lower triangular matrices over
*R*. - The set of all diagonal matrices over
*R*. This subalgebra of M_{n}(*R*) is isomorphic to the direct product of*n*copies of*R*. - For any index set
*I*, the ring of endomorphisms of the right*R*-module is isomorphic to the ring^{[citation needed]}of**column finite matrices**whose entries are indexed by*I*×*I*and whose columns each contain only finitely many nonzero entries. The ring of endomorphisms of*M*considered as a left*R*-module is isomorphic to the ring of**row finite matrices**. - If
*R*is a Banach algebra, then the condition of row or column finiteness in the previous point can be relaxed. With the norm in place, absolutely convergent series can be used instead of finite sums. For example, the matrices whose column sums are absolutely convergent sequences form a ring.^{[dubious – discuss]}Analogously of course, the matrices whose row sums are absolutely convergent series also form a ring.^{[dubious – discuss]}This idea can be used to represent operators on Hilbert spaces, for example. - The intersection of the row finite and column finite matrix rings forms a ring .
- If
*R*is commutative, then M_{n}(*R*) has a structure of a *-algebra over*R*, where the involution * on M_{n}(*R*) is matrix transposition. - If
*A*is a C*-algebra, then M_{n}(*A*) is another C*-algebra. If*A*is non-unital, then M_{n}(*A*) is also non-unital. By the Gelfand-Naimark theorem, there exists a Hilbert space*H*and an isometric *-isomorphism from*A*to a norm-closed subalgebra of the algebra*B*(*H*) of continuous operators; this identifies M_{n}(*A*) with a subalgebra of*B*(*H*^{}). For simplicity, if we further suppose that*H*is separable and*A**B*(*H*) is a unital C*-algebra, we can break up*A*into a matrix ring over a smaller C*-algebra. One can do so by fixing a projection*p*and hence its orthogonal projection 1 −*p*; one can identify*A*with , where matrix multiplication works as intended because of the orthogonality of the projections. In order to identify*A*with a matrix ring over a C*-algebra, we require that*p*and 1 −*p*have the same ″rank″; more precisely, we need that*p*and 1 −*p*are Murray–von Neumann equivalent, i.e., there exists a partial isometry*u*such that*p*=*uu** and 1 −*p*=*u***u*. One can easily generalize this to matrices of larger sizes. - Complex matrix algebras M
_{n}(**C**) are, up to isomorphism, the only finite-dimensional simple associative algebras over the field**C**of complex numbers. Prior to the invention of matrix algebras, Hamilton in 1853 introduced a ring, whose elements he called biquaternions^{[6]}and modern authors would call tensors in , that was later shown to be isomorphic to M_{2}(**C**). One basis of M_{2}(**C**) consists of the four matrix units (matrices with one 1 and all other entries 0); another basis is given by the identity matrix and the three Pauli matrices. - A matrix ring over a field is a Frobenius algebra, with Frobenius form given by the trace of the product:
*σ*(*A*,*B*) = tr(*AB*).

## Structure

- The matrix ring M
_{n}(*R*) can be identified with the ring of endomorphisms of the free right*R*-module of rank*n*; that is, M_{n}(*R*) ≅ End_{R}(*R*^{n}). Matrix multiplication corresponds to composition of endomorphisms. - The ring M
_{n}(*D*) over a division ring*D*is an Artinian simple ring, a special type of semisimple ring. The rings and are*not*simple and not Artinian if the set*I*is infinite, but they are still full linear rings. - The Artin–Wedderburn theorem states that every semisimple ring is isomorphic to a finite direct product , for some nonnegative integer
*r*, positive integers*n*_{i}, and division rings*D*_{i}. - When we view M
_{n}(**C**) as the ring of linear endomorphisms of**C**^{n}, those matrices which vanish on a given subspace V form a left ideal. Conversely, for a given left ideal*I*of M_{n}(**C**) the intersection of null spaces of all matrices in*I*gives a subspace of**C**^{n}. Under this construction, the left ideals of M_{n}(**C**) are in bijection with the subspaces of**C**^{n}. - There is a bijection between the two-sided ideals of M
_{n}(*R*) and the two-sided ideals of*R*. Namely, for each ideal*I*of*R*, the set of all*n*×*n*matrices with entries in*I*is an ideal of M_{n}(*R*), and each ideal of M_{n}(*R*) arises in this way. This implies that M_{n}(*R*) is simple if and only if*R*is simple. For*n*≥ 2, not every left ideal or right ideal of M_{n}(*R*) arises by the previous construction from a left ideal or a right ideal in*R*. For example, the set of matrices whose columns with indices 2 through*n*are all zero forms a left ideal in M_{n}(*R*). - The previous ideal correspondence actually arises from the fact that the rings
*R*and M_{n}(*R*) are Morita equivalent. Roughly speaking, this means that the category of left*R*-modules and the category of left M_{n}(*R*)-modules are very similar. Because of this, there is a natural bijective correspondence between the*isomorphism classes*of left*R*-modules and left M_{n}(*R*)-modules, and between the isomorphism classes of left ideals of*R*and left ideals of M_{n}(*R*). Identical statements hold for right modules and right ideals. Through Morita equivalence, M_{n}(*R*) inherits any Morita-invariant properties of*R*, such as being simple, Artinian, Noetherian, prime.

## Properties

- If
*S*is a subring of*R*, then M_{n}(*S*) is a subring of M_{n}(*R*). For example, M_{n}(**Z**) is a subring of M_{n}(**Q**). - The matrix ring M
_{n}(*R*) is commutative if and only if*n*= 0,*R*= 0, or*R*is commutative and*n*= 1. In fact, this is true also for the subring of upper triangular matrices. Here is an example showing two upper triangular 2 × 2 matrices that do not commute, assuming 1 ≠ 0:- and

- For
*n*≥ 2, the matrix ring M_{n}(*R*) over a nonzero ring has zero divisors and nilpotent elements; the same holds for the ring of upper triangular matrices. An example in 2 × 2 matrices would be - The center of M
_{n}(*R*) consists of the scalar multiples of the identity matrix in which the scalar belongs to the center of*R*. - The unit group of M
_{n}(*R*), consisting of the invertible matrices under multiplication, is denoted GL_{n}(*R*). - If
*F*is a field, then for any two matrices*A*and*B*in M_{n}(*F*), the equality*AB*= 1 implies*BA*= 1. This is not true for every ring*R*though. A ring*R*whose matrix rings all have the mentioned property is known as a stably finite ring (Lam 1999, p. 5).

## Matrix semiring

In fact, *R* needs to be only a semiring for M_{n}(*R*) to be defined. In this case, M_{n}(*R*) is a semiring, called the **matrix semiring**. Similarly, if *R* is a commutative semiring, then M_{n}(*R*) is a **matrix semialgebra**.

For example, if *R* is the Boolean semiring (the two-element Boolean algebra *R* = {0,1} with 1 + 1 = 1), then M_{n}(*R*) is the semiring of binary relations on an *n*-element set with union as addition, composition of relations as multiplication, the empty relation (zero matrix) as the zero, and the identity relation (identity matrix) as the unit.^{[7]}

## See also

- Central simple algebra
- Clifford algebra
- Hurwitz's theorem (normed division algebras)
- Generic matrix ring
- Sylvester's law of inertia

## References

**^**Lam,*A first course on noncommutative rings*, 2nd edition, Springer, 2001; Theorem 3.1.- ^
^{a}^{b}Lang,*Undergraduate algebra*, Springer, 2005; V.§3. **^**Serre,*Lie algebras and Lie groups*, 2nd edition, corrected 5th printing, Springer, 2006; p. 3.**^**Serre,*Local fields*, Springer, 1979; p. 158.**^**Artin,*Algebra*, Pearson, 2018; Example 3.3.6(a).**^**Lecture VII of Sir William Rowan Hamilton,*Lectures on quaternions*, Hodges and Smith, 1853.**^**Droste, M., & Kuich, W. (2009). Semirings and Formal Power Series.*Handbook of Weighted Automata*, 3–28. doi:10.1007/978-3-642-01492-5_1, pp. 7–10

- Lam, T. Y. (1999),
*Lectures on modules and rings*, Graduate Texts in Mathematics No. 189, Berlin, New York: Springer-Verlag, ISBN 978-0-387-98428-5

**Strategic Asset Allocation in Fixed Income Markets: A Matlab Based User′s Guide**

*Ken Nyholm -*

"An extremely useful book for anyone interested in actually applying MATLAB based computational techniques to fixed-income problems"

**Practical C++20 Financial Programming: Problem Solving for Quantitative Finance, Financial Engineering, Business, and Economics**

*Carlos Oliveira -*

Updated for C++20, this book covers those aspects of the language that are more frequently used in writing financial software.