# Problem understanding steps towards defining the convolution sum

I have a problem understanding the reasoning behind a step that was taken to characterize a LTI system.

So, we were told the following:

For each integer $k$, we have the following function: $$\delta_k[n] = \begin{cases} 1, & \text{for n=k} \\ 0, & \text{otherwise} \end{cases}$$

Thus, if we write $x_k = x[k]$, we have that: $$x[n] = \sum_{k\ = \ -\infty}^{+\infty} x[k]\delta_k[n]$$ where x[n] is a discrete signal.

Finally, we can exploit the linearity of the system as follows: $$H\{x[n]\}\ = \ H\left\{ \sum_{k\ = \ -\infty}^{+\infty}x_k \ \delta_k[n] \right\}$$ $$=\sum_{k\ = \ -\infty}^{+\infty}x_k \ H\left\{\delta_k[n] \right\}$$ where $H$ is the system.

It is this last step that confuses me a lot. How does linearity explain that we have $\sum_{k\ = \ -\infty}^{+\infty}x_k \ H\left\{\delta_k[n] \right\}$ ? It only makes sense if we consider $x_k$ as a scalar (or a constant if you prefer), but we defined $x_k$ as a signal, so it can't be a constant. So, why is this correct?

PS: Just for clarification, we have that $\delta_k[n] = \delta[n-k]$ where $\delta[n]$ is the Kronecker-delta function.

The point of the whole exercise it to prove that you can calculate the output of an LTI system by convolving the input with the impulse response of the systems. This is done in the following steps.

1. Rewrite the input as a sum of delay delta impulses
2. Put that sum through the systems
3. Exploit LTI, swap the order of applying the system and the sum. Response of sum = sum of responses !

Let's go through the last step a little slower. We have $$H\{x[n]\} = H\left \{ \sum_{k=-\infty}^{\infty} x[k]\cdot \delta [n-k]\right \}$$

First let's sawp summation and system, assuming that the response to the sum is the same as the sim of the responses (per LTI definition)

$$H\{x[n]\} = \sum_{k=-\infty}^{\infty} H\left \{ x[k]\cdot\delta [n-k]\right \}$$

Now comes the tricky part: you have two time-like variables in the thing you need to transform: n and k. k is just the counting index for the different basis functions. n is actually the transform variable. You can think of this as having an infinite number of functions and you need to calculate the response for each one of them (and then sum the results). However, the response of each individual function is independent from the other ones. Hence, you can pull anything that's only dependent on k out from the transform. Different way of of looking at it: if H{} where an integral your integration variable would be $\partial n$ not $\partial k$. So we have

$$H\{x[n]\} = \sum_{k=-\infty}^{\infty} x[k]\cdot H\left \{\delta [n-k]\right \} = \sum_{k=-\infty}^{\infty} x[k]\cdot h[n-k]$$

where $h[n]$ is the impulse response of the system