# Numerical implementation of a matrix derivative

• Sophia Clark
In summary, the person is seeking help understanding the implementation of some derivatives in a specific article regarding matrix w with periodic boundary conditions. They are specifically asking about how to implement the equation ∑(ij) ∂ijw and are unsure if their interpretation of it as the second derivative of the matrix is correct. The expert responds by clarifying that it is not exactly a derivative of a matrix, but rather a derivative of a scalar field represented as a matrix. The person then expresses their doubts about the correctness of their implementation and asks for further guidance.
Sophia Clark

## Homework Statement

Hi all!

I'm having trouble understanding the implementation of some derivatives in the expression (1) of this article:
https://www.ncbi.nlm.nih.gov/pubmed/26248210

How do I implement ∑(ij)ijw ?

## Homework Equations

w is a square matrix(120x120) with periodic boundary conditions.

## The Attempt at a Solution

I understood it as the second derivative of the matrix w, but it doesn't seem to be correct.

Sophia Clark said:
I understood it as the second derivative of the matrix w, but it doesn't seem to be correct.
It is not exactly the derivative of a matrix, but of a scalar field, which computationally is represented as a matrix.

Why do you say this is not correct?

Sophia Clark
DrClaude said:
It is not exactly the derivative of a matrix, but of a scalar field, which computationally is represented as a matrix.

Why do you say this is not correct?
Because the obtained results don't have any physical meaning considering the problem, so I'm not sure that the implementation is correct.
How would you implement that equation ?

Thank you very much for your attention!

## 1. How is a matrix derivative calculated?

To calculate a matrix derivative, you must first determine the derivative of each individual element in the matrix. Then, you can combine these derivatives into a new matrix using the same dimensions as the original matrix. This new matrix represents the derivative of the original matrix.

## 2. What is the purpose of a matrix derivative?

A matrix derivative allows us to determine how a matrix will change when its elements are varied. This is useful in many scientific fields, such as statistics, physics, and engineering, where matrices are commonly used to represent data or equations.

## 3. What are the different types of matrix derivatives?

The most common types of matrix derivatives are the Jacobian matrix, Hessian matrix, and gradient vector. The Jacobian matrix represents the derivative of a vector-valued function with respect to a vector of variables. The Hessian matrix represents the second derivative of a scalar-valued function with respect to a vector of variables. The gradient vector represents the first derivative of a scalar-valued function with respect to a vector of variables.

## 4. How is a matrix derivative used in machine learning?

In machine learning, a matrix derivative is used to calculate the gradient of a cost function. This gradient is then used to update the parameters of a model using techniques like gradient descent. Matrix derivatives are also used in backpropagation, a common algorithm for training neural networks.

## 5. Can matrix derivatives be calculated for any type of matrix?

No, matrix derivatives can only be calculated for differentiable matrices. This means that the elements in the matrix must be continuous and have a well-defined derivative. Additionally, the dimensions of the matrices must be compatible for the derivative to exist.

Replies
2
Views
2K
Replies
2
Views
2K
Replies
8
Views
1K
Replies
0
Views
490
Replies
7
Views
1K
Replies
3
Views
1K
Replies
4
Views
2K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
1
Views
3K