# det

Matrix determinant

### det(A)

• A is a square matrix, which can be real or complex.
• It returns the determinant of A.

Example 1: The following demonstrates the well-known property of determinants: det(A) * det(B) == det(A * B). Here, A and B are randomly generated matrices.

A=randi(10,4,4)
B=randi(10,4,4)
det(A*B)
det(A)*det(B)

A =
Columns 1 through 3:
7.00000000000000   7.00000000000000   9.00000000000000
5.00000000000000   8.00000000000000   10.0000000000000
3.00000000000000   3.00000000000000   7.00000000000000
4.00000000000000   10.0000000000000   5.00000000000000
Column 4:
10.0000000000000
8.00000000000000
7.00000000000000
10.0000000000000

B =
Columns 1 through 3:
8.00000000000000   6.00000000000000   3.00000000000000
10.0000000000000   1.00000000000000   7.00000000000000
10.0000000000000   10.0000000000000   6.00000000000000
9.00000000000000   3.00000000000000   9.00000000000000
Column 4:
1.00000000000000
2.00000000000000
9.00000000000000
10.0000000000000

ans =
18134.9999999996

ans =
18134.9999999997