Matrix
A matrix is a two-dimensional array of numbers. Each element can be indexed by its row and column position. Thus, a 3 x 2 matrix:

Transpose of a matrix
Swapping columns for rows in a matrix produces the transpose. Thus, the transpose of A is a 2 x 3 matrix:

Matrix addition
Matrix addition is defined as element-wise summation of two matrices with the same shape. Let A and B be two m x n matrices. Their sum C can be written as follows:
Ci,j = Ai,j + Bi,j
Scalar multiplication
Multiplication with a scalar produces a matrix where each element is scaled by the scalar value. Here A is multiplied by the scalar value d:

Matrix multiplication
Two matrices A and B can be multiplied if the number of columns of A equals the number of rows of B. If A has dimensions m x n and B has dimensions n x p, then the product AB has dimensions m x p:

Properties of matrix product
Distributivity over addition: A(B + C) = AB + AC
Associativity: A(BC) = (AB)C
Non-commutativity: AB ≠BA
Vector dot-product is commutative...