Matrix Multiplication
You can multiply two matrices if, and only if, the number of
columns in the first matrix equals the number of
rows in the second matrix. Otherwise, the product of two matrices is undefined.
The product matrix's dimensions are
(rows of first matrix) × (columns of the second matrix )
In the picture on the left, the matrices can be multiplied since the number of
columns in the 1st one, matrix A, equals the number of
rows in the 2
nd, matrix B.
Generalized Example
If we multiply a 2×3 matrix with a 3×1 matrix, the product matrix is 2×1
Here is how we get M
11 and M
22 in the product.
M11 = r11× t11 + r12× t21 + r13×t31
M12 = r21× t11 + r22× t21 + r23×t31
Matrix C and D below
cannot be multiplied together because the number of
columns in C
does not equal the number of rows in D. In this case, the multiplication of these two matrices is not defined.