A Convergence of Operations

Integer Solutions to a Fascinating Equation


Introduction & Motivation

Hello, STEM lovers!

Today I want to give some special attention to the last letter of that acronym, M for Math.

The nature of operations is one of the most fascinating things in math. So much so that there is a whole field of study surrounding it.
Today, we’ll be investigating the meeting point of two fundamental operations: addition and multiplication.

To do so, we’ll be investigating the equation:

$$x + y=xy$$

Which asks when the sum of two numbers is equal to their product.
I’m especially interested in the integer solutions to this equation since those feel like the most natural’ numbers.

To benefit most, pull out a pen and paper and let's math along!


First Steps

We begin with the equation x + y = xy.
Our first goal is to reformat this equation so that it lends itself to investigation.
If we can focus on one of the variables, and allow it to inform our knowledge about the other variable, then we can halve our attention and effort.
We can do this by setting y and x on opposite sides of the equation, separating them.
So let’s isolate y!

Rewriting the original expression:

$$x+y=xy$$

Bringing y to the other side:

$$x=xy-y$$

Taking out the common factor of y:

$$x=y(x-1)$$

Dividing both sides by x - 1:

$$y=\frac{x}{x-1}$$

Now we have y as a function of x!

But that’s still not as clean as I’d like it to be. Can you find anything interesting to say about this expression?

Right now, we can only guess.
Let’s try to clean it up.

Let u = x - 1. Therefore, adding 1 to both sides, x = u + 1.

Plugging in u to our new expression,

$$y=\frac{x}{x-1}=\frac{u+1}{u}$$

Simplifying,

$$y=\frac{u+1}{u}=\frac{u}{u}+\frac{1}{u}=1+\frac{1}{x-1}$$

Voila! Now this is an interesting expression:

$$y=1+\frac{1}{x-1}$$

Remember that this should be the same as:

$$x+y=xy$$

As well as:

$$y=\frac{x}{x-1}$$

A fun exercise might be to verify that these three expressions are indeed the same.

This is what we have so far:

$$y=1+\frac{1}{x-1}$$

What can we say about the above expression? Well, we know that y and x should be integers because we are interested in integer solutions (there are infinitely many real solutions!) We also know that, of course, 1 is an integer. Both y and 1 are integers, and therefore:

$$y-1$$

is also an integer because the sum or difference of two integers is another integer. Notice, though, that:

$$y-1=\frac{1}{x-1}$$

and therefore 1/(x - 1) is also an integer!
That’s a lot of integers!

The Key Insight

What insight does the integer status of 1/(x - 1) give us? Why is this important?
Well, ask yourself what rational numbers are integers. What ratios are integers? What conditions should be met by the numerator and denominator for their ratio to be an integer?

Let's say you have two real numbers, called a and b.
If a/b is an integer, then b divides a, which can also be written as b|a. In other words, b must be a factor of a. An example would be that 3 divides 6 because 6 divided by 3 is an integer.
Furthermore, if b|a, then |b| must be smaller than |a|, where |b| is the absolute value of b which takes the positive value of b. For example, |3| = 3 and |-3| = 3.

We can summarize this insight here:

$$b|a\to |b|\le |a|$$

Which is mathspeak for, "if b divides a, then the absolute value of b is less than or equal to the absolute value of a".
This is our Key Insight!

If we can prove this statement, we can make a huge leap forward.

We will prove it by contraposition, which is the principle that saying "if a, then b" is the same thing as saying "if not b, then not a."
For example, "If it is raining, then the ground is wet." means the same thing as, "If the ground is not wet, then it is not raining."

If we prove the contrapositive of a statement (the not-b therefore not-a version of the a therefore b statement), then we have proven the original statement, since they are equivalent.

So rather than attacking head-on

$$b|a\to |b|\le |a|$$

We'll instead be proving the simpler statement:

$$|b|\gt |a|\to b\nmid a$$

Meaning "if the absolute value of b is greater than the absolute value of a, then b does not divide a."
Take a minute to verify that I have negated each statement and flipped them around, which is how you form a contrapositive.

Remember that we want to see whether a divided by b is an integer.
So assuming that:

$$|b|\gt|a|$$

we can divide both sides of the inequality by |b| to see what happens.

$$\frac{|b|}{|b|}>\frac{|a|}{|b|}$$

Before we simplify, we should pause to consider whether this division changes anything in the context of our inequality.
If the value we were dividing by (in this case, |b|) were negative, we would have to flip the greater-than sign, but since the absolute value of a number can never be negative, we don't have to worry about that.

Because |b|/|b| is equal to 1, we can simplify:

$$1>\frac{|a|}{|b|}$$

This merits another 'Voila!'

We now know that if we have two numbers a and b, where b is greater than a, and we divide a by b, then the resulting division a/b must be smaller than 1, provided that we've only been looking at the positive values of our numbers.

Some examples of our little lemma

This is actually pretty intuitive:
Let a = 3 and b = 4, so that b > a.
Then, a/b = 3/4, which is smaller than 1.

