Skip to content

null

Orthonormal basis for the null space of a matrix.

Z = null(A)
Z = null(A, 'r') % rational basis

Returns an orthonormal basis Z for the null space of A, i.e. the columns of Z span { x : A*x = 0 }, and Z' * Z = I.

With the 'r' option, returns a rational basis instead — entries are the reduced row-echelon-form derived rational coefficients, useful for symbolic-style work though numerically less stable.

A = [1 2 3; 2 4 6];
Z = null(A) % 3-by-2 orthonormal basis
norm(A * Z) % near-zero
  • rank — Numerical rank of a matrix.
  • svd — Singular value decomposition.