- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Python – scipy.linalg.det
The scipy.linalg package contains a set of different functionalities that are used for Linear Algebra. One of them is the det() function. This function is used to find the determinant of a two-dimensional matrix.
Syntax
scipy.linalg.det(x)
Where x is a square matrix.
Example 1
Let us consider the following example −
# Importing the required libraries from scipy import linalg import numpy as np # Initialize the matrix A A = np.array([[8, 5], [3, 4]]) print("Input Matrix :
", A) # Find the determinant of matrix X x = linalg.det(A) print("Determinant Value of A:", x)
Output
It will generate the following output −
Input Matrix : [[8 5] [3 4]] Determinant Value of A: 17.0
Example 2
Let us consider the following example −
# Importing the required libraries from scipy import linalg import numpy as np # Initializing the matrix M M = np.arange(6, 10).reshape(2, 2) print("Input Matrix :
", M) # Finding the determinant of matrix X x = linalg.det(M) print("Determinant Value of M:", x)
Output
The above program will generate the following output −
Input Matrix : [[6 7] [8 9]] Determinant Value of M: -2.0000000000000053
- Related Articles
- How do I install Python SciPy?
- What are various sub-packages in Python SciPy library?
- How to solve triangular matrix equations using Python SciPy?
- How can discrete Fourier transform be performed in SciPy Python?
- How to solve a circulant matrix equation using Python SciPy?
- Explain how Nelder-Mead algorithm can be implemented using SciPy Python?
- What is the use of scipy.interpolate.interp1d class of SciPy python library?
- How to solve Hermitian positive-banded matrix equation using Python SciPy?
- Calculating Euclidean distance using SciPy
- Calculating the Manhattan distance using SciPy
- Calculating the Minkowski distance using SciPy
- Calculating the Hamming distance using SciPy
- What is SciPy in Python? Explain how it can be installed, and its applications?
- How can SciPy be used to calculate the inverse of a matrix in Python?
- How can SciPy be used to calculate the permutations and combination values in Python?
- What is interpolation and how can we implement it in the SciPy Python library?

Advertisements