Python | sympy.Matrix() method Last Updated : 31 Jul, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 a matrix or can extract the rows and columns. Python3 # Import all the methods from sympy from sympy import * # use the Matrix() method to create a matrix gfg_val = Matrix([[1, sqrt(2)], [sqrt(2), 1]]) print(gfg_val) Output : Matrix([[1, sqrt(2)], [sqrt(2), 1]]) Example #2 : Python3 # Import all the methods from sympy from sympy import * # use the Matrix() method to create a matrix gfg_val = Matrix([[1, 2], [2, 3], [3, 4]]) print(gfg_val) Output : Matrix([[1, 2], [2, 3], [3, 4]]) Comment More infoAdvertise with us Next Article Python | sympy.Matrix() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.Matrix.row() method With the help of sympy.Matrix.row() method, we can extract the rows of the matrix. Syntax : sympy.Matrix.row() Return : Return the row of a matrix. Example #1 : In the given example we can see that the sympy.Matrix().row() method is used to extract the rows of a matrix. Python3 1=1 # Import all the 1 min read 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.row_del() method With the help of sympy.Matrix.row_del() method, we can delete the rows of the matrix. Syntax : sympy.Matrix().row_del() Return : Return a new matrix. Example #1 : In the given example we can see that the sympy.Matrix.row_del() method is used to delete the row of a matrix and return a new matrix. Pyt 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.det() method With the help of sympy.det() method, we can find the determinant of a matrix by using sympy.det() method. Syntax : sympy.det() Return : Return determinant of a matrix. Example #1 : In this example, we can see that by using sympy.det() method, we are able to find the determinant of a matrix. Python3 1 min read Like