Matrices are rectangular arrangements of elements. The dimension of a matrix is given with m × n where m is the number of rows and n is the number of columns. The elements are identified with subscripts giving the row, j, and column, k, shown as ajk for the elements of a matrix A.
When multiplying the matrices, the number of rows in the first matrix has to equal the number of columns in the second. Given matrices A and B where A has dimension 2 × 3 and B has the dimension3 × 2, the resulting matrices are found as follows: