Defining matrix multiplication
Matrix multiplication can be a complicated procedure, and we will build up to it gradually. It is defined as an operation between an m × n matrix and an n × p matrix that produces an m × p matrix. The following screenshot shows this well:
Notice that matrix multiplication is only defined if the number of columns in the first matrix equals the number of rows in the second matrix—or, in other words, the ns have to match in our preceding figure. This is so important that we will give it a special name: the matrix multiplication definition rule, or definition rule for short. Based on this, the first thing you should do when presented with two matrices to multiply is to make sure they pass the definition rule. Otherwise, the operation is undefined. For example, do the following two matrices pass the definition rule?
The answer is no because you have...