is mapped non-injectively to the localization. Matrices Matrix multiplication is commonly defined for matrices over a field, and straightforwardly extended to matrices over rings, rngs and semirings. However, in this section, only matrices over a commutative ring are considered, because of the use of the concept of rank and determinant. If is a matrix (that is, a matrix with rows and columns), and is a matrix, the product is defined if , and only in this case. An identity matrix, that is, an identity element for matrix multiplication is a square matrix (same number for rows and columns) whose entries of the main diagonal are all equal to , and all other entries are . An invertible matrix is an invertible element under matrix multiplication. A matrix over a commutative ring is invertible if and only if its determinant is a unit in (that is, is invertible in . In this case, its inverse matrix can be computed with Cramer's rule. If is a field, the determinant is invertible if and only if it is not zero. As the case of fields is more common, one see often invertible matrices defined as matrices with a nonzero determinant, but this is incorrect over rings. In the case of integer matrices (that is, matrices with integer entries), an invertible matrix is a matrix that has an inverse that is also an integer matrix. Such a matrix is called a unimodular matrix for distinguishing it from matrices that are invertible over the real numbers. A square integer matrix is unimodular if and only if its determinant is or , since these two numbers are the only units in the ring of integers. A matrix has a left inverse if and only if its rank equals its number of columns. This left inverse is not unique except for square matrices where the left inverse equal the inverse matrix. Similarly, a right inverse exists if and only if the rank equals the number of rows; it is not unique in the case of a rectangular matrix, and equals the inverse matrix in the case of a square matrix. Functions, homomorphisms and morphisms Composition is a partial operation that generalizes to homomorphisms of algebraic structures and morphisms of categories into operations that are also called composition, and share many properties with function composition. In all the case, composition is associative. If and the composition is defined