What is the general solution of a multivariate quadratic equation

There exists a general solution to solve the general quadratic equation

$$ax^2 + bx + c = 0$$

Solution:

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

Does there exist a general solution for a general multivariate version of the quadratic equation?

$$a_ax_1^2+b_ax_2^2 + c_ax_1 + d_ax_2 + e_ax_1x_2+f_a = 0$$ $$a_bx_1^2+b_bx_2^2 + c_bx_1 + d_bx_2 + e_bx_1x_2+f_b = 0$$

Can this solution be generalized for cases with $n$ equations and $n$ unknowns?

If you want the general solution, first we treat one of the equations as quadratic in $x_1$ or $x_2$ and 'solve it'. Let's pick $x_1$ and the first equation:

$$\color{green}{x_1}=\frac{-(c_a+e_a \color{blue}{x_2}) \pm \sqrt{(c_a+e_a \color{blue}{x_2})^2-4a_a(b_a \color{blue}{x_2^2}+d_ax_2+f_a)}}{2a_a}$$

Then you have to substitue $x_1$ into the second equation. The best way would be to use the first equation again for $x_1^2$:

$$\color{green}{x_1^2}=-\frac{1}{a_a} \left((c_a+e_a \color{blue}{x_2})\color{green}{x_1}+b_a \color{blue}{x_2^2}+d_a\color{blue}{x_2}+f_a \right)$$

Now from the second equation you get:

$$-\frac{a_b}{a_a} \left((c_a+e_a \color{blue}{x_2})\color{green}{x_1}+b_a \color{blue}{x_2^2}+d_a\color{blue}{x_2}+f_a \right)+b_b\color{blue}{x_2^2}+c_b\color{green}{x_1}+d_b\color{blue}{x_2}+e_b \color{green}{x_1} \color{blue}{x_2}+f_b=0$$

Now let's separate $x_1$ so we can deal with the square root:

$$(a_b(c_a+e_a \color{blue}{x_2})-a_a e_b \color{blue}{x_2}-a_ac_b)\color{green}{x_1}=a_a(b_b \color{blue}{x_2^2}+d_b \color{blue}{x_2}+f_b)-a_b(b_a \color{blue}{x_2^2}+d_a\color{blue}{x_2}+f_a)$$

$$(a_bc_a-a_ac_b+(a_be_a-a_a e_b)\color{blue}{x_2})\color{green}{x_1}=(a_ab_b-a_bb_a)\color{blue}{x_2^2}+(a_ad_b-a_bd_a)\color{blue}{x_2}+a_af_b-a_bf_a$$

Now we substitue $x_1$ and get the square root on one side:

$$\pm \sqrt{(c_a+e_a \color{blue}{x_2})^2-4a_a(b_a \color{blue}{x_2^2}+d_a\color{blue}{x_2}+f_a)}(a_bc_a-a_ac_b+(a_be_a-a_a e_b)\color{blue}{x_2})= \\ =(a_bc_a-a_ac_b+(a_be_a-a_a e_b)\color{blue}{x_2})(c_a+e_a \color{blue}{x_2})+ \\ +2a_a\left((a_ab_b-a_bb_a)\color{blue}{x_2^2}+(a_ad_b-a_bd_a)\color{blue}{x_2}+a_af_b-a_bf_a\right)$$

Now you square both sides and since the maximum degree of $x_2$ right now is $2$, after squaring you get a quartic (4th degree) equation.

It has a general solution in radicals, but I certainly won't be writing it here.

Feeling hopeful about $n>2$ yet?

• Thank you for your response. The case when n=2 is important, but the general case is also important. Maybe it will be hard to compute by hand, but do you know of a way that one can solve the general case with the use of software/programming? Jul 28 '16 at 14:02
• @PaulTerwilliger, if you mean numerical methods, there are plenty of them, although for non-linear systems of equations they are more complicated. See here for example about Newton's method for systems math.ohiou.edu/courses/math3600/lecture13.pdf Jul 28 '16 at 14:04
• I like your answer: it involves computations of a complexity that I would fear to attempt. By now, two years and more later, you probably know everything I put into my answer just now, but it offers a more abstract way of looking at the same problem. Jan 3 '19 at 5:49

I speak only to the solution of the pair of quadratic equations of the type you have given. A higher number number of variables brings on much more elaborate mathematics.

You have asked about simultaneous solutions of a pair of quadratic equations, \begin{align} Q_1(x,y)&=0\\Q_2(x,y)&=0\,. \end{align} There’s a general theorem of Bézout that says that, properly interpreted, a pair of two-variable equations of degrees $$d_1$$ and $$d_2$$ will have precisely $$d_1d_2$$ solutions. That is, looking at each of the equations as describing a curve, there are $$d_1d_2$$ points in the intersection. You have to count multiplicity, you have to allow coordinates in an algebraically closed field (like the complex numbers $$\Bbb C$$), and you have to look projectively as well, to catch points “at infinity”.

In your case, as long as the equations both are genuinely of degree two, you are intersecting two conic sections, and there will be precisely four points in common. As @YuriyS has pointed out in his fine answer, getting their coordinates explicitly can be a bit of a bother.

But if you presented me with a particular pair of quadratics, I would make things easy for myself by recoordinatizing the plane so that, if one of the curves was not a parabola, its equation would take on the nice form that you probably know, $$\frac{x^2}{\alpha^2}\pm\frac{y^2}{\beta^2}=1\,,$$ where you’ll get the plus sign if the curve is an ellipse, a minus if it’s a hyperbola. Then, you would perform the same transformation on the other quadratic so that its equation now looks like $$Ax^2+Bxy+Cy^2+Dx+Ey+F=0\,,$$after which you can solve the upper new equation for (say) $$y$$, substitute this into the lower, and get (after simplifying) a quartic equation in $$x$$ only. And now you can find the associated $$y$$-values from the other equation, being careful to discard extraneous values of $$y$$.

I can’t resist saying something about Bézout’s Theorem, which is truly wonderful. Think of what happens when you have two ellipses in the plane. You may see no apparent intersection points, because all four are complex; or one, two, three, or four apparent points in the real plane. For fun, you should try drawing all five possibilities. But what about the case of two concentric circles? Here, the four intersections are “at infinity”, you’ll have to learn a bit of projective geometry to understand the rigorous definition, and they have complex coordinates, so can’t even be seen in the real projective plane.