Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets say you have a quadratic that you factor into root form. To solve for the roots, you let the $y$ value be $0$:

$0 = (x_1-h)(x_2-k)$

Following this you would divide both sides by one of the multipliers. This would leave you with $x_1-h =0$ and therefore $x_1 =h$ and $x_2-k = 0$ and therefore $x_2 = k$.

However since the product of both the multipliers is zero, one of them has to be zero (the product of two or more numbers can't be zero unless atleast one of them is zero). Therefore, aren't you essentially dividing by zero by dividing by one of the multipliers?

For example, $x_1-h = 0$. To solve for $x_2$, you would do the following:

$0 = (x_1-h)(x_2-k)$

$\frac{0}{x_1-h} = \frac{(x_1-h)(x_2-k)}{(x_1-h)}$

$0 = x_2 - k$

$x_2 = k$

However, since $x_1 -h = 0$, didn't you essentially divide by zero to solve for $x_2$? Wouldn't this classify as undefined behaviour?

share|cite|improve this question
The equation $0 = (x_1-h)(x_2-k)$ is not an equation in $x$. Is it correct? Or is it e.g. $0 = (x-h)(x-k)$ or $0 = (x-x_1)(x-x_2)$? – Américo Tavares Jun 9 '12 at 23:01
up vote 4 down vote accepted

I wouldn’t divide by one of the factors. I would simply observe that $(x-h)(x-k)=0$ if and only if at least one of $x-h$ and $x-k$ is $0$: $(x-h)(x-k)=0$ if and only if $x-h=0$ or $x-k=0$, which is the case if and only if $x=h$ or $x=k$. At no stage of the reasoning is any division required.

Added: If you want to go to the trouble of thinking of it in terms of division, you can, but you have to be careful. Start with $(x-h)(x-k)=0$. You can then argue that if $x-h\ne 0$, then you can divide through by it to get $x-k=\frac0{x-h}=0$ and hence $x=k$. If, on the other hand, $x-h=0$, then $x=h$. Thus, either $x=k$ or $x=h$.

share|cite|improve this answer
Wouldn't your observation suggest that only one of them has to be zero? How do you come to the conclusion that both of them are zero? – user26649 Jun 9 '12 at 22:52
You DON'T conclude that both of them are zero (and in fact, it is not usually possible for them both to be zero simultaneously!) - what you DO conclude is that either one or the other is zero - and that gives you 2 possibilities for solutions. (2 possibilities, but only one can be true at a time). – Old John Jun 9 '12 at 22:56
@Riddler: You’re looking for the values of $x$ that make $(x-h)(x-k)=0$. You know that $(x-h)(x-k)=0$ precisely when either $x-h=0$ or $x-k=0$. Thus, each of those two linear equations provides a solution of the original quadratic. Of course they’re simultaneous solutions only when $h=k$. – Brian M. Scott Jun 9 '12 at 22:57

Why would you divide $$0 = (x-h)(x-k)$$ by $x-h$ or $x-k$? (As you say this is a division by zero if $x = h$ or $x = k$, and you need to distinguish several different cases.)

Just conclude that $x-h = 0$ or $x -k = 0$. (Using the fact that if a product of two real numbers is $0$, then at least one of the factors must be $0$ as well.)

share|cite|improve this answer
Wouldn't your conclusion suggest that only one of them has to be zero? How do you come to the conclusion that both of them are zero? – user26649 Jun 9 '12 at 22:54
@Riddler Both can't be zero (unless $h=k$). Look at the equation $(x-1)(x-2) = 0$. Certainly $x$ can't be equal to $1$ and $2$ at the same time. – mrf Jun 9 '12 at 22:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.