There are lots of representations of discrete time signals. You represent it in block diagram or as difference equations.

We call it block diagrams as there are elementary structures in the diagrams.

Why do we call the equation part as difference equation of a signal? $y[n] = x[n] + x[n-1]$

There is nothing getting subtracted in the above example representation, Then why call it difference equation??

  • $\begingroup$ The term difference equation is used to contrast it with differential equations. $\endgroup$ – Stanley Pawlukiewicz Jul 11 '17 at 19:50

A difference equation is a recurrence relation where the current element $y[n]$ of a sequence is related to its past values $y[n-k]$, $k>0$ (if we interpret the index $n$ as time index, which is not necessary). The equation you gave in your question is a special case, because there are no past terms $y[n-k]$ involved, so you could call it a zeroth order difference equation, but you're right that from a common sense point of view it is no difference equation at all.

However, what counts here is the fact that no past (or future) elements $y[n-k]$ are involved, and not that "nothing is getting subtracted". E.g., the following equation is a standard example of a difference equation:


The subtraction takes place in the index $n$ ($y[n-1]$). But obviously you can substitute $n+1$ for $n$ yielding


which is completely equivalent to $(1)$ with no subtraction taking place, but it's still a difference equation, because the difference between the indices remains unchanged.


It is called an "input-output" difference equation (sometimes linear constant coefficient difference equation) because it relates inputs and outputs (of a linear time-invariant system here) as the difference equation $$y[n] - (x[n]+x[n-1]) = 0 \,.$$ A more general form includes generic linear combinations, over appropriate sets of integer indices $N_x$ and $N_y$ (depending on whether the linear system or filter is causal, anticausal, acausal, finite or infinite impulse response, etc.):

$$\sum_{i \in N_y} a_i y[n-i] - \sum_{j \in N_x} b_j x[n-j] = 0\,.$$

It is common, for instance in Difference Equation, to resort to the past only:

The difference equation is a formula for computing an output sample at time $n$ based on past and present input samples and past output samples in the time domain.

In image processing, recursive approximate Gaussian and exponential filters commonly use both causal and anticausal terms, hence my use of "appropriate", not mentioning the past only.

  • $\begingroup$ According to your definition of "difference equation", the equation $y(t)=ax(t)$ in continuous time would also be a difference equation. A difference equation relates values of a sequence to other values of the same sequence. So, as mentioned in my answer, an FIR input/output equation is no difference equation, unless you want to be pedantic and call it a zeroth order difference equation. $\endgroup$ – Matt L. Nov 9 '15 at 9:15
  • $\begingroup$ In Difference Equation, the author does not seem to impose such conditions in the generic setting. But: "When there is no feedback ($ b_i=0, \forall i>0$), the filter is said to be a nonrecursive or finite-impulse-response (FIR) digital filter." I agree FIR are degenerate cases, but some FIR filters can indeed be recast as recursive, hence difference equations in your sense. $\endgroup$ – Laurent Duval Nov 9 '15 at 9:50
  • $\begingroup$ OK, I was just referring to your explanation why it's called 'difference' equation, which seems to suggest that the reason is that you have an equation of the form 'term(1) - term(2) = 0'. This is not what a difference equation is about. $\endgroup$ – Matt L. Nov 9 '15 at 10:08
  • 2
    $\begingroup$ just fixed the notation a little to make it more conventional. hope you guys don't mind. $\endgroup$ – robert bristow-johnson Nov 10 '15 at 2:52
  • $\begingroup$ You did quite well. $\endgroup$ – Laurent Duval Nov 11 '15 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.