Meera wants 2 pens and 5 story books; Nadeem needs 8 pens and 10 story books. At the first shop a pen costs ₹5 and a story book ₹50, so Meera needs 5×2+50×5=260 rupees and Nadeem 8×5+10×50=540 rupees.
The requirements form a 2×2 matrix and the prices a 2×1 matrix; multiplying each row of requirements by the price column gives the money needed:
[28510][550]=[5×2+50×58×5+10×50]=[260540]
Now suppose they check another shop where pens cost ₹4 and story books ₹40. Then Meera needs 4×2+40×5=208 rupees and Nadeem 8×4+10×40=432 rupees. Combining both price scenarios into one 2×2 price matrix:
The idea: take rows from the first matrix and columns from the second, multiply corresponding entries, and add them up.
Important
For matrix multiplication to be defined, the number of columns in the first matrix must equal the number of rows in the second matrix.
Formal Definition of Matrix Multiplication
Let A=[aij] be an m×n matrix and B=[bjk] an n×p matrix. The product AB is a matrix C=[cik] of order m×p. To find the element cik (in the i-th row and k-th column of the product), take the i-th row of A,
If A is m×n and B is k×l, then AB is defined iff n=k, and BA is defined iff l=m. Both AB and BA are defined iffn=kandl=m. In particular, if A and B are square of the same order n×n, both products are defined and are n×n.
Non-Commutativity of Matrix Multiplication
Even when both AB and BA are defined, they are not necessarily equal — matrix multiplication is not commutative. …