# Problems on Matrix Multiplication

Here we will solve different types of Problems on Matrix Multiplication.

1. If A = $$\begin{bmatrix} 1 & -2 & 1\\ 2 & 1 & 3 \end{bmatrix}$$ and B = $$\begin{bmatrix} 2 & 1\\ 3 & 2\\ 1 & 1 \end{bmatrix}$$, write down the matrix AB. Would it be possible to find the product of BA? If so, compute it, and if not, give reasons.

Solutions:

Here, matrix A is of the order 2 × 3 and matrix B is of the order 3 × 2.

So, the number of columns in A = the number of rows in B = 3.

So, AB can found.

AB = $$\begin{bmatrix} 1 & -2 & 1\\ 2 & 1 & 3 \end{bmatrix}$$$$\begin{bmatrix} 2 & 1\\ 3 & 2\\ 1 & 1 \end{bmatrix}$$

= $$\begin{bmatrix} 1 \times 2 + (-2) \times 3 + 1 \times 1 & 1 \times 1 + (-2) \times 2 + 1 \times 1\\ 2 \times 2 + 1 \times 3 + 3 \times 1 & 2 \times 1 + 1 \times 2 + 3 \times 1 \end{bmatrix}$$

= $$\begin{bmatrix} -3 & -2\\ 10 & 7 \end{bmatrix}$$, which is a matrix of the order 2 × 2.

Now, the number of columns in B = the number of rows in A = 2. So, BA can be found, and the order of BA is 3 × 3.

BA = $$\begin{bmatrix} 2 & 1\\ 3 & 2\\ 1 & 1 \end{bmatrix}$$$$\begin{bmatrix} 1 & -2 & 1\\ 2 & 1 & 3 \end{bmatrix}$$

= $$\begin{bmatrix} 2 \times 1 + 1 \times 2 & 2 \times (-2) + 1 \times 1 & 2 \times 1 + 1 \times 3\\ 3 \times 1 + 2 \times 2 & 3 \times (-2) + 2 \times 1 & 3 \times 1 + 2 \times 3 \\ 1 \times 1 + 1 \times 2 & 1 \times (-2) + 1 \times 1 & 1 \times 1 + 1 \times 3 \end{bmatrix}$$

= $$\begin{bmatrix} 4 & -3 & 5\\ 7 & -4 & 9\\ 3 & -1 & 4 \end{bmatrix}$$

Clearly, we can see that AB ≠ BA because they are not of the same order.

2. Let A = $$\begin{bmatrix} 2 cos 60^{\circ} & -2 sin^{\circ}\\ -tan 45^{\circ} & cos 0^{\circ} \end{bmatrix}$$ and B = $$\begin{bmatrix} cot 45^{\circ} & csc 30^{\circ}\\ sec 60^{\circ} & sin 90^{\circ} \end{bmatrix}$$. Evaluate AB.

Solution:

AB = $$\begin{bmatrix} 2 cos 60^{\circ} & -2 sin^{\circ}\\ -tan 45^{\circ} & cos 0^{\circ} \end{bmatrix}$$$$\begin{bmatrix} cot 45^{\circ} & csc 30^{\circ}\\ sec 60^{\circ} & sin 90^{\circ} \end{bmatrix}$$

= $$\begin{bmatrix} 2 \cdot \frac{1}{2} & -2 \cdot \frac{1}{2}\\ -1 & 1 \end{bmatrix}$$$$\begin{bmatrix} -1 & 1\\ 1 & -1 \end{bmatrix}$$

= $$\begin{bmatrix} 1 & -1\\ -1 & 1 \end{bmatrix}$$$$\begin{bmatrix} 1 & 2\\ 2 & 1 \end{bmatrix}$$

= $$\begin{bmatrix} 1 \times 1 + (-1) \times 2 & 1 \times 2 + (-1) \times 1\\ (-1) \times 1 + 1 \times 2 & (-1) \times 2 + 1 \times 1 \end{bmatrix}$$

= $$\begin{bmatrix} -1 & 1\\ 1 & -1 \end{bmatrix}$$.

3. If A = $$\begin{bmatrix} 1 & 2\\ 2 & 1 \end{bmatrix}$$ and B = $$\begin{bmatrix} 2 & 1\\ 1 & 2 \end{bmatrix}$$, find A(BA).

Solution:

BA = $$\begin{bmatrix} 2 & 1\\ 1 & 2 \end{bmatrix}$$$$\begin{bmatrix} 1 & 2\\ 2 & 1 \end{bmatrix}$$

= $$\begin{bmatrix} 2 \times 1 + 1 \times 2 & 2 \times 2 + 1 \times 1\\ 1 \times 1 + 2 \times 2 & 1 \times 2 + 2 \times 1 \end{bmatrix}$$

= $$\begin{bmatrix} 4 & 5\\ 5 & 4 \end{bmatrix}$$.

Therefore, A(BA) = $$\begin{bmatrix} 1 & 2\\ 2 & 1 \end{bmatrix}$$$$\begin{bmatrix} 4 & 5\\ 5 & 4 \end{bmatrix}$$

= $$\begin{bmatrix} 1 \times 4 + 2 \times 5 & 1 \times 5 + 2 \times 4\\ 2 \times 4 + 1 \times 5 & 2 \times 5 + 1 \times 4 \end{bmatrix}$$

= $$\begin{bmatrix} 14 & 13\\ 13 & 14 \end{bmatrix}$$