Function reference · Linear algebra

determinant

Computes the determinant of a square matrix.

Entries can be symbolic. A matrix that isn't square is an error. The matrix you pass isn't changed.

Notation

determinant(args)

Write it in an expression: nerdamer('determinant(matrix([1,2],[3,4]))'), or in the Playground.

nerdamer.determinant

nerdamer.determinant(...args: [M]): Expression

A method on the default import. Arguments can be strings, as in Notation.

import { determinant }

import { determinant } from 'nerdamer/structures';
determinant(M: Matrix): Expression

Import only this function, from nerdamer/structures.

Examples

A 2 by 2 matrix.

determinant(matrix([1,2],[3,4]))
// → -2
Open in Playground

The identity matrix.

determinant(imatrix(3))
// → 1
Open in Playground

Symbolic entries.

determinant(matrix([a,b],[c,d]))
// → a*d-b*c
Open in Playground

← Back to Function reference