Mathematical Rule:
For a multiplication to succeed, the number of columns in the first matrix {one in the first example below} must match the number of rows {two in the first example below} in the second matrix. Otherwise the operation will not be permitted. For example:
| ⌈ | a | ⌉ | ⌈ | p | ⌉ | ||
| | | | | × | | | | | ⇨ will crash & will not produce any successful result! | ||
| ⌊ | b | ⌋ | ⌊ | q | ⌋ |
By contrast, Xm×r·Yr×n=Zm×n would succeed because r = r ...
Exceptional Property:
Consequently, the commutative rule does not apply for matrices multiplication:
X · Y ≠ Y · X