Recall that a discrete-time system is a mathematical entity that takes an input signal (usually denoted $x$) and produces an output signal (usually denoted $y$). In the study of signal processing, systems that have certain characteristics are of particular interest. Among these characteristics is
time-invariance .
There is a very basic intuition behind the notion of time-invariance. In many cases, we would like a system to behave a certain way, no matter when an input may be given. To use a practical analogy, people expect their toasters to operate the same way on Tuesdays as they do on Mondays.
A system is time-invariant if a time delay for an input results in the same time delay on the output. Expressing this idea of system time-invariance mathematically is straightforward. Consider a system $H$; let $x[n]$ be some arbitrary input, and call the system's output for that input $y[n]$. $H$ is time-invariant if, for some arbitrary integer value $q$, $H[x[n-q]]=y[n-q]$:
Example: moving average system
Consider, for example, the moving average system $y[n]= \frac{1}{2}(x[n]+x[n-1])$. Is this system time invariant? To find out, let's delay the input by some value $q$, and see what the output is. We'll call the delayed input signal $x'[n]$ (=$x[n-q]$) and the new output $y'$:$y'[n]=\frac{1}{2}(x'[n]+x'[n-1])=\frac{1}{2}(x[n-q]+x[(n-1)-q])$Now the important question, is $y'[n]=y[n-q]$? That will be easy to determine, simply replace every $n$ with $n-q$ in that original $y[n]$ equation and see if it is the same as $y'[n]$:
$y[n-q]=\frac{1}{2}(x[n-q]+x[n-q-1])=\frac{1}{2}(x[n-q]+x[(n-1)-q])=y'[n]\checkmark$
Example: decimation
Now let's consider a decimation system, $y[n]=x[2n]$. Is this system time-invariant? First, create a new signal that is a delayed version of $x[n]$: $x'[n]=x[n-q]$. Next, find the output corresponding to this new signal: $y'[n]=x'[2n]$. Now express this output in terms of the original input: $y'[n]=x'[2n]=x[2n-q]$. Finally, check to see if this is the same as $y[n-q]$. As $y[n-q]=x[2(n-q)]$ is not equivalent to $y'[n]$ (for $2n-1\neq 2(n-q)$ for all $n$ and $q$), the system is not time-invariant.
Now practice on the system examples below; which of them are time-invariant?
All of the discussion above has considered systems which take infinite-length signals as inputs. A system which takes finite-length signals as inputs and produces them as outputs can also exhibit the characteristic of time-invariance, defined slightly differently. Such systems are time-invariant if any
circular shift on the input results in a corresponding
circular shift on the output: