Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I had thought the same, however when implementing taking say a $2*2$ input matrix and writing out the Jacobian matrix in long-form, the dimension of the Jacobian matrix is $8*2$; so the diagonal does not make sense here