In mathematics, a matrix (plural: matrices) is a rectangular arrayof numbers, symbols, or expressions, arranged in rows and columns.For example, the dimensions of the matrix below are 2 × 3 (read “two by three”), because there are two rows and three columns:
Addition, scalar multiplication and transposition
Operation Definition Example Addition The sum A+B of two m-by-nmatrices A and B is calculated entrywise:
- (A + B)i,j = Ai,j + Bi,j, where 1 ≤ i ≤ m and 1 ≤ j≤ n.
Scalar multiplication The product cA of a number c (also called a scalar in the parlance of abstract algebra) and a matrix A is computed by multiplying every entry of A by c:
- (cA)i,j = c · Ai,j.
This operation is called scalar multiplication, but its result is not named “scalar product” to avoid confusion, since “scalar product” is sometimes used as a synonym for “inner product“.
Transposition The transpose of an m-by-nmatrix A is the n-by-m matrix AT (also denoted Atr or tA) formed by turning rows into columns and vice versa:
- (AT)i,j = Aj,i.
Familiar properties of numbers extend to these operations of matrices: for example, addition is commutative, that is, the matrix sum does not depend on the order of the summands: A + B = B + A. The transpose is compatible with addition and scalar multiplication, as expressed by (cA)T = c(AT) and (A + B)T = AT + BT. Finally, (AT)T = A.