Think about you could have a giant field of Lego blocks. Every Lego block has a quantity on it, and also you need to add up all of the numbers on the blocks. However there’s a twist! You possibly can solely add two blocks collectively if they’re subsequent to one another. That is just like the Einstein Summation Operation, however as an alternative of Lego blocks, we’re speaking about numbers in a grid, and as an alternative of including, we’re multiplying them collectively.
Now, let’s say you could have a grid of numbers like this:
“`
1 2 3
4 5 6
7 8 9
“`
And also you need to multiply the numbers in a particular means. You have a look at the grid and see that the number one is subsequent to the quantity 2, and the quantity 2 is subsequent to the quantity 3. So, you multiply them collectively: 1 * 2 * 3.
However wait, there’s extra! The quantity 4 is subsequent to the quantity 5, and the quantity 5 is subsequent to the quantity 6. So, you multiply them collectively too: 4 * 5 * 6.
And at last, the quantity 7 is subsequent to the quantity 8, and the quantity 8 is subsequent to the quantity 9. So, you multiply them collectively: 7 * 8 * 9.
So, you’ve added up all of the numbers within the grid by multiplying them collectively in a particular means, identical to the Einstein Summation Operation. It’s like saying, “I’m going to multiply all of the numbers which might be subsequent to one another in a sure solution to get a complete.”
And that’s how the Einstein Summation Operation works! It’s a solution to do math with numbers in a grid by multiplying them collectively in a particular means.
Alright, think about you could have two lists of numbers, and also you need to do one thing particular with them. Einstein Summation Operation is sort of a solution to shortly add up these numbers, however it’s a bit magical as a result of it’s easier and cooler.
So, let’s say you could have two lists:
Checklist 1: [2, 3, 4]
Checklist 2: [5, 6, 7]
Usually, if you wish to add them collectively, you’d do it like this:
(2 + 5) + (3 + 6) + (4 + 7) = 26
However with the Einstein Summation Operation, it’s like you could have a particular rule. You simply write down the lists subsequent to one another, and wherever you see the identical letter on high and backside, you multiply the numbers after which add all of them up.
So, for our instance:
Checklist 1: [2, 3, 4]
Checklist 2: [5, 6, 7]
We write them like this:
(2 * 5) + (3 * 6) + (4 * 7)
Then we simply do the multiplication and addition:
(2 * 5) = 10
(3 * 6) = 18
(4 * 7) = 28
Then add all of them up:
10 + 18 + 28 = 56
And that’s it! It’s like magic math the place you don’t have to write down down all the additional plus indicators and it makes including issues collectively very easy and enjoyable!