Python sympy | Matrix.columnspace() method Last Updated : 13 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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 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.columnspace() method M_columnspace = M.columnspace() print("Columnspace of a matrix : {}".format(M_columnspace)) Output: Matrix : Matrix([[1, 0, 1, 3], [2, 3, 4, 7], [-1, -3, -3, -4]]) Columnspace of a matrix : [Matrix([ [ 1], [ 2], [-1]]), Matrix([ [ 0], [ 3], [-3]])] 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.columnspace() method M_columnspace = M.columnspace() print("Columnspace of a matrix : {}".format(M_columnspace)) Output: Matrix : Matrix([[14, 0, 11, 3], [22, 23, 4, 7], [-12, -34, -3, -4]]) Columnspace of a matrix : [Matrix([ [ 14], [ 22], [-12]]), Matrix([ [ 0], [ 23], [-34]]), Matrix([ [11], [ 4], [-3]])] Comment More infoAdvertise with us Next Article Python sympy | Matrix.columnspace() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.Matrix.col() method With the help of sympy.Matrix().col() method, we can extract the columns of the matrix. Syntax : sympy.Matrix().col() Return : Return the col of a matrix. Example #1 : In the given example we can see that the sympy.Matrix.col() method is used to extract the columns of a matrix. Python3 1=1 # Import 1 min read Python | sympy.Matrix.col_del() method With the help of sympy.Matrix.col_del() method, we can delete the columns of the matrix. Syntax : sympy.Matrix().col_del() Return : Return a new matrix. Example #1 : In the given example we can see that the sympy.Matrix.col_del() method is used to delete the column of a matrix and return a new matri 1 min read Python sympy | Matrix.diagonalize() method With the help of sympy.Matrix().diagonalize() method, we can diagonalize a matrix. diagonalize() returns a tuple (P, D), where D is diagonal and M = PDP^{-1}. Syntax: Matrix().diagonalize() Returns: Returns a tuple of matrix where the second element represents the diagonal of the matrix. Example #1: 1 min read Python | sympy.Matrix() method With the help of sympy.Matrix() method, we can make, rearrange, extract the different rows and columns in a matrix which is created by sympy.Matrix() method. Syntax : sympy.Matrix() Return : Return a matrix.  Example #1 :In this example, we can see that by using sympy.Matrix() method, we can create 1 min read Python | sympy.Matrix().col_insert() With the help of Matrix().col_insert() method, we can insert a column in a matrix having dimension nxm, where dimension of inserted column is nx1. Syntax : Matrix().col_insert() Return : Return a new matrix. Example #1 : In this example, we are able to insert a column in a matrix by using Matrix().c 1 min read Like