Time-Invariant Systems

A system is time-invariant if shifting the input sequence on time axis leads to an equivalent shift of the output sequence along the time axis, with no other changes. So if an input $s[n]$ generates an output $r[n]$, then
\begin{equation*}
\end{equation*}
In other words, if an input signal is delayed by some amount $n_0$, output also just gets delayed by $n_0$ and remains exactly the same otherwise. Whether a system is time-invariant or not can be determined by the following steps.

1. Delay the input signal $s[n]$ by $n_0$ samples to make it $s[n-n_0]$. Find the output $r_1[n]$ for this input.
2. Delay the output signal $r[n]$ by $n_0$ samples to make it $r[n-n_0]$. Call the new output $r_2[n]$.
3. If $r_1[n] = r_2[n]$, the system is time-invariant. Otherwise, it is time-variant.
Example

Consider a system
\begin{equation*}
r[n] = s[n] + s[n-3]
\end{equation*}
We will follow the steps above to determine whether this system is time-invariant or not.

1. Delaying the input signal by $n_0$ samples, the output in response to $s[n-n_0]$ is
\begin{equation*}
r_1[n] = s[n-n_0] + s[n-n_0-3]
\end{equation*}
2. Delaying the output signal by $n_0$ samples, we get
\begin{equation*}
r_2[n] = s[n-n_0] + s[n-3-n_0]
\end{equation*}
3. Since $r_1[n] = r_2[n]$, this system is time-invariant.

Now consider another system
\begin{equation*}
r[n] = n s[n]
\end{equation*}
and apply the same steps.

1. Delaying the input signal by $n_0$ samples, the output in response to $s[n-n_0]$ is
\begin{equation*}
r_1[n] = n s[n-n_0]
\end{equation*}
2. Delaying the output signal by $n_0$ samples, we get
\begin{equation*}
r_2[n] = (n-n_0)s[n-n_0]
\end{equation*}
3. Since $r_1[n] \neq r_2[n]$, this system is time-variant.

In other words, a system is time-invariant if the order of delaying does not matter, i.e.,
\begin{align*}
s[n] ~~ \rightarrow ~~ \text{Delay} ~~ \rightarrow &~~ \text{System} ~~ \rightarrow ~~ \text{Output} ~r_1[n]
\end{align*}
is the same as
\begin{align*}
s[n] ~~ \rightarrow ~~ \text{System} ~~ \rightarrow &~~ \text{Delay} ~~ \rightarrow ~~ \text{Output} ~r_2[n]
\end{align*}

Linear Time-Invariant (LTI) System

A system that is both linear and time-invariant is, not surprisingly, called Linear Time-Invariant (LTI) system. It is a particularly useful class of systems that not only truly represents many real-world systems but also possesses an invaluable benefit of having a rich set of tools available for its design and analysis.