Function reference · Linear algebra

nullspace

Returns a basis for the nullspace of a matrix.

nullspace(...) returns a Vector whose entries are basis vectors for the matrix nullspace.

The operation is available in Nerdamer Notation, on the root nerdamer API, and as a direct import from nerdamer/structures.

Examples

These examples use Nerdamer Notation.

Find a basis for a rank-deficient matrix.

nullspace(matrix([1,2,3],[2,4,6]))
// → [[-2, 1, 0], [-3, 0, 1]]

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · Direct API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

nullspace(matrix[, prime])

Parameters

  • matrix — Matrix whose nullspace should be computed.
  • prime — Optional modulus for finite-field arithmetic.

Direct JavaScript / TypeScript API

Import the operation directly from its package entry point.

import { nullspace } from 'nerdamer/structures';

Browse nerdamer/structures

Notes

  • An optional second argument selects finite-field arithmetic with the supplied prime modulus.

← Back to Reference