To be precise, there are two solutions ($a,b$ swapped) or none. But if there is a pair of solutions, there is only the one pair.

EDIT Because I'm reviewing algebra 2 (see algebra-precalculus tag), I'd ideally like a proof at that level (though it mightn't be possible).

This arises in factoring simple quadratics and factoring by grouping. e.g. [using different variables]

$(x+a)(x+b) = x^2+(a+b)x + ab$

If we find two other numbers $p,q$ with the same sum $p+q=a+b$ and same product $pq=ab$, we can write

$x^2+(p+q)x + pq = (x+p)(x+q)$

This is true, but do we also know that $p=a$ and $q=b$? Could there be some other $p,q$ with the same sum and product?

Certainly, just one of sum or product does not uniquely determine $p,q$. e.g. for $p+q=a+b=4$, we could have $a=2, b=2$ and $p=1, q=3$. For $pq=ab=12$, we could have $a=3, b=4$ and $p=2, q=6$. How do we know that using both contraints always gives one solution?

In other words, does $p+q=a+b$ and $pq=ab$ have a unique solution, and why?

My reasoning is easiest with real numbers.

  • $x+y=a => y=-x+a$ gives a falling diagonal line, with slope $-1$, y-intercept $a$, and x-intercept $a$.

  • $xy=b$, for $b>0$, gives the typical curve in the $+,+$ quadrant and in the $-,-$ quadrant. The curve is symmetrical across the rising diagonal $y=x$ (and also across $y=-x$).

The line might go between the two curves. It might just touch one of them, or intersect twice.

The single intersection can only occur at $y=x$. Here, $2x=a, x^2=b$, $x=a/2$, $(a/2)^2=b, a^2/4=b, a^2=4b$, and therefore where $a=\pm 2\sqrt{b}$. If $a$ is between these values, there is no solution; and if $\mod{a}>2\sqrt{b}$, there are two solutions. Because of symetry, these are $x,y$ swapped. i.e. if $(x,y)$ is one solution, $(y,x)$ is the other.

  • $xy$, for $b<0$, gives similar curves but in the $-,+$ and $+,-$ quadrants.

The line always intersects both curves. Because of symmetry, the intersections are at $(x,y)$ and $(y,x)$.

It's also possible to show this by manipulating the constraints into a quadratic, and then solving that (e.g. with the quadratic formula). But since the theorem of this question is used to solve quadratics, it seems begging the question to use quadratics to solve it.


2 Answers 2


If $x,y$ are such that $x+y=a$ and $xy=b$ then $x, y$ are solutions of the equation $X^2-aX+b=0$. As this equation has at most two solutions, the couple $(x,y)$ belongs to a set of at most two elements.

To prove the initial assertion, separate the two cases $b=0$ and $b\neq 0$.

Case $b=0$ Then $x$ or $y$ vanishes and the other element equal to $a$.

Case $b \neq 0$ Then neither $x$ nor $y$ vanishes. Then $x =\dfrac{b}{y}$ and plug this value in the equation $x+y=a$.


Remark about your writing:

  • I think you are confusing $\{ x, y\}$ with $\{a, b\}$.

In general:

Suppose you are given that the first $n$ elementary symmetric polynomial are equal to some constant $a_i$.:

$$e_i(x_1, \ldots, x_n) =a_i, 1\le i \le n$$

where $e_i(x_1, \ldots, x_n) = \sum_{1 \le j_1 < j_2 <\ldots< j_i\le n} x_{j_1} \ldots x_{j_i}$

To solve for $x_i$, by using Vieta's formulation, we can form the polynomial:

$$(x-x_1)(x-x_2) \ldots (x-x_n)=0$$

which will become

$$x^n -a_1x^{n-1}+a_2x^{n-2}+\ldots +(-1)^na_n=0$$

of which by fundamental theorem of algebra, we can find exactly $n$ solutions for $x$. The $x_i$ can then take those values up to permutations of the $n$ solutions.

  • $\begingroup$ Thanks, yes I do reverse them, and I'd left out the note about this. Quadratics traditionally have the form $(x+a)(x+b)$, but function graphs traditionally use $x,y$ for coordinates. I'm not sure how to better handle this. $\endgroup$ Aug 13, 2018 at 8:44
  • 1
    $\begingroup$ we can use additional variable such as $z$, which is commonly see in complex number. $\endgroup$ Aug 13, 2018 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.