Proper usage of Einstein sum notation

In summary, the problem is that the same index shouldn't show up more than twice in a term, so ##P_i = P_{ij}\delta_{jj}## doesn't make sense because ##j## appears three times.
  • #1
Gan_HOPE326
66
7

Homework Statement



I'm dealing with some pretty complex derivatives of a kernel function; long story short, there's a lot of summations going on, so I'm trying to write it down using the Einstein notation, for shortness and hopefully reduction of errors (also for the sake of a paper in which I have to write all this stuff down and possibly do it without blowing past the page's margins). Right now I was testing something that's relatively simple, but I'm not sure I'm using this correctly.

Homework Equations



My test example was a relatively simple derivative. For reference, these are the symbols I am using:

$$ P_{ij} = exp[-(x_i-x_j)^2]
\qquad
P_{ij}' = \frac{dP_{ij}}{dx_i} = -\frac{dP_{ij}}{dx_j}
\qquad
P_i = P_{ij}\delta_{jj}
\qquad
P_i' = P_{ij}'\delta_{jj}
$$

I'm already unsure about the use of ##\delta_{jj}## there, but then comes the problem. As a first exercise I'm trying an example of a derivative, with an additional index ##n##:

$$\frac{d(P_iP_i)}{dx_n}$$

The Attempt at a Solution


[/B]
Here's my solution:

$$\frac{d(P_iP_i)}{dx_n} = 2P_i\frac{dP_i}{dx_n} = 2P_i\left[\frac{dP_i}{dx_i}\delta_{in}-\frac{dP_i}{dx_j}\delta_{jn}\right] = 2P_nP_n' - 2P_iP_{in}'
$$

Which actually works (tested numerically), but seems ugly and wrong to me due to those repeated ##n## indices which seem to imply a summation that isn't really there. Did I do something wrong? Is there some other symbol I'm disregarding or some rule I don't know? Thanks!
 
Physics news on Phys.org
  • #2
One error is that the same index shouldn't show up more than twice in a term, so ##P_i = P_{ij}\delta_{jj}## doesn't make sense because ##j## appears three times. It's not clear to me what you're trying to do there. What is ##P_i## supposed to be equal to in normal summation notation?
 
  • #3
vela said:
One error is that the same index shouldn't show up more than twice in a term, so ##P_i = P_{ij}\delta_{jj}## doesn't make sense because ##j## appears three times. It's not clear to me what you're trying to do there. What is ##P_i## supposed to be equal to in normal summation notation?

In regular notation,

$$P_i = \sum_j P_{ij} $$

I suppose I could get the same result by multiplying by an array of ones with a single index, I just don't know if there's a conventional symbol for that.
 
  • #4
That's probably the most straightforward way. You can define a vector of ones, say ##e = (1, 1, \dots, 1)##, then ##P_i = P_{ij}e_j##.

You also need to clean up the notation for the derivative. The chain rule gives you (with no implied summation here)
$$\frac{d}{dx_n} P_{ij} = \frac{\partial P_{ij}}{\partial x_i}\frac{dx_i}{dx_n} + \frac{\partial P_{ij}}{\partial x_j}\frac{dx_j}{dx_n}.$$
 
  • #5
vela said:
That's probably the most straightforward way. You can define a vector of ones, say ##e = (1, 1, \dots, 1)##, then ##P_i = P_{ij}e_j##.

You also need to clean up the notation for the derivative. The chain rule gives you (with no implied summation here)
$$\frac{d}{dx_n} P_{ij} = \frac{\partial P_{ij}}{\partial x_i}\frac{dx_i}{dx_n} + \frac{\partial P_{ij}}{\partial x_j}\frac{dx_j}{dx_n}.$$

Yes, right, I'll fix that. The minus sign came from me knowing it appears in the end but it's not correct there.

EDIT: apparently I can't edit the first post in the thread? Sorry for that.
 

FAQ: Proper usage of Einstein sum notation

What is Einstein sum notation?

Einstein sum notation, also known as Einstein summation convention or Einstein notation, is a mathematical notation commonly used in tensor calculus and differential geometry. It simplifies the writing of long, repetitive expressions involving summation over indices.

How is Einstein sum notation written?

Einstein sum notation uses Greek letters as indices to represent the dimensions of a tensor or vector. Repeated indices in a term indicate summation over those indices. For example, AijBjk is written as ΣjAijBjk.

What are the benefits of using Einstein sum notation?

Einstein sum notation allows for a more compact and concise representation of mathematical expressions, making them easier to write and read. It also helps to avoid errors that may occur when manually performing long summations.

What are the rules for using Einstein sum notation?

There are three main rules for using Einstein sum notation: the index must appear twice in the term, each term in the expression must have the same number of indices, and the indices must be in the same order. Additionally, indices on the left side of an equation must match those on the right side.

How is Einstein sum notation used in physics?

Einstein sum notation is widely used in physics, particularly in theories involving relativity and quantum mechanics. It is used to represent mathematical equations involving tensors, vectors, and other multi-dimensional quantities. It simplifies complex calculations and allows for a more elegant representation of physical laws.

Back
Top