Analog signals
Since we often think of a signal as a function of varying amplitude through time, it seems to reason that a good measurement of the strength of a signal would be the area under the curve. However, this area may have a negative part. This negative part does not have less strength than a positive signal of the same size. This suggests either squaring the signal or taking its absolute value, then finding the area under that curve. It turns out that what we call the energy of a signal is the area under the squared signal, see Figure 1
Energy  Analog signal:

Discrete signals
For time discrete signals the "area under the squared signal" makes no sense, so we will have to use another energy definiton. We define energy as the sum of the squared magnitude of the samples. Mathematically
Energy  Discrete time signal:
Example 1
Given the sequence
We recognize y(l) as a geometric series. Thus we can use the formula for
the sum of a geometric series and we obtain the energy,