Evaluate the determinant of each matrix

-3 2 -3
0 -1 -1
3 0 -3

My answer is -36
The correct answer is -24 but I don't understand how they got the answer.

The algorithm I use sets it up this way:

D = -3(3-0) - 2(0 - (-3)) - 3(0 - (-3))
= -9 -6 - 9
= -24

KhanAcademy shows 2 basic methods

https://www.khanacademy.org/math/algebra-home/alg-matrices/alg-determinants-and-inverses-of-large-matrices/v/finding-the-determinant-of-a-3x3-matrix-method-2

https://www.khanacademy.org/math/algebra-home/alg-matrices/alg-determinants-and-inverses-of-large-matrices/v/finding-the-determinant-of-a-3x3-matrix-method-1

To evaluate the determinant of a matrix, you can use the method of cofactors.

Given the matrix:

-3 2 -3
0 -1 -1
3 0 -3

Step 1: Select any row or column to start with. In this example, let's choose the first row.

Step 2: For each entry in the chosen row or column, create a minor by removing the row and column containing that entry. In this case, the minors would be:

-1 -1
0 -3

2 -3
0 -3

Step 3: Multiply each entry in the chosen row or column by its corresponding minor, and then sum these products. In this case, the calculation would be:

-3 * -1 * det(-1 -1) + 2 * 0 * det(0 -3) + -3 * -3 * det(2 -3)

Step 4: Evaluate the determinants of each minor. In this case:

det(-1 -1) = -1 * -1 - (-1 * -1) = 1 - 1 = 0
det(0 -3) = 0 * -3 - (0 * -3) = 0 - 0 = 0
det(2 -3) = 2 * -3 - (0 * -3) = -6

Step 5: Substitute the determinants into the original calculation:

-3 * -1 * 0 + 2 * 0 * 0 + -3 * -3 * -6

Simplifying,

0 + 0 + 54 = 54

Therefore, the correct answer is 54, not -24 as you mentioned earlier.