Order of applying two Butterworth filters (distributivity) I have a function $f(a, b)$ that applies a linear transformation on a signal $a$, given another signal $b$.

I would like to filter the result of $f$ using a 2nd order Butterworth low-pass filter ($\mbox{butter}()$).

My question is, would first applying the filter on the individual signals give the same result as applying the transformation on the raw data and filtering afterwards?

In other words, does the following hold: $\mbox{butter}(f(a, b)) = f(\mbox{butter}(a), \mbox{butter}(b))$ ?

PS. would this property be called distributivity? I can't really figure this out..
The short answer: it depends.

The longer version: From MIT OpenCourseWare notes:


  Specifically, if we have several LTI systems cascaded together, the
  output generated by an input to the overall cascade combination does not depend
  on the order in which the systems are cascaded. 


In your specific case, you have a cascade of two blocks: one which is a 2nd order Butterworth low-pass filter (which can be shown to be a linear-time-invariant (LTI) system), and another which is your linear transformation function $f(a,b)$. The question then boils down to whether $f(a,b)$, in addition to being a linear transformation, also happens to be a time-invariant transformation. 

If $f(a,b)$ happens to be an LTI transformation, then the cascade $\mbox{butter(f(a,b))}$ is equivalent to $f(\mbox{butter}(a),\mbox{butter}(b))$. Thus, in that case one could say that $\mbox{butter}$ is distributive over $f(a,b)$.

If $f(a,b)$ isn't time invariant, then we can't make that claim as to whether the result depends on the order of operations.