Function reference · Linear algebra
nullspace
Returns a basis of the nullspace of a matrix.
The result is a vector of basis vectors. Pass a prime number as a second argument to work modulo that prime.
Notation
nullspace(matrix[, prime])
Write it in an expression: nerdamer('nullspace(matrix([1,2,3],[2,4,6]))'), or in the Playground.
nerdamer.nullspace
nerdamer.nullspace(...args: [M, prime]): Vector
A method on the default import. Arguments can be strings, as in Notation.
import { nullspace }
import { nullspace } from 'nerdamer/structures';
nullspace(matrix: Matrix, prime?: string | number | Expression): Vector
Import only this function, from nerdamer/structures.
Parameters
matrix- Matrix whose nullspace should be computed.
prime- Optional modulus for finite-field arithmetic.
Examples
A rank-1 matrix has a two-dimensional nullspace.
nullspace(matrix([1,2,3],[2,4,6]))
// → [[-2, 1, 0], [-3, 0, 1]]Open in Playground