To find the product of the matrices \( AB \) and \( BA \), we will follow the matrix multiplication rules, which involve taking the dot product of rows from the first matrix with columns from the second matrix.
### Given Matrices:
\[
A = \begin{pmatrix}
1 & 2 & 3 \\
2 & 3 & 4 \\
-1 & 1 & 2
\end{pmatrix}, \quad
B = \begin{pmatrix}
0 & 2 & -1 \\
0 & 3 & 4 \\
0 & -2 & -3
\end{pmatrix}
\]
### Step 1: Calculate \( AB \)
To find \( AB \), we will compute each element of the resulting matrix by taking the dot product of the rows of \( A \) with the columns of \( B \).
1. **First Row of \( AB \)**:
- \( (1, 2, 3) \cdot (0, 0, 0) = 1 \cdot 0 + 2 \cdot 0 + 3 \cdot 0 = 0 \)
- \( (1, 2, 3) \cdot (2, 3, -2) = 1 \cdot 2 + 2 \cdot 3 + 3 \cdot -2 = 2 + 6 - 6 = 2 \)
- \( (1, 2, 3) \cdot (-1, 4, -3) = 1 \cdot -1 + 2 \cdot 4 + 3 \cdot -3 = -1 + 8 - 9 = -2 \)
2. **Second Row of \( AB \)**:
- \( (2, 3, 4) \cdot (0, 0, 0) = 2 \cdot 0 + 3 \cdot 0 + 4 \cdot 0 = 0 \)
- \( (2, 3, 4) \cdot (2, 3, -2) = 2 \cdot 2 + 3 \cdot 3 + 4 \cdot -2 = 4 + 9 - 8 = 5 \)
- \( (2, 3, 4) \cdot (-1, 4, -3) = 2 \cdot -1 + 3 \cdot 4 + 4 \cdot -3 = -2 + 12 - 12 = -2 \)
3. **Third Row of \( AB \)**:
- \( (-1, 1, 2) \cdot (0, 0, 0) = -1 \cdot 0 + 1 \cdot 0 + 2 \cdot 0 = 0 \)
- \( (-1, 1, 2) \cdot (2, 3, -2) = -1 \cdot 2 + 1 \cdot 3 + 2 \cdot -2 = -2 + 3 - 4 = -3 \)
- \( (-1, 1, 2) \cdot (-1, 4, -3) = -1 \cdot -1 + 1 \cdot 4 + 2 \cdot -3 = 1 + 4 - 6 = -1 \)
Thus, the product \( AB \) is:
\[
AB = \begin{pmatrix}
0 & 2 & -2 \\
0 & 5 & -2 \\
0 & -3 & -1
\end{pmatrix}
\]
### Step 2: Calculate \( BA \)
Now, we will calculate \( BA \) using the same method.
1. **First Row of \( BA \)**:
- \( (0, 2, -1) \cdot (1, 2, 3) = 0 \cdot 1 + 2 \cdot 2 + -1 \cdot 3 = 0 + 4 - 3 = 1 \)
- \( (0, 2, -1) \cdot (2, 3, 4) = 0 \cdot 2 + 2 \cdot 3 + -1 \cdot 4 = 0 + 6 - 4 = 2 \)
- \( (0, 2, -1) \cdot (-1, 1, 2) = 0 \cdot -1 + 2 \cdot 1 + -1 \cdot 2 = 0 + 2 - 2 = 0 \)
2. **Second Row of \( BA \)**:
- \( (0, 3, 4) \cdot (1, 2, 3) = 0 \cdot 1 + 3 \cdot 2 + 4 \cdot 3 = 0 + 6 + 12 = 18 \)
- \( (0, 3, 4) \cdot (2, 3, 4) = 0 \cdot 2 + 3 \cdot 3 + 4 \cdot 4 = 0 + 9 + 16 = 25 \)
- \( (0, 3, 4) \cdot (-1, 1, 2) = 0 \cdot -1 + 3 \cdot 1 + 4 \cdot 2 = 0 + 3 + 8 = 11 \)
3. **Third Row of \( BA \)**:
- \( (0, -2, -3) \cdot (1, 2, 3) = 0 \cdot 1 + -2 \cdot 2 + -3 \cdot 3 = 0 - 4 - 9 = -13 \)
- \( (0, -2, -3) \cdot (2, 3, 4) = 0 \cdot 2 + -2 \cdot 3 + -3 \cdot 4 = 0 - 6 - 12 = -18 \)
- \( (0, -2, -3) \cdot (-1, 1, 2) = 0 \cdot -1 + -2 \cdot 1 + -3 \cdot 2 = 0 - 2 - 6 = -8 \)
Thus, the product \( BA \) is:
\[
BA = \begin{pmatrix}
1 & 2 & 0 \\
18 & 25 & 11 \\
-13 & -18 & -8
\end{pmatrix}
\]
### Final Results:
\[
AB = \begin{pmatrix}
0 & 2 & -2 \\
0 & 5 & -2 \\
0 & -3 & -1
\end{pmatrix}, \quad
BA = \begin{pmatrix}
1 & 2 & 0 \\
18 & 25 & 11 \\
-13 & -18 & -8
\end{pmatrix}
\]