# Can you use matrices to solve simultaneous equations with powers?

I'm working on problems of finding absolute minima and maxima of functions of two variables. The process of finding critical points by setting the partial derivatives to zero takes too long. I have mostly been trying to do it analytically but that tends to be an error-prone process (at least for me). I noticed that these equations are essentially slightly complicated simultaneous equations. I remember using matrices to solve simultaneous equations back in high school. It would be nice if I could use it here but I'm wondering if it can be done when the variables have powers. I've tried to find tutorials on how to do this but they all involve equations without powers.

• Could you provide an example of your system of equations (to look at just how close to linear equations they are). – Yuriy S Nov 5 '18 at 4:52

Generally speaking the matrix methods you have learned are only appropriate for linear equations. The matrix is multiplied by a column vector of variables and set equal to the constant terms of the equations. It is a handy way of representing the equations. If one of your variables, say $$x$$, appears squared it would seem natural to have entries in the column vector for $$x$$ and $$x^2$$. You could then represent the equations nicely. The problem is that this does not capture the relationship between $$x$$ and $$x^2-$$ it might as well be $$x$$ and $$y$$.

If only one variable appears to a higher power, you can do the matrix approach. You will have $$n$$ equations in $$n+1$$ unknowns because your unknowns will include both $$x$$ and $$x^2$$. Solve it with $$x$$ as a parameter and you will get a single equation that is $$x^2=f(x)$$. Now use the quadratic formula for $$x$$.

If $$f:\mathbb R^n \to \mathbb R^n$$ is differentiable, then we can solve (or at least attempt to solve) $$f(x) = 0$$ using Newton's method. If $$x_n$$ is our current guess at a solution, then we linearize $$f$$ about $$x_n$$: $$f(x) \approx f(x_n) + f'(x_n)(x - x_n).$$ We define $$x_{n+1}$$ to be the solution to $$f(x_n) + f'(x_n)(x - x_n) = 0.$$ In other words, $$x_{n+1} = x_n - f'(x_n)^{-1} f(x_n).$$ (Notice that $$x_n$$ and $$f(x_n)$$ are $$n \times 1$$ column vectors, and $$f'(x_n)$$ is an $$n \times n$$ matrix.)

If the first guess $$x_0$$ is not too far off the mark, then often the Newton's method iterates will converge to a solution of $$f(x) = 0$$ rather quickly.

Newton's method is a perfect example of the "fundamental strategy of calculus" in action -- we replace $$f$$ with the tangent line approximation to $$f$$, and the calculation we wanted to perform becomes easy.

Yes, for example $$\begin{pmatrix} 1 & 2 & 3 \\ 1 & 5 & 4 \\ 1 & 6 & 7 \\ \end{pmatrix}* \begin{pmatrix} 1 \\ x \\ x^2\\ \end{pmatrix}=\begin{pmatrix} 1 \\ 2 \\ 3\\ \end{pmatrix}$$ is equivelant to $$1+2x+3x^2=1$$, $$1+5x+4x^2=2$$, $$1+6x+7x^2=3$$

• Your example has three equations in only one unknown. More common is to have the same number of equations as unknowns. If the unknowns are $x,y,z$ you would have three variables, and three equations, but if $x^2$ appears the vector of variables would have four entries because both $x$ and $x^2$ would appear. – Ross Millikan Nov 5 '18 at 4:49