Suppose that we have two series of data points $a(x)$ and $b(x)$ with the same domain of definition for $x$, and we fit two polynomial functions $f(x)$ and $h(x)$ (of the same order $n$) to them, respectively (e.g., by least squares).


Is it true that the difference $f(x) - h(x)$ (or, sum $f(x) + h(x)$) of the two polynomial functions is equivalent to the polynomial function (of order $n$) that fits $a(x) - b(x)$ (or, $a(x) + b(x)$)? And if yes, how do we prove it?



Is the difference between polyfits for two data series equivalent to the polyfit of the difference between the two data series?
Just to be sure we are talking about the same thing. You have a domain series $\{x\_i\}$ (say of size $m$) and two data series $\{a\_i\}$ and $\{b\_i\}$ that you fit polynomials $f(x)$ and $h(x)$ to (respectively).


At least for interpolation and least square fit the sum of the fit polynomials is equivalent to the fit polynomial of the sum of data points.
(Note, however, that the word "fit" can mean other things so it may not be true for other types of fit.)


For interpolation polynomials it is a consequence of the [uniqeuness of the interpolating polynomial](https://en.wikipedia.org/wiki/Polynomial_interpolation#Uniqueness_of_the_interpolating_polynomial). For interpolation, since
$ f(x\_i)=a\_i$ and $h(x\_i)=b\_i$ we have:
$$ (f+h)(x\_i) = f(x\_i)+h(x\_i) = a\_i+b\_i$$
That is, $(f+h)(x)$ is the (unique) interpolation polynomial of $a\_i+b\_i$.


For least squares we can prove it using the process used for least squares fitting. Namely, the coefficients $\alpha\_i$ and $\beta\_i$ of the least square polynomials $f(x)=\sum\_{i=0}^n \alpha\_i x^i$ and $h(x)=\sum\_{i=0}^n \beta\_i x^i$ are constructed by [solving](https://en.wikipedia.org/wiki/Linear_least_squares_(mathematics)#The_general_problem) the linear system:
$$ X^TX \alpha = X^Ta$$ and $$X^TX \beta = X^Tb$$
Where $a$ and $b$ are the vectors of data values, $\alpha$ and $\beta$ are the vectors of coefficients of the polynomials and $X$ is the [matrix](http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html):
$$
\left[
\begin{array}{cccc}
1 & x\_1 & \ldots & x\_1^n \\
1 & x\_2 & \ldots & x\_2^n \\
& \ldots & & \\
& \ldots & & \\
1 & x\_m & \ldots & x\_m^n
\end{array} 
\right]
$$


It follows that $\alpha = (X^TX)^{-1}X^Ta$ and $\beta = (X^TX)^{-1}X^Tb$ and therefore:
$$\alpha+\beta = (X^TX)^{-1}X^Ta + (X^TX)^{-1}X^Tb = (X^TX)^{-1}X^T(a+b)$$
So $\alpha+\beta$ are the coefficients of the least square polynomial of $a+b$.
Hence the sum $f(x)+h(x)$ of the two polynomial functions is equivalent to the polynomial function that fits $a\_i+b\_i$. 


