← Back to NumPy Course | Chapter 7: Linear Algebra | Lesson 1 of 6

np.linalg.det() से Determinant

Determinant एक single number है जो बताता है कि एक square matrix invert हो सकता है या नहीं और यह area को कैसे scale करता है।

In this page:

  1. np.linalg.det()
Syntax
python
det = np.linalg.det(matrix)

np.linalg.det()

np.linalg.det एक square matrix का determinant compute करता है। Zero का determinant मतलब matrix singular है और इसका कोई inverse नहीं। Floating-point results tiny rounding errors दिखा सकते हैं, इसलिए print करते वक्त round करें।

Note: एक 2x2 matrix [[a, b], [c, d]] के लिए determinant a*d - b*c है।

उदाहरण: np.linalg.det()

python
import numpy as np

A = np.array([[4, 3], [6, 3]])
print(np.linalg.det(A).round(2))
S = np.array([[1, 2], [2, 4]])
print(np.linalg.det(S).round(2))

# Output:
# -6.0
# 0.0
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. एक non-square matrix पर det call करना
  2. floats के साथ det == 0 exactly compare करना
  3. determinant को trace से confuse करना
चैप्टर सारांश
  • det square matrices पर काम करता है
  • Zero determinant मतलब singular
  • Float results round करें
  • 2x2 formula ad - bc है
🔒

Chapter Quiz — Complete all 6 topics to unlock

0/6 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.