Answer
a. $AB=[30]$
b. $BA=\left[\begin{array}{llll}
1 & 2 & 3 & 4\\
2 & 4 & 6 & 8\\
3 & 6 & 9 & 12\\
4 & 8 & 12 & 16
\end{array}\right]$
Work Step by Step
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$.
The element in the ith row and $j\mathrm{t}\mathrm{h}$ column of $AB$ is found by
multiplying each element in the ith row of $A$ by the corresponding element in the $j\mathrm{t}\mathrm{h}$ column of $B$
and adding the products.
-----------------
a.
$A$ is a $1\times\underline{4}$ matrix, B is a $\underline{4}\times 1$ matrix
$AB$ exists, and is a $1\times 1$ matrix (single number).
$AB=[1(1)+2(2)+3(3)+4(4)]=[1+4+9+16]$
$AB=[30]$
b.
$B$ is a $4\times\underline{1}$ matrix, $A$ is a $\underline{1}\times 4$ matrix
$BA$ exists, and is a $4\times 4$ matrix.
$BA=\left[\begin{array}{llll}
1(1) & 1(2) & 1(3) & 1(4)\\
2(1) & 2(2) & 2(3) & 2(4)\\
3(1) & 3(2) & 3(3) & 3(4)\\
4(1) & 4(2) & 4(3) & 4(4)
\end{array}\right]=\left[\begin{array}{llll}
1 & 2 & 3 & 4\\
2 & 4 & 6 & 8\\
3 & 6 & 9 & 12\\
4 & 8 & 12 & 16
\end{array}\right]$