This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Matrix Operations  /
NullSpace

  • NullSpace[ m ] gives a list of vectors that forms a basis for the null space of the matrix m.
  • NullSpace works on both numerical and symbolic matrices.
  • NullSpace[ m , Modulus-> n ] finds null spaces for integer matrices modulo n.
  • NullSpace[ m , ZeroTest -> test ] evaluates test [ m [[ i , j ]] ] to determine whether matrix elements are zero. The default setting is ZeroTest -> Automatic.
  • A Method option can also be given. Possible settings are as for LinearSolve.
  • See the Mathematica book: Section 3.7.8.
  • See also: LinearSolve, RowReduce, SingularValues.

    Further Examples

    The nullspace of a non-singular matrix is the trivial vector space. In other words, no nonzero vector gets multiplied to the zero vector.

    In[1]:=

    Out[1]=

    This nullspace has dimension .

    In[2]:=

    Out[2]=

    We check the result.

    In[3]:=

    Out[3]=

    This set of vectors spans the nullspace of the x matrix.

    In[4]:=

    Out[4]=

    Multiplying any linear combination of these vectors by the matrix gives the zero vector.

    In[5]:=

    Out[5]=

    We simplify by expanding.

    In[6]:=

    Out[6]=

    The rank of the matrix is the difference between the number of columns and the dimension of the nullspace.

    In[7]:=

    Out[7]=