# How do you multiply A = ((1,0,2),(3,-1,0),(0,5,1)) with B = ((1,1,0),(0,2,1),(3,-1,0))?

Sep 17, 2016

$\left[A B\right] = \left[\begin{matrix}7 & - 1 & 0 \\ 3 & 1 & - 1 \\ 3 & 9 & 5\end{matrix}\right]$.

$\left[B A\right] = \left[\begin{matrix}4 & - 1 & 2 \\ 6 & 3 & 1 \\ 0 & 1 & 6\end{matrix}\right]$.

#### Explanation:

The Multiplication can occur in two ways (1) :[AB, and, (2) : BA.

In General, $A B \ne B A$.

Let ${A}_{3 \times 3} = \left[{a}_{i j}\right]$ and ${B}_{3 \times 3} = \left[{b}_{j k}\right]$

For $A B$ to be defined, we must have,

No. of Columns in $A$=no. of Rows in $B$.

We find that this cond. is satisfied in our case, so, $A B$ is defined.

Let $A B = C = {\left[{c}_{i k}\right]}_{3 \times 3} ,$ where,

${c}_{i k} = {\sum}_{j = 1}^{j = 3} \left({a}_{i j} \cdot {b}_{j k}\right) , i , k = 1 , 2 , 3$.

$\therefore {c}_{11} = {\sum}_{j = 1}^{j = 3} \left({a}_{1 j} \cdot {b}_{j 1}\right) = {a}_{11} \cdot {b}_{11} + {a}_{12} \cdot {b}_{21} + {a}_{13} \cdot {b}_{31}$

$\therefore {c}_{11} = 1 \cdot 1 + 0 \cdot 0 + 2 \cdot 3 = 7$. Similarly,
${c}_{12} = 1 \cdot 1 + 0 \cdot 2 + 2 \left(- 1\right) = - 1$
${c}_{13} = 1 \cdot 0 + 0 \cdot 1 + 2 \cdot 0 = 0$

${c}_{21} = 3 \cdot 1 + \left(- 1\right) 0 + 0 \cdot 3 = 3$
${c}_{22} = 3 \cdot 1 + \left(- 1\right) 2 + 0 \cdot \left(- 1\right) = 1$
${c}_{23} = 3 \cdot 0 + \left(- 1\right) 1 + 0 \cdot 0 = - 1$

${c}_{31} = 0 \cdot 1 + 5 \cdot 0 + 1 \cdot 3 = 3$
${c}_{32} = 0 \cdot 1 + 5 \cdot 2 + 1 \cdot \left(- 1\right) = 9$
${c}_{33} = 0 \cdot 0 + 5 \cdot 1 + 1 \cdot 0 = 5$

$\therefore \left[C\right] = \left[A B\right] = \left[\begin{matrix}7 & - 1 & 0 \\ 3 & 1 & - 1 \\ 3 & 9 & 5\end{matrix}\right]$.

Similarly, we can work out, $\left[B A\right] = \left[\begin{matrix}4 & - 1 & 2 \\ 6 & 3 & 1 \\ 0 & 1 & 6\end{matrix}\right]$.

Enjoy Maths.!