Let's solve the given matrices step by step.
### Part (i)
Given matrices:
\[ A = \begin{pmatrix} 2 & 3 & -1 \\ 0 & 1 & 2 \end{pmatrix}, \quad B = \begin{pmatrix} 2 & -6 \\ -4 & 0 \end{pmatrix} \]
**Step 1: Check if AB exists**
- Matrix A is of order \(2 \times 3\) (2 rows and 3 columns).
- Matrix B is of order \(2 \times 2\) (2 rows and 2 columns).
- For the product AB to exist, the number of columns in A must equal the number of rows in B. Here, 3 (columns of A) ≠ 2 (rows of B), so **AB does not exist**.
**Step 2: Check if BA exists**
- For BA, matrix B is \(2 \times 2\) and matrix A is \(2 \times 3\).
- The product BA can exist because the number of columns in B (2) equals the number of rows in A (2).
- The resulting matrix will be of order \(2 \times 3\).
**Step 3: Calculate BA**
\[
BA = B \cdot A = \begin{pmatrix} 2 & -6 \\ -4 & 0 \end{pmatrix} \cdot \begin{pmatrix} 2 & 3 & -1 \\ 0 & 1 & 2 \end{pmatrix}
\]
Calculating each element:
- First row, first column: \(2 \cdot 2 + (-6) \cdot 0 = 4\)
- First row, second column: \(2 \cdot 3 + (-6) \cdot 1 = 6 - 6 = 0\)
- First row, third column: \(2 \cdot (-1) + (-6) \cdot 2 = -2 - 12 = -14\)
- Second row, first column: \(-4 \cdot 2 + 0 \cdot 0 = -8\)
- Second row, second column: \(-4 \cdot 3 + 0 \cdot 1 = -12\)
- Second row, third column: \(-4 \cdot (-1) + 0 \cdot 2 = 4\)
Thus,
\[
BA = \begin{pmatrix} 4 & 0 & -14 \\ -8 & -12 & 4 \end{pmatrix}
\]
### Part (ii)
Given matrices:
\[ A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & -2 \\ -1 & 0 & -1 \end{pmatrix}, \quad B = \begin{pmatrix} 0 & 0 & 2 \\ 2 & 0 & 0 \\ 0 & 2 & 0 \end{pmatrix} \]
**Step 1: Check if AB exists**
- A is \(3 \times 3\) and B is \(3 \times 3\).
- Since the number of columns in A equals the number of rows in B, **AB exists**.
**Step 2: Calculate AB**
\[
AB = A \cdot B = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & -2 \\ -1 & 0 & -1 \end{pmatrix} \cdot \begin{pmatrix} 0 & 0 & 2 \\ 2 & 0 & 0 \\ 0 & 2 & 0 \end{pmatrix}
\]
Calculating each element:
- First row, first column: \(1 \cdot 0 + 2 \cdot 2 + 3 \cdot 0 = 4\)
- First row, second column: \(1 \cdot 0 + 2 \cdot 0 + 3 \cdot 2 = 6\)
- First row, third column: \(1 \cdot 2 + 2 \cdot 0 + 3 \cdot 0 = 2\)
- Second row, first column: \(0 \cdot 0 + 1 \cdot 2 + (-2) \cdot 0 = 2\)
- Second row, second column: \(0 \cdot 0 + 1 \cdot 0 + (-2) \cdot 2 = -4\)
- Second row, third column: \(0 \cdot 2 + 1 \cdot 0 + (-2) \cdot 0 = 0\)
- Third row, first column: \(-1 \cdot 0 + 0 \cdot 2 + (-1) \cdot 0 = 0\)
- Third row, second column: \(-1 \cdot 0 + 0 \cdot 0 + (-1) \cdot 2 = -2\)
- Third row, third column: \(-1 \cdot 2 + 0 \cdot 0 + (-1) \cdot 0 = -2\)
Thus,
\[
AB = \begin{pmatrix} 4 & 6 & 2 \\ 2 & -4 & 0 \\ 0 & -2 & -2 \end{pmatrix}
\]
**Step 3: Check if BA exists**
- For BA, B is \(3 \times 3\) and A is \(3 \times 3\).
- Since the number of columns in B equals the number of rows in A, **BA exists**.
**Step 4: Calculate BA**
\[
BA = B \cdot A = \begin{pmatrix} 0 & 0 & 2 \\ 2 & 0 & 0 \\ 0 & 2 & 0 \end{pmatrix} \cdot \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & -2 \\ -1 & 0 & -1 \end{pmatrix}
\]
Calculating each element:
- First row, first column: \(0 \cdot 1 + 0 \cdot 0 + 2 \cdot (-1) = -2\)
- First row, second column: \(0 \cdot 2 + 0 \cdot 1 + 2 \cdot 0 = 0\)
- First row, third column: \(0 \cdot 3 + 0 \cdot (-2) + 2 \cdot (-1) = -2\)
- Second row, first column: \(2 \cdot 1 + 0 \cdot 0 + 0 \cdot (-1) = 2\)
- Second row, second column: \(2 \cdot 2 + 0 \cdot 1 + 0 \cdot 0 = 4\)
- Second row, third column: \(2 \cdot 3 + 0 \cdot (-2) + 0 \cdot (-1) = 6\)
- Third row, first column: \(0 \cdot 1 + 2 \cdot 0 + 0 \cdot (-1) = 0\)
- Third row, second column: \(0 \cdot 2 + 2 \cdot 1 + 0 \cdot 0 = 2\)
- Third row, third column: \(0 \cdot 3 + 2 \cdot (-2) + 0 \cdot (-1) = -4\)
Thus,
\[
BA = \begin{pmatrix} -2 & 0 & -2 \\ 2 & 4 & 6 \\ 0 & 2 & -4 \end{pmatrix}
\]
### Part (iii)
Given matrices:
\[ A = \begin{pmatrix} 0 & 3 & 4 \\ 2 & 1 & -2 \\ 1 & -3 & -1 \end{pmatrix}, \quad B = \begin{pmatrix} 2 & 1 & 3 \\ -1 & 0 & -2 \end{pmatrix} \]
**Step 1: Check if AB exists**
- A is \(3 \times 3\) and B is \(2 \times 3\).
- Since the number of columns in A (3) does not equal the number of rows in B (2), **AB does not exist**.
**Step 2: Check if BA exists**
- For BA, B is \(2 \times 3\) and A is \(3 \times 3\).
- Since the number of columns in B (3) equals the number of rows in A (3), **BA exists**.
**Step 3: Calculate BA**
\[
BA = B \cdot A = \begin{pmatrix} 2 & 1 & 3 \\ -1 & 0 & -2 \end{pmatrix} \cdot \begin{pmatrix} 0 & 3 & 4 \\ 2 & 1 & -2 \\ 1 & -3 & -1 \end{pmatrix}
\]
Calculating each element:
- First row, first column: \(2 \cdot 0 + 1 \cdot 2 + 3 \cdot 1 = 0 + 2 + 3 = 5\)
- First row, second column: \(2 \cdot 3 + 1 \cdot 1 + 3 \cdot (-3) = 6 + 1 - 9 = -2\)
- First row, third column: \(2 \cdot 4 + 1 \cdot (-2) + 3 \cdot (-1) = 8 - 2 - 3 = 3\)
- Second row, first column: \(-1 \cdot 0 + 0 \cdot 2 + (-2) \cdot 1 = 0 + 0 - 2 = -2\)
- Second row, second column: \(-1 \cdot 3 + 0 \cdot 1 + (-2) \cdot (-3) = -3 + 0 + 6 = 3\)
- Second row, third column: \(-1 \cdot 4 + 0 \cdot (-2) + (-2) \cdot (-1) = -4 + 0 + 2 = -2\)
Thus,
\[
BA = \begin{pmatrix} 5 & -2 & 3 \\ -2 & 3 & -2 \end{pmatrix}
\]
### Summary of Results
1. **Part (i)**:
- AB does not exist.
- \( BA = \begin{pmatrix} 4 & 0 & -14 \\ -8 & -12 & 4 \end{pmatrix} \)
2. **Part (ii)**:
- \( AB = \begin{pmatrix} 4 & 6 & 2 \\ 2 & -4 & 0 \\ 0 & -2 & -2 \end{pmatrix} \)
- \( BA = \begin{pmatrix} -2 & 0 & -2 \\ 2 & 4 & 6 \\ 0 & 2 & -4 \end{pmatrix} \)
3. **Part (iii)**:
- AB does not exist.
- \( BA = \begin{pmatrix} 5 & -2 & 3 \\ -2 & 3 & -2 \end{pmatrix} \)