det

Matrix determinant.

📝 Syntax

  • res = det(x)

📥 Input argument

  • x - a numeric value: scalar or square matrix (double or single)

📤 Output argument

  • res - real or complex number (double or single), the determinant base 10.

📄 Description

res = det(x) returns the determinant of square matrix x.

For a 2×22 \times 2

matrix: det(abcd)=adbc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

For larger matrices, the determinant can be computed using cofactor expansion: det(A)=j=1n(1)i+jaijMij\det(A) = \sum_{j=1}^{n} (-1)^{i+j} a_{ij} M_{ij}

where MijM_{ij}

is the minor of element aija_{ij}

💡 Example

A = [10 -20 40; -50 20 0; 10 0 30]
D = det(A)

🔗 See also

rcond.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?