Function reference · Linear algebra

imatrix

Creates an identity matrix of a given size.

With a symbolic size, the call is returned unevaluated.

Notation

imatrix(args)

Write it in an expression: nerdamer('imatrix(3)'), or in the Playground.

nerdamer.imatrix

nerdamer.imatrix(...args: [x]): Expression | Matrix

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

import { imatrix }

import { imatrix } from 'nerdamer/structures';
imatrix(x: Expression): Expression | Matrix

Import only this function, from nerdamer/structures.

Examples

A 3 by 3 identity matrix.

imatrix(3)
// → matrix([1, 0, 0], [0, 1, 0], [0, 0, 1])
Open in Playground

← Back to Function reference