Matrix ring

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. The set of all n × n matrices with entries in R is a matrix ring denoted Mn(R) (alternative notations: Matn(R) and Rn×n). Some sets of infinite matrices form infinite matrix rings. A subring of a matrix ring is again a matrix ring. Over a rng, one can form matrix rngs.

When R is a commutative ring, the matrix ring Mn(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 square matrices over R, denoted Mn(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 Mn(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 $M=\bigoplus_{i\in I}R$ is isomorphic to the ring $$\mathbb{CFM}_I(R)$$ 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 $$\mathbb{RFM}_I(R)$$ 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.  Analogously of course, the matrices whose row sums are absolutely convergent series also form a ring.  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 $$\mathbb{RCFM}_I(R)$$.
 * If R is commutative, then Mn(R) has a structure of a *-algebra over R, where the involution * on Mn(R) is matrix transposition.
 * If A is a C*-algebra, then Mn(A) is another C*-algebra. If A is non-unital, then Mn(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 Mn(A) with a subalgebra of B(H⊕n). For simplicity, if we further suppose that H is separable and A $$\subseteq$$ 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 $\begin{pmatrix} pAp & pA(1-p) \\ (1-p)Ap & (1-p)A(1-p) \end{pmatrix}$, 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 Mn(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 and modern authors would call tensors in C ⊗R H, that was later shown to be isomorphic to M2(C). One basis of M2(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 Mn(R) can be identified with the ring of endomorphisms of the free right R-module of rank n; that is, Mn(R) ≅ EndR(Rn). Matrix multiplication corresponds to composition of endomorphisms.
 * The ring Mn(D) over a division ring D is an Artinian simple ring, a special type of semisimple ring. The rings $$\mathbb{CFM}_I(D)$$ and $$\mathbb{RFM}_I(D)$$ 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 $\prod_{i=1}^r \operatorname{M}_{n_i}(D_i)$, for some nonnegative integer r, positive integers ni, and division rings Di.
 * When we view Mn(C) as the ring of linear endomorphisms of Cn, those matrices which vanish on a given subspace V form a left ideal. Conversely, for a given left ideal I of Mn(C) the intersection of null spaces of all matrices in I gives a subspace of Cn. Under this construction, the left ideals of Mn(C) are in bijection with the subspaces of Cn.
 * There is a bijection between the two-sided ideals of Mn(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 Mn(R), and each ideal of Mn(R) arises in this way.  This implies that Mn(R) is simple if and only if R is simple. For n ≥ 2, not every left ideal or right ideal of Mn(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 Mn(R).
 * The previous ideal correspondence actually arises from the fact that the rings R and Mn(R) are Morita equivalent. Roughly speaking, this means that the category of left R-modules and the category of left Mn(R)-modules are very similar. Because of this, there is a natural bijective correspondence between the isomorphism classes of left R-modules and left Mn(R)-modules, and between the isomorphism classes of left ideals of R and left ideals of Mn(R). Identical statements hold for right modules and right ideals. Through Morita equivalence, Mn(R) inherits any Morita-invariant properties of R, such as being simple, Artinian, Noetherian, prime.

Properties
\begin{bmatrix} 1 & 0 \\   0 & 0   \end{bmatrix} \begin{bmatrix} 1 & 1 \\   0 & 0  \end{bmatrix} = \begin{bmatrix} 1 & 1 \\   0 & 0  \end{bmatrix} $$   1 & 1 \\    0 & 0   \end{bmatrix} \begin{bmatrix} 1 & 0 \\   0 & 0  \end{bmatrix} = \begin{bmatrix} 1 & 0 \\   0 & 0  \end{bmatrix}. $$   0 & 1 \\    0 & 0   \end{bmatrix} \begin{bmatrix} 0 & 1 \\   0 & 0  \end{bmatrix} = \begin{bmatrix} 0 & 0 \\   0 & 0  \end{bmatrix}. $$
 * If S is a subring of R, then Mn(S) is a subring of Mn(R). For example, Mn(Z) is a subring of Mn(Q).
 * The matrix ring Mn(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 in R:
 * and
 * $$ \begin{bmatrix}
 * For n ≥ 2, the matrix ring Mn(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
 * $$ \begin{bmatrix}
 * The center of Mn(R) consists of the scalar multiples of the identity matrix, In, in which the scalar belongs to the center of R.
 * The unit group of Mn(R), consisting of the invertible matrices under multiplication, is denoted GLn(R).
 * If F is a field, then for any two matrices A and B in Mn(F), the equality AB = In implies BA = In. 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.

Matrix semiring
In fact, R needs to be only a semiring for Mn(R) to be defined. In this case, Mn(R) is a semiring, called the matrix semiring. Similarly, if R is a commutative semiring, then Mn(R) is a .

For example, if R is the Boolean semiring (the two-element Boolean algebra R = $\{0, 1\}$ with 1 + 1 = 1), then Mn(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 unity.