[Math] Solving polynomial problems with matrices and vectors

linear algebramatricespolynomials

When solving equations involving polynomials, I've seen a technique used where you use a vector to represent the coefficients of the various powers of $x$ of a polynomial.

One such technique is the answer to this question, which is about least squares fitting: Creating a function incrementally

Since matrices are linear, how is it possible for this "trick" to work for polynomials which are of any number of degree?

Is it also possible for this "trick" to work with non linear functions of multiple variables?

Best Answer

The trick is that while polynomials $\sum_n a_n x^n$ are not linear in their argument $x$, they are certainly linear in the coefficients $a_n$, no matter how large the degree. Therefore, if a fixed (grid of) $x$ is considered, fitting the coefficients $a_n$ can be expressed as a linear problem.

The same trick can be applied to other nonlinear functions, provided you can linearize them with respect to the parameters of interest. Many nonlinear functions can be well approximated by (e.g. Taylor) polynomials, which brings us back to the above.

Related Question