question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Derivative of the determinant of a singular matrix is NaN

See original GitHub issue

Consider the following code

from jax import grad
import jax.numpy as np

x = np.zeros(shape=(4,4))
d = grad(np.linalg.det)

print(d(x))

the derivative of np.linalg.det(x) against x is obviously a zero matrix, but NaNs was outputted

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:26 (25 by maintainers)

github_iconTop GitHub Comments

2reactions
dpfaucommented, Mar 26, 2020

The function I shared above already works. I’m just working on integrating it into JAX.

0reactions
mattjjcommented, Apr 25, 2020

Woohoooooo thanks @dpfau!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Derivatives of determinant function when the matrix variable is ...
The first derivative of the determinant function is well-known and is given by Jacobi formula: let A(t) be a matrix function of scalar...
Read more >
Singular and Non-singular Matrix, Math Lecture | Sabaq.pk
Singular and non- singular matrix with determinant zero or non zero using examplesThis video is about: Singular and Non- singular Matrix.
Read more >
Singular matrices | Precalculus | Khan Academy - YouTube
Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now: ...
Read more >
Determinants and matrix differentiation - YouTube
Determinants and matrix multiplication. ... Determinants and matrix differentiation. 4.2K views 4 years ago.
Read more >
The Matrix Cookbook - Mathematics
determinant, derivative of inverse matrix, differentiate a matrix. ... The condition number can be used to measure how singular a matrix is.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found