How to express this summation?

62 Views Asked by At

I have an array with coordinates i and j. For every point, I have a scalar property. I want to express the summation of this scalar property, let's say I want this value for point (3,4) and that i and j go from 1 to 5. I'm a bit confused on how to express it because if I simply put: \begin{equation} D_{(i,j)}=\sum_{\substack{i,j=1}}^{m} (2^{2k_{i,j}}) - 2^{2k_{i,j}} \end{equation} or even if I write: \begin{equation} D_{(i,j)}=\sum_{j=1}^{n}\sum_{\substack{i=1}}^{m} (2^{2k_{i,j}}) - 2^{2k_{i,j}} \end{equation}

That's not what I try to say. Because if i goes from 1 to 5, but the point I want to calculate is located at i=3 and j=4. So it doesn't make sense that m=3 and n=4, because for the first three rows of the array, I need to make a summation for i=5.

I need another way to express that and it can be also in index notation. I just don't know how to do it.

Example: Let's say I have this matrix $E$: \begin{bmatrix} 2 & 3 & 4 & 1\\ 4 & 1 & 3 & 5\\ 7 & 3 & 2 & 9\\ 5 & 2 & 8 & 4 \end{bmatrix}

I need to calculate a variable for each element, let's call this variable $p$.

$p$ is equal to the summation of all the elements of this matrix $E$ that are located before the position I'm trying to calculate, minus the value of $E$ at that position. For the element located at row 2 and column 3, which is equal to 3, that would be $p_{(2,3)} = 2+3+4+1+4+1+3 - 3$

So I want to be able to express that summation!