# Compute the products $A B$ and $B A$ whichever exists in each of the following cases:

Question:

Compute the products $A B$ and $B A$ whichever exists in each of the following cases:

(i) $A=\left[\begin{array}{rr}1 & -2 \\ 2 & 3\end{array}\right]$ and $B=\left[\begin{array}{lll}1 & 2 & 3 \\ 2 & 3 & 1\end{array}\right]$

(ii) $A=\left[\begin{array}{rr}3 & 2 \\ -1 & 0 \\ -1 & 1\end{array}\right]$ and $B=\left[\begin{array}{lll}4 & 5 & 6 \\ 0 & 1 & 2\end{array}\right]$

(iii) $A=\left[\begin{array}{lll}1 & -1 & 2 & 3\end{array}\right]$ and $B=\left[\begin{array}{l}0 \\ 1 \\ 3 \\ 2\end{array}\right]$

(iv) $[a, b]\left[\begin{array}{l}c \\ d\end{array}\right]+[a, b, c, d]\left[\begin{array}{l}a \\ b \\ c \\ d\end{array}\right]$

Solution:

(i) $A B=\left[\begin{array}{cc}1 & -2 \\ 2 & 3\end{array}\right]\left[\begin{array}{lll}1 & 2 & 3 \\ 2 & 3 & 1\end{array}\right] \Rightarrow A B=\left[\begin{array}{ccc}1-4 & 2-6 & 3-2 \\ 2+6 & 4+9 & 6+3\end{array}\right] \Rightarrow A B=\left[\begin{array}{ccc}-3 & -4 & 1 \\ 8 & 13 & 9\end{array}\right]$

Since the number of columns in is greater then the number of rows in ABA does not exists.

(ii) $A B=\left[\begin{array}{cc}3 & 2 \\ -1 & 0 \\ -1 & 1\end{array}\right]\left[\begin{array}{lll}4 & 5 & 6 \\ 0 & 1 & 2\end{array}\right]$

$\Rightarrow A B=\left[\begin{array}{ccc}12+0 & 15+2 & 18+4 \\ -4+0 & -5+0 & -6+0 \\ -4+0 & -5+1 & -6+2\end{array}\right]$

$\Rightarrow A B=\left[\begin{array}{ccc}12 & 17 & 22 \\ -4 & -5 & -6 \\ -4 & -4 & -4\end{array}\right]$ Also, $B A=\left[\begin{array}{lll}4 & 5 & 6 \\ 0 & 1 & 2\end{array}\right]\left[\begin{array}{cc}3 & 2 \\ -1 & 0 \\ -1 & 1\end{array}\right]$

$\Rightarrow B A=\left[\begin{array}{cc}12-5-6 & 8+0+6 \\ 0-1-2 & 0+0+2\end{array}\right]$

$\Rightarrow B A=\left[\begin{array}{cc}1 & 14 \\ -3 & 2\end{array}\right]$

(iii) $A B=\left[\begin{array}{llll}1 & -1 & 2 & 3\end{array}\right]\left[\begin{array}{l}0 \\ 1 \\ 3 \\ 2\end{array}\right]$

$\Rightarrow A B=[0+(-1)+6+6]$

$\Rightarrow A B=\left[\begin{array}{l}11\end{array}\right]$ Also $B A=\left[\begin{array}{l}0 \\ 1 \\ 3 \\ 2\end{array}\right]\left[\begin{array}{llll}1 & -1 & 2 & 3\end{array}\right]$

Also,

$B A=\left[\begin{array}{l}0 \\ 1 \\ 3 \\ 2\end{array}\right]\left[\begin{array}{llll}1 & -1 & 2 & 3\end{array}\right]$

$\Rightarrow B A=\left[\begin{array}{cccc}0 & 0 & 0 & 0 \\ 1 & -1 & 2 & 3 \\ 3 & -3 & 6 & 9 \\ 2 & -2 & 4 & 6\end{array}\right]$

(iv)

$\left[\begin{array}{ll}a & b\end{array}\right]\left[\begin{array}{l}c \\ d\end{array}\right]+\left[\begin{array}{llll}a & b & c & d\end{array}\right]\left[\begin{array}{l}a \\ b \\ c \\ d\end{array}\right]$

\begin{aligned} \Rightarrow &[a c+b d]+\left[a^{2}+b^{2}+c^{2}+d^{2}\right] \\ &\left[a^{2}+b^{2}+c^{2}+d^{2}+a c+b d\right] \end{aligned}