Determinant 3X3
1. **State the problem:** Find the determinant $D$ of the $3\times3$ matrix:
$$D = \begin{bmatrix} 1 & 2 & 1 \\ 3 & 1 & 2 \\ 2 & 1 & 4 \end{bmatrix}$$
2. **Recall the formula for the determinant of a $3\times3$ matrix:**
$$\det(D) = a(ei - fh) - b(di - fg) + c(dh - eg)$$
where the matrix is:
$$\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}$$
3. **Identify elements:**
$$a = 1, b = 2, c = 1$$
$$d = 3, e = 1, f = 2$$
$$g = 2, h = 1, i = 4$$
4. **Calculate each term:**
- $ei - fh = 1 \times 4 - 2 \times 1 = 4 - 2 = 2$
- $di - fg = 3 \times 4 - 2 \times 2 = 12 - 4 = 8$
- $dh - eg = 3 \times 1 - 1 \times 2 = 3 - 2 = 1$
5. **Compute the determinant:**
$$\det(D) = 1 \times 2 - 2 \times 8 + 1 \times 1 = 2 - 16 + 1 = -13$$
6. **Final answer:** The determinant of matrix $D$ is $\boxed{-13}$.
**Note:** The user’s answer was -31, but the correct calculated determinant is -13.