Key idea: A 1×n row times an n×1 column gives a 1×1 matrix (multiply matching entries and add). An n×1 column times a 1×n row gives an n×n matrix whose (i,j) entry is (entry i of the column) × (entry j of the row). For square matrices of the same order both products exist, but they are usually different.
Step 1 — Part (i): find AB.
Here A is 1×3 and B is 3×1, so AB is 1×1.
AB=[4⋅2+(−2)⋅0+5⋅1]
AB=[13]
Step 2 — Part (i): find BA.
Here B is 3×1 and A is 1×3, so BA is 3×3. Each row of BA is one entry of B times the whole row A.
BA=2⋅40⋅41⋅42⋅(−2)0⋅(−2)1⋅(−2)2⋅50⋅51⋅5
BA=804−40−21005
Step 3 — Part (ii): find AB.
Here A is 1×4 and B is 4×1, so AB is 1×1.
AB=[1⋅1+2⋅2+3⋅3+4⋅4]
AB=[1+4+9+16]
AB=[30]
Step 4 — Part (ii): find BA.
Here B is 4×1 and A is 1×4, so BA is 4×4. The (i,j) entry is i×j.
BA=1234246836912481216
Step 5 — Part (iii): find AB.
Both matrices are 2×2. We multiply row by column.
AB=[3⋅0+5⋅00⋅0+0⋅03⋅11+5⋅70⋅11+0⋅7]
AB=[00680]
Step 6 — Part (iii): find BA.
Now B comes first.
BA=[0⋅3+11⋅00⋅3+7⋅00⋅5+11⋅00⋅5+7⋅0]
BA=[0000]
So BA is the zero matrix even though AB is not.
Step 7 — Part (iv): find AB.
Both matrices are 2×2. We multiply row by column.
AB=[1⋅4+2⋅52⋅4+3⋅51⋅5+2⋅62⋅5+3⋅6]
AB=[14231728]
Step 8 — Part (iv): find BA.
Now B comes first.
BA=[4⋅1+5⋅25⋅1+6⋅24⋅2+5⋅35⋅2+6⋅3]
BA=[14172328]
Here BA is the transpose of AB (because A and B are both symmetric), but the two products are still not equal.