structural:summarization, structural:expansion, structural:scholar_edition, quality:corruption
Addition, scalar multiplication, subtraction and transposition

The sum A + B of two m -by- n matrices A and B is calculated entrywise:

For example,

The product c A of a number c (also called a scalar in this context) and a matrix A is computed by multiplying every entry of A by c:

This operation is called scalar multiplication, but its result is not named "scalar product" to avoid confusion, since "scalar product" is often used as a synonym for " inner product ". For example:

The subtraction of two m × n matrices is defined by composing matrix addition with scalar multiplication by –1:

The transpose of an m -by- n matrix A is the n -by- m matrix A (also denoted A or A) formed by turning rows into columns and vice versa:

For example:

Familiar properties of numbers extend to these operations on 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 (c A) = c (A) and (A + B) = A + B. Finally, (A) = A.