Another example:
Let a = -2 and b = 3. In this case, |a| = |-2| = 2. Also, |b|= |3| = 3.
We see that |b| > |a|.
Then, |a|/|b| = 2/3, which again is smaller than 1.

Notice, also, that because |a|/|b| is less than 1, it cannot be an integer.
Since we're not interested in the case that a is equal to 0 (all numbers divide 0!), we will discount that possibility.

So we have proven the statement:
"If |b| > |a|, then |a|/|b| is not an integer, and therefore b does not divide a."

Translated to mathspeak:

$$|b|\gt |a|\to b\nmid a$$

which is the contrapositive of:

$$b|a\to |b|\le |a|$$

"If b divides a, then the absolute of b is less than or equal to the absolute value of a."

We have proven the first statement, and since it is equivalent to the second statement, we have proven it, too—which is exactly what we wanted!

One final 'Voila!'

So what?

Often when you're deep in the woods of a math problem, it's helpful to take a step back and reflect on your progress and how it's relevant to the bigger picture of a problem.

In looking for integer solutions to the operation-merging equation:

$$x+y=xy$$

We noticed that, if x is an integer, the expression

$$\frac{1}{x-1}$$

must also be an integer.
Then, we went off on a short tangent to ask what we can know about x if 1/(x-1) is an integer and that x - 1 divides 1.

Well, let's remember what our little lemma tells us:
"If b divides a, then the absolute value of b is less than or equal to the absolute value of a."

Applying it to our problem:
If x - 1 divides 1, then:

$$|x-1|\le1$$

Look what we have here!
We have an absolute value inequality problem, of the kind we learned how to solve back in middle school.
Here's a refresher on how to do that.

Like a True Mathematician

We have reduced our problem to a single expression for x that we can solve.
So let's solve it.

First, consider the case:

$$x-1 \le 1$$

Adding 1 to both sides,

$$x\le2$$

And there's our first result: x must be an integer less than or equal to 2.

Now consider the second case, where we flip the inequality sign and multiply the right-hand side by -1:

$$x-1\ge-1$$

Again adding 1 to both sides,

$$x\ge0$$

And there's our second result: x must be an integer greater than or equal to 0.

So we now have a range for x:

$$2\ge x\ge0$$

So x can be any of three integers: 0, 1, or 2.

The Home Stretch

Going back to our original expression one final time, let's find y for each value of x, which we will plug into the original expression.

When x is equal to 0,

$$0 + y=0*y ⇒ 0+y=0 ⇒ y = 0$$

So we see that when x is equal to 0, y is also equal to 0.
This is our first solution: (0,0)

When x is equal to 2,

$$2 + y=2y ⇒ 2=2y-y ⇒ 2 = y$$

So we see that when x is equal to 2, y is also equal to 2.
This is our second solution: (2,2)

What nice symmetry!

Finally, when x = 1,

$$1+y=1*y⇒1+y=y⇒1=y-y⇒1=0$$

Wait... what?
What does that last statement say?
1 is equal to 0?
Of course, not!
What happened?

The Home Stretch...?

Surely, something went wrong along the way.

We need to go back. Did we miss something? Did we make a mistake? But our logic was so clean! There has to be a reasonable explanation. 1 does not equal 0!

In a situation like this, it's good to collect in one place every important piece of information we've picked up along the way. The error will likely be somewhere there. We need to backtrack our steps. So what have we found out on this journey?

1) Our little lemma:

"If b divides a, then the absolute value of b is less than or equal to the absolute value of a."
Or:

$$b|a\to |b|\le |a|$$

2) The expression:

$$x+y=xy⇒ y = 1+\frac{1}{x-1}$$

3) Maybe our algebra was wrong in one of the previous sections? Verify it to check.

This is your chance to try to find out what happened before I spoil it.

The Solution

Looking at the equation

$$y = 1+\frac{1}{x-1}$$

we can try to plug in x = 1, the source of our problem.
When we do so, we get

$$1+\frac{1}{1-1} = 1+\frac{1}{0}$$

Division by Zero!
This is why you can't divide by 0—when you do, you get crazy results and contradictions like the one we had.

That is the problem of x = 1; it results in division by 0, so we are forced to leave it out.
(For the curious reader: x = 1 is not in the domain of the function).

So the solutions we are left with are

$$2\ge x\ge0, x \neq1$$

Or:

$$x = 0,y=0$$

$$x=2, y=2$$

Voila!

Conclusion

And there you have it! After a thrilling journey through the world of algebra and number theory, we have found our integer solutions to the equation x + y = xy.

With careful attention to detail and logical reasoning, we deduced that the only two solutions are (0, 0) and (2, 2), which exhibit a delightful symmetry. Remember, it's always crucial to question our assumptions and double-check our work, as demonstrated by our encounter with division by zero.

So, keep exploring the fascinating realm of mathematics, and never shy away from the challenges it presents, for they often lead to profound insights and a deeper understanding of the world around us.

For the Avid Reader

For the avid reader, here's another problem:

Find integer solutions to:

$$x+1=xy$$

Happy math-ing!