Function reference · Linear algebra

invert

Returns the inverse of a square matrix.

The matrix you pass isn't changed.

Notation

invert(args)

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

nerdamer.invert

nerdamer.invert(...args: [M]): Matrix

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

import { invert }

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

Import only this function, from nerdamer/structures.

Examples

A 2 by 2 matrix.

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

← Back to Function reference