Answer
a. $AB=\left[\begin{array}{lll}
3 & 4 & -3\\
-1 & 7 & -4\\
7 & 9 & -6
\end{array}\right]$
b. $BA=\left[\begin{array}{lll}
6 & -1 & -1\\
-4 & -11 & 19\\
4 & -7 & 9
\end{array}\right]$
Work Step by Step
A product of two matrices exists
if the first has as many columns
as the second matrix has rows.
The product of an $m\times\underline{n}$ matrix $A$ and an $\underline{n}\times p$ matrix $B$
is an $m\times p$ matrix $AB$.
a.
C=AB exists because
A is a $3\times\underline{3}$ matrix and B is a $\underline{3}\times 3$ matrix.
C is a 3$\times$3 matrix, $C=[c_{ij}]$,
where $c_{ij}$ is the (ith row of A) times (jth column of B)
$c_{11}=1(1)+(-1)(1)+1(3)=1-1+3=3$
$c_{12}=1(1)+(-1)(-4)+1(-1)=1+4-1=4$
and so on
$AB=\left[\begin{array}{lll}
1-1+3 & 1+4-1 & 0-5+2\\
5+0-6 & 5+0+2 & 0+0-4\\
3-2+6 & 3+8-2 & 0-10+4
\end{array}\right]$
$=\left[\begin{array}{lll}
3 & 4 & -3\\
-1 & 7 & -4\\
7 & 9 & -6
\end{array}\right]$
b.
D=BA exists because
B is a $3\times\underline{3}$ matrix and A is a $\underline{3}\times 3$ matrix.
D is a 3$\times$3 matrix, $C=[d_{ij}]$,
where $d_{ij}$ is the (ith row of B) times (jth column of A)
$d_{11}=1(1)+1(5)+0(3)=1+5+0=6,$
$d_{12}=1(-1)+1(0)+0(2)=-1+0+0=-1$
and so on.
$BA=\left[\begin{array}{lll}
1+5+0 & -1+0+0 & 1-2+0\\
1-20+15 & -1+0-10 & 1+8+10\\
3-5+6 & -3+0-4 & 3+2+4
\end{array}\right]$
$=\left[\begin{array}{lll}
6 & -1 & -1\\
-4 & -11 & 19\\
4 & -7 & 9
\end{array}\right]$