Here the number of columns in A=3 = the number of rows in B.
Therefore the product AB is defined.
AB=⎡⎢⎣012123234⎤⎥⎦R1R2R3×⎡⎢
⎢
⎢⎣C1C21−2−102−1⎤⎥
⎥
⎥⎦
R1, R2, R3 are rows of A and C1, C2 are columns of B.
∴AB=⎡⎢⎣R1C1R1C2R2C1R2C2R3C1R3C2⎤⎥⎦3×2
=⎡⎢⎣0×1+1×(−1)+2×20×(−2)+1×0+2×(−1)1×1+2×(−1)+3×21×(−2)+2×0+3×(−1)2×1+3×(−1)+4×22×(−2)+3×0+4×(−1)⎤⎥⎦3×2
=⎡⎢⎣0−1+40+0−21−2+6−2+0−32−3+8−4+0−4⎤⎥⎦3×2
=⎡⎢⎣3−25−57−8⎤⎥⎦3×2
Since
the number of columns of B is 2 and the number of rows of A
is 3. BA is not defined. (∵ 2≠3)