Python sympy | Matrix.nullspace() method Last Updated : 13 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of sympy.Matrix().nullspace() method, we can find the Nullspace of a Matrix. Matrix().nullspace() returns a list of column vectors that span the nullspace of the matrix. Syntax: Matrix().nullspace() Returns: Returns a list of column vectors that span the nullspace of the matrix. Example #1: Python3 # import sympy from sympy import * M = Matrix([[1, 0, 1, 3], [2, 3, 4, 7], [-1, -3, -3, -4]]) print("Matrix : {} ".format(M)) # Use sympy.nullspace() method M_nullspace = M.nullspace() print("Nullspace of a matrix : {}".format(M_nullspace)) Output: Matrix : Matrix([[1, 0, 1, 3], [2, 3, 4, 7], [-1, -3, -3, -4]]) Nullspace of a matrix : [Matrix([ [ -1], [-2/3], [ 1], [ 0]]), Matrix([ [ -3], [-1/3], [ 0], [ 1]])] Example #2: Python3 # import sympy from sympy import * M = Matrix([[14, 0, 11, 3], [22, 23, 4, 7], [-12, -34, -3, -4]]) print("Matrix : {} ".format(M)) # Use sympy.nullspace() method M_nullspace = M.nullspace() print("Nullspace of a matrix : {}".format(M_nullspace)) Output: Matrix : Matrix([[14, 0, 11, 3], [22, 23, 4, 7], [-12, -34, -3, -4]]) Nullspace of a matrix : [Matrix([ [-1405/4254], [ -10/709], [ 314/2127], [ 1]])] Comment More infoAdvertise with us Next Article Python | sympy.zeros() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python sympy | Matrix.columnspace() method With the help of sympy.Matrix().columnspace() method, we can find the Columnspace of a Matrix. Matrix().columnspace() returns a list of column vectors that span the columnspace of the matrix. Syntax: Matrix().columnspace() Returns: Returns a list of column vectors that span the columnspace of the ma 1 min read Python | sympy.eye() method With the help of sympy.eye() method, we can find the identity matrix by using sympy.eye() method. Syntax : sympy.eye() Return : Return an identity matrix. Example #1 : In this example, we can see that by using sympy.eye() method, we are able to find identity matrix having dimension nxn, where n will 1 min read Python | sympy.zeros() method With the help of sympy.zeros() method, we can create a matrix having dimension nxm and filled with zeros by using sympy.zeros() method.Syntax : sympy.zeros()Return : Return a zero matrix.Example #1 :In this example, we can see that by using sympy.zero() method, we are able to create the zero matrix 1 min read Python | Numpy np.lagzero() method np.lagzero() method can be used instead of np.zeros for creating a array whose elements are 0. Syntax : np.lagzero() Return : Return array([0]) Example #1 : Python3 1=1 # Python program explaining # numpy.lagzero() method # import numpy and lagzero import numpy as np from numpy.polynomial.laguerre i 1 min read Python | Numpy np.hermzero() method With the help of np.hermzero() method, we can use hermzero instead of np.zeros by using np.hermzero() method. Syntax : np.hermzero() Return : Return array([0]) Example #1 : In this example we can see that by using np.hermzero() method, we are able to get the functionality of np.zeros as same as this 1 min read Python | Numpy np.hermezero() method With the help of np.hermezero() method, we can use hermezero instead of np.zeros() by using np.hermezero() method. Syntax : np.hermezero Return : Return the array of zeros. Example #1 : In this example we can see that by using np.hermezero() method, we are able to get the functionality of np.zeros a 1 min read Like