Coding Now – Best AI & Full Stack Courses in Delhi NCR | 100% Placement
Limited Offer: Get 50% OFF on AI & Full Stack Courses
📞 Call Now: +91 9667708830
Back to Deep Learning Notes
Topic #208

Determinant

The determinant of a square matrix is a single number that tells you two things at once: whether the matrix is invertible, and how much the matrix scales area/volume when used as a linear transformation.

2×2 Formula

\[ \mathbf{A} = \begin{bmatrix}a & b\\c & d\end{bmatrix}, \qquad \det(\mathbf{A}) = ad - bc \]

Numerical Example

\[ \det\begin{bmatrix}3 & 8\\4 & 6\end{bmatrix} = (3)(6) - (8)(4) = 18 - 32 = -14 \]

Two Things the Determinant Tells You

Determinant ValueMeaning
\(\det(\mathbf{A}) = 0\)The matrix is singular — not invertible; its rows/columns are linearly dependent (see Vector Spaces).
\(\det(\mathbf{A}) \ne 0\)The matrix is invertible; \(\mathbf{A}^{-1}\) exists.
\(|\det(\mathbf{A})| > 1\)The transformation expands area/volume.
\(|\det(\mathbf{A})| < 1\)The transformation shrinks area/volume.
\(\det(\mathbf{A}) < 0\)The transformation flips orientation (like a mirror reflection).

Geometric Intuition

Picture a unit square in 2-D. Apply a matrix \(\mathbf{A}\) as a linear transformation to every corner of that square (see Linear Transformations). The resulting shape's area is exactly \(|\det(\mathbf{A})|\). A determinant of 0 means the square gets squashed into a line or a point — all the area collapses, which is exactly why the transformation can't be undone (no inverse exists).

Code

import numpy as np
A = np.array([[3., 8.], [4., 6.]])
print(np.linalg.det(A))   # -14.0

singular = np.array([[2., 4.], [1., 2.]])   # second row is a multiple of the first
print(np.linalg.det(singular))              # 0.0 -> not invertible

Connection to Eigenvalues

The determinant of a matrix equals the product of its eigenvalues — this is covered fully in Eigenvalues. If any eigenvalue is exactly 0, the determinant is 0, confirming the matrix is singular.

Common Mistakes

  • Thinking the determinant is only relevant to invertibility — its magnitude (area/volume scaling) matters for reasoning about numerical stability in deep networks: a weight matrix with determinant far from 1 can cause activations to explode or vanish across layers.
  • Trying to compute a determinant for a non-square matrix — it's only defined for square matrices.

Interview Relevance

Q: "What does it mean if a matrix's determinant is zero?" The matrix is singular — not invertible. Geometrically, it collapses space into a lower dimension (e.g. a 2-D square onto a 1-D line), losing information that can't be recovered, which is exactly why no inverse can exist.

Practice Question

Without fully computing it, explain why \(\begin{bmatrix}1 & 2\\2 & 4\end{bmatrix}\) has a determinant of 0 by inspecting the relationship between its rows.

Related DL Notes

Want to go beyond the notes?

Join Coding Hubs School of AI's Deep Learning course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available
💬 Talk to Advisor
1
WhatsApp

Latest from Our Blog

Insights on AI, Data Science, Full Stack & Career

View All Articles →