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.
# import sympy from sympy import * # Use sympy.det() method mat = Matrix([[1, 0, 1], [2, -1, 3], [4, 3, 2]]) d = mat.det() print(d) |
chevron_right
filter_none
Output :
-1
Example #2 :
# import sympy from sympy import * # Use sympy.det() method mat = Matrix([[1, 5, 1], [12, -1, 31], [4, 33, 2]]) d = mat.det() print(d) |
chevron_right
filter_none
Output :
-125
Recommended Posts:
- class method vs static method in Python
- Python | next() method
- Python | set() method
- Python | os.dup() method
- Python | sympy.Pow() method
- Python | os.WIFCONTINUED() method
- Python PIL | blend() method
- Python | Decimal max() method
- Python Dictionary | pop() method
- Python PIL | Image.new() method
- Python | range() method
- Python | os.sysconf() method
- Python | Tensorflow exp() method
- Python | os.confstr() method
- Python | os.fchmod() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


