to obtain the determinant of a matrix of order 3X3 you can apply 2 methods:

Sarrus: It is oriented to matrices only in this order. The strategy is to add the first 2 rows of the matrix to the end of the matrix and multiply each element of each diagonal (by left and right) creating a subset of each side. The subtraction of the left subset and the right gives you the determinant. Here is an example of what I just explained to make it more useful.

Suppose you have this matrix:

```
1 2 0
3 -1 4
5 2 -2
```

1) Copy the first 2 rows at the end of the matrix

```
1 2 0
3 -1 4
5 2 -2
1 2 0
3 -1 4
```

2) The part of creating the aforementioned subsets would be as follows
link (apology for quality)

Both the left and the right side obtain 3 sub sets.
(1, -1, -2), (3, 2, 0) and (5, 2, 4) by the left

(0, -1, 5), (4, 2, 1) and (-2, 2, 3) by the right

3) As a third step you have to multiply the elements within each subset and add the subsets that are on the same side.

Left side: from this side, the values are obtained from each multiplication:
2, from the first left subset, 0, from the second and 40 from the third. Adding these values you get the number 42. That is to say that the left subset has a value of 42.

Then we do the same with the right: we get 0 of the first subset, 8 of the second and -12 of the third. Adding these values (8 + (-12)) = -4. That is to say that the right subset has a value of -4.

4) As a last step subtract the values of the left subset with the right.
Left subset - Right subset = determinant

```
42 - (-4) = 46
```

In conclusion, the determinant of the matrix is 46.

As a second option you can apply the LaPlace method that is oriented to arrays of order NxN or simply of order N. Such that N> = 3 since in lower matrices (such as those of order 2) the determinant is calculated making the product of the main diagonal minus that of the secondary, which will be used later.
This theory says that the sum of the products of each element of a region (row or column) by the determinant of its attached matrix (it would be a matrix of order N-1) results in the determinant of it.

Using the matrix from the previous example:

```
1 2 0
3 -1 4
5 2 -2
```

1) Select a row or column of any matrix (for ease of choice, choose the one with the most elements in 0). The row 1 `(1, 2, 0)`

will be chosen.

2) To calculate the determinant of the matrix of order 2 (the one attached to the original), what is done is to "cover" the selected row and the column that owns the current element that is multiplying it. That is, if I have the number 1 of the row I select, I fill in column 1, if I have 2, I cap column 2 and if I have the 0 I cap column 3.

This would look like this:

1 * C11 + 2 * c12 + 0 * c13

Where the subindices of c correspond to the row and column to be covered by the matrix and Cxy is the determinant of the remaining portion.

C11 = det (

```
-1 4
2 -2
```

) = (-1 * -2) - (2 * 4) = -6 * element cofactor = 1 - > -6

C12 = det (

```
3 4
5 -2
```

) = (3 * -2) - (5 * 4) = -26 * element cofactor = -1 - > 26

C13 = det (

```
3 -1
5 2
```

) = (3 * 2) - (5 * -1) = 11 * element cofactor = 1 - > 11

PD: the cofactor of the element has been adding the subindices x and y and if the result is an even number, the value is 1, otherwise it is -1.

```
Entonces para concluir, el determinante es:
```

1 * (-6) + 2 * (26) + 0 * 11 = -6 + 52 = 46