Background
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. Matrices are often labelled by capital letters, such as A, B, C, etc. Each element in a matrix is referred to by its row and column indices.
For example, consider the following matrix A:
This matrix has 3 rows and 3 columns, and its elements can be referred to as A_ij, where i is the row index and j is the column index. So, for example, A_12 = 2 and A_31 = 7.
Matrices can be used to represent large sets of data and operations can be performed on them such as matrix multiplication.
To perform matrix multiplication we need ...