Inspired by Marta Reece 2

Algebra Level 3

A 2 + B 2 A^2 + B^2 , A B AB , and A + B A + B are all integers.

Do both A A and B B have to be integers?

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

33 solutions

Abhishek Sinha
May 17, 2018

For a simple counter-example, take A = 2 , B = 2 A=\sqrt{2}, B=-\sqrt{2} .

subtle..:)

Satyabrata Dash - 3 years ago

My solution also.

Nancy Rose - 3 years ago

I immedietely thought of i and root of a prime. I love counter examples...

M. Zeidan - 3 years ago

I instantly thought of B being a complex number in the expression A^2 +B^2

Tasneem Khaled - 3 years ago

That's what I had, + and - square roots of the same poditive integer

John V Savage - 3 years ago
Michael Mendrin
May 16, 2018

Given

a 2 + b 2 = x a^2+b^2=x
a b = y ab=y
a + b = z a+b=z

where x , y , z x, y, z are integers. The difference a b a-b then satisfies

( a b ) 2 = x 2 y (a-b)^2 = x-2y

which is an integer. However, the square root of an integer isn't necessarily even rational. Let's say

a b = w a-b = w

where w w is an irrational number. Then

( a + b ) + ( a b ) = 2 a = z + w (a+b)+(a-b) = 2a = z + w

which is irrational if w w is. So, it's possible that neither a a or b b is an integer. As an example, the following values for a , b a,b will yield integer x , y , z x,y,z

a = 1 2 ( 3 + 5 ) a= \dfrac{1}{2}(3+\sqrt{5})

b = 1 2 ( 3 5 ) b= \dfrac{1}{2}(3-\sqrt{5})

Indeed. All we can conclude is that a , b N ± N 2 a, b \in \frac {\mathbb{N} \pm \sqrt{ \mathbb{N}}}{2} .

Does that feel surprisingly restrictive?

Calvin Lin Staff - 3 years ago

Log in to reply

At first glance, I said, "oh sure, of course A and B have got to be integers". Then I needed to think twice, which I don't always do.

Michael Mendrin - 3 years ago

Log in to reply

Ah hahah. Good to know that I almost tricked you.

Alright, here's a follow up .

Calvin Lin Staff - 3 years ago

I may misunderstand something here... If a , b = 3 ± 6 2 a,b=\frac{3\pm\sqrt{6}}{2} , AB is 3 4 \frac{3}{4} .

Laszlo Kocsis - 3 years ago

Log in to reply

This is right. There are a couple additional requirements on the class of counterexamples, but you would need a , b = m ± n 2 a,b = \frac{m \pm \sqrt{n}}{2} with m 2 n m^2 - n a multiple of 4 4 (which is what your example fails).

Brian Moehring - 3 years ago

Log in to reply

@Brian Moehring Yes, that was the missing condition, thanks.

Laszlo Kocsis - 3 years ago

@Brian Moehring Note: See my comment. That immediately explains why this requirement is necessary and sufficient.

Calvin Lin Staff - 3 years ago

To clarify further, I was not stating the exact set of a , b a, b , but just that they must be elements of this set. I was trying to prompt people to think about "classifying all counterexamples" (E..g See Zico's solution.)

The exact classification is: a , b a, b are the roots of M 2 z M + y = 0 M^2 - z M + y = 0 , hence a , b = z ± z 2 4 y 2 a, b = \frac{ z \pm \sqrt{ z^2 -4y } } { 2 } .
Then, we can conclude that a , b a, b is an integer if and only if z 2 4 y z^2 - 4y is a perfect square.
(Do we need to check if the numerator is even?)

Calvin Lin Staff - 3 years ago

Couldn't we stop at a-b=w, and since the difference of two numbers is irrational, then at least one of them isn't an integer?

Elîte Keryakos - 3 years ago

I assumed a and b are both rational and proved that they must be integers. Completely missed that they coud be irrational.

Ahmed Abdelaal - 3 years ago

Log in to reply

Me too, but does that mean a and b can't be rational?

Mohamed Hessien - 3 years ago

0+0=0 0^2+0^2=0 0+0=0

0 is an integer

looking at you answer, I assume you could double a and b. Then this would mean any pair of number of the form (e + f^0.5) and (e - f^0.5) would work. (with integer e and f). You could even use complex numbers, assuming integers does not mean gaussian integers, you could even do it without any irrational numbers.

I'm really kicking myself for not realizing any of this sooner.

Joel Dowdell - 3 years ago
Brian Moehring
May 28, 2018

Relevant wiki: Quadratic Equations - Problem Solving

First note that if A B AB and A + B A+B are integers, then A 2 + B 2 = ( A + B ) 2 2 ( A B ) A^2 + B^2 = (A+B)^2 - 2(AB) must be an integer, so we can simplify the assumption to simply that A B AB and A + B A+B are integers.

Now consider the quadratic with roots A A and B B . It factors as ( x A ) ( x B ) = x 2 ( A + B ) x + A B , (x-A)(x-B) = x^2 - (A+B)x + AB, but since every quadratic has this property all we know about A A and B B is that they are the roots of a quadratic polynomial with integer coefficients (and leading coefficient 1 1 ).

Now we can rephrase the question in a way that every student of algebra should be able to answer:

"Must every quadratic with leading coefficient 1 1 and integer coefficients ( A + B A+B and A B AB ) have integer roots ( A A and B B )?"

or another way:

"Can every quadratic with integer coefficients be factored using integers?"

To both, the obvious answer is "no".

For instance, x 2 2 = ( x 2 ) ( x + 2 ) x 2 x 1 = ( x ϕ ) ( x θ ) x^2 - 2 = (x-\sqrt{2})(x+\sqrt{2}) \\ x^2 - x - 1 = (x-\phi)(x-\theta) both give counterexamples.


Last, to give a necessary and sufficient condition for all real counterexamples, we note by the quadratic formula that A A and B B are A , B = b ± b 2 4 c 2 A,B = \frac{-b \pm \sqrt{b^2 - 4c}}{2} for integers b , c b,c such that b 2 4 c > 0 b^2 - 4c > 0 is not a perfect square.

In other words, the complete set of real counterexamples has the form A , B = m 2 ± n 2 A,B = \frac{m}{2} \pm \frac{\sqrt{n}}{2} where m , n m,n may be freely chosen integers such that n > 0 n > 0 is not a perfect square and m 2 n ( m o d 4 ) m^2 \equiv n \pmod{4} .

i lost you at 'quadratic polynomial', i dont know high level or even A-level maths yet, but is there a simpler way of thinking about the solution which you could only derive algerbraically anyway.

also how does: "Must every quadratic with leading coefficient and integer coefficients (A and B) have integer roots (A and B)?" even be rearanged to form the new question: "Can every quadratic with integer coefficients be factored using integers?", im probably ignoring some of the fundemental principles of what square roots are and how they are sometimes irrational or something. but i thought that if you had something like (X-4)(2X-6) that it would always be divisable by other integers. i mean it is divisable by two, what is the exception to this?

i just dont know

Johny Broxy - 3 years ago

Log in to reply

To tell you the truth, I don't remember writing the word "polynomial" (I thought I had used the term "expression"). Either way, a quadratic polynomial with leading coefficient 1 is just anything that looks like x 2 + b x + c x^2 + bx + c where b b and c c are constant. On the other hand, when factored, this type of quadratic must look like ( x A ) ( x B ) (x-A)(x-B) where A A and B B are called the "roots" (or "zeros") of the quadratic. In particular, when we talk about whether a quadratic can factor, we generally only care about it factoring into the linear factors ( x A ) (x-A) and ( x B ) (x-B) and not whether we can factor constants out of it.


Now if we can consider one of my examples: x 2 x 1 x^2 - x - 1 the two questions would be phrased as follows

  • "Does this quadratic have integer roots (zeros)?" (i.e. is there an integer you can assign to x x that gives zero as a result)

  • "Can this quadratic be factored using integers?" (i.e. can we write x 2 x 1 = ( x A ) ( x B ) x^2 - x - 1 = (x-A)(x-B) where A , B A,B are both integers)

Are you able to see the connection between the two questions?

If the second had an answer of "yes", we could set x = A x=A and get zero as a result. On the other hand, if x = A x=A were a zero and A A were an integer, then ( x A ) (x-A) would be a factor and by division, we would necessarily have another factor ( x B ) (x-B) where B is another integer.


Hopefully that helps.

Brian Moehring - 3 years ago

Log in to reply

Can you give an example with numbers instead of variables?

Bill Rodawalt - 3 years ago

Log in to reply

@Bill Rodawalt I'm not even sure what you're asking...

If you mean an example without the variable x x , then the answer is definitely "no". The arithmetic of polynomials is not the same as the arithmetic of numbers. In particular here, a quadratic with leading coefficient 1 1 can only be factored in one way, whereas any value we assign to x x might give many factorizations, and this distinction is central to my solution.


If you mean an example without the unknown constants b , c , A , B b, c, A, B , then the answer is "maybe".

For the first part where I'm defining the standard and factored form of quadratics, you can choose any value you want for the constants to get an example of these forms. Just choose your favorite numbers.

For the second part following when I referenced x 2 x 1 x^2 - x - 1 , however, choosing numbers would actually make the statements meaningless. We often do this in grade school when learning the topic initially, but when you consider it critically, we're just talking nonsense when we do that. If you want, you can once again choose your favorite numbers, but be aware that the resulting statements will necessarily be false (since all the statements are in the counterfactual).

Brian Moehring - 3 years ago

This problem only asks for a counter-example and quite a few are easily at hand, for example both square roots of 2 or an integer and irrational root conjugate pair (N + root, N - root). Why all this work?

Robert DeLisle - 3 years ago

Log in to reply

If your goal is to only answer the question, then I would agree that all you need to do is give a single example, but doing so would stop at giving you the answer and teach you very little about the underlying mathematical principles for the problem.

To directly answer your question, "all this work" is to show what I believe to be the principles in this problem and then use them to investigate the problem as generally as I can reasonably do so. If you know of a way to completely characterize all real counterexamples without "all this work", I would honestly like to see it because I may learn something.

Brian Moehring - 3 years ago
Zico Quintina
May 16, 2018

Over the real numbers, any conjugate pairs of the form A = a + b c A = a + b \sqrt{c} and B = a b c B = a - b \sqrt{c} , where a , b , c Z a,b,c \in \mathbb{Z} are possible for A A and B B .

  • A + B = ( a + b c ) + ( a b c ) = 2 a Z A + B = (a + b \sqrt{c}) + (a - b \sqrt{c}) = 2a \in \mathbb{Z}

  • A B = ( a + b c ) ( a b c ) = a 2 b 2 ( c ) 2 = a 2 b 2 c Z AB = (a + b \sqrt{c})(a - b \sqrt{c}) = a^2 - b^2 (\sqrt{c})^2 = a^2 - b^2c\in \mathbb{Z}

  • A 2 + B 2 = ( a + b c ) 2 + ( a b c ) 2 = ( a 2 + 2 a b c + b 2 c ) + ( a 2 2 a b c + b 2 c ) = 2 a 2 + 2 b 2 c Z A^2 + B^2 = (a + b \sqrt{c})^2 + (a - b \sqrt{c})^2 = (a^2 + 2ab \sqrt{c} + b^2c) + (a^2 - 2ab \sqrt{c} + b^2c) = 2a^2 + 2b^2c\in \mathbb{Z}

Similarly, if complex solutions are permitted, then any conjugate pairs of the form A = a + b c i A = a + b \sqrt{c}\ i and B = a b c i B = a - b \sqrt{c}\ i , where a , b , c Z a,b,c \in \mathbb{Z} are possible for A A and B B .

Is that the complete set of counterexamples? Are there more?

Calvin Lin Staff - 3 years ago

Log in to reply

Nope, not complete. Micheal's counter-example is not on this list!

Brian gives the complete list in the comments under Micheal's solution. Those not included in Zico's list are all of the form (a+1/2)±√(b+1/4) for any integers a and b (with negative b giving complex solutions).

Robert Morewood - 3 years ago

Irrational are not integers

TANMAY GOYAL - 3 years ago

Log in to reply

The question in other words is: Do other than integer solutions exist? (do they have to be int, or not)

Laszlo Kocsis - 3 years ago
Tiger Ang
May 28, 2018

Counter Example

A = i B = i A + B = 0 A B = 1 A 2 + B 2 = 2 A=i\\ B=-i\\ A+B=0\\ AB=1\\ { A }^{ 2 }+{ B }^{ 2 }=-2

Thomas Ponweiser
May 28, 2018

The counter example I was thinking of was A = i A=i and B = i B=-i .

Clever solution

Jason Martin - 3 years ago
Thomas Horstkamp
May 27, 2018

Let A equal some square root that isn’t equivalent to an integer and B=-A

Then if you do A^2+B^2, the output is 2A^2, which is an integer since A^2 is an integer

AB=A(-A)=-A^2 which is an integer for the same reason

A+B=0 since B=-A.

Hi, nice solution I got the problem wrong because i didnt put much thought or time into it but nice solution also because I didn't do that much number theory

chase marangu - 3 years ago
Brad Zhang
May 29, 2018

First, realize that ( A + B ) 2 2 A B = A 2 + B 2 (A+B)^2-2AB=A^2+B^2 . This means that if the sum is an integer and the product is an integer, the sum of the squares is guaranteed to be an integer. Then, consider Vieta sums for a quadratic function that has A and B as roots. The product is the constant term, and the sum is the (negated) first-degree term. Since we know there are quadratics that have integer coefficients but non-integer roots, we can conclude that it is possible for A and B to be non-integers.

Nicholas Patrick
May 29, 2018

By squaring A+B and subtracting 2(AB) from it, we obtain A^2+B^2 which should also be an integer. So, we can pick any 2 integers for A+B and AB to get any integer A^2+B^2. A+B=AB=1 would suffice to show that A and B doesn’t need to be integers.

Note: You have to prove that a counter example exists, which is still a slight gap. The easiest way is to show that such A and B exist.

Calvin Lin Staff - 3 years ago
Arjen Vreugdenhil
May 29, 2018

So you found a counterexample... Now, can you give a general description of the numbers A , B A,B that satisfy the description?

Here is the follow-up question!

Rocco Dalto
May 27, 2018

This problem just requires a counterexample.

Let Z \mathbb{Z} be the set of all integers and choose A = 2 A = \sqrt{2} and B = 2 A + B = 0 Z , B = -\sqrt{2} \implies A + B = 0 \in \mathbb{Z}, A B = 2 Z AB = -2 \in \mathbb{Z} and A 2 + B 2 = 4 Z A^2 + B^2 = 4 \in \mathbb{Z}

A 2 + B 2 Z , A B Z \therefore A^2 + B^2 \in \mathbb{Z}, AB \in \mathbb{Z} and A + B Z A + B \in \mathbb{Z} \nRightarrow A Z B Z A \in \mathbb{Z} \wedge B \in \mathbb{Z} .

Ritabrata Roy
Jul 13, 2018

Assume A,B are in the form of x+√y and x-√y (x,y are integers)

Rajdeep Brahma
Jun 11, 2018

Take A as i i and B as i -i .( i 2 i^2 =-1)

Archisman Roy
Jun 3, 2018

If we consider a=i^2 b= -i^2 then a^2+b^2 is an integer , ab is an integer , a+b is also an integer . However a, b are not integers.

For a “complex” counterexample, let A = i A = i and B = i B = -i , so A 2 + B 2 = i 2 + ( i ) 2 = 2 A^2 + B^2 = i^2 + (-i)^2 = -2 , A B = ( i ) ( i ) = 1 AB = (i)(-i) = 1 , and A + B = i + ( i ) = 0 A + B = i + (-i) =0

A and B can be any number of the form a b a-\sqrt{b} and a + b a+\sqrt{b} where a and b are integers

Jacobi Hwang
Jun 2, 2018

A=1+i, B=1-i.

Seems like this should be an easy problem

(a-b) 2=(a+b) 2-4ab=integer. a-b may be non-integer. So are a and b.

A = i B = 1/i

Robert DeLisle
May 31, 2018

No. (and the same question could be asked with "real" in place of "integer", and probably has elsewhere.)

A simple counter example is A = 2 A = \sqrt {2} and B = 2 B = - \sqrt {2} when A 2 + B 2 A^2 + B^2 , A B AB , and A + B A + B would be 4, -2, and 0 respectively.

The analogous question for reals using i and -i works similarly.

A = i A = i and B = i B = - i when A 2 + B 2 A^2 + B^2 , A B AB , and A + B A + B would be 0, 1, and 0 respectively, all real..

Pierre Stöber
May 31, 2018

Suppose that I ) A + B = N I) A+B=N and I I ) A B = M II) AB=M with N and M being two integers.

Then it automatically follows that A 2 + B 2 A^2+B^2 is also an integer because A 2 + B 2 = ( A + B ) 2 2 A B A^2+B^2=(A+B)^2-2AB . It means that we don't have to care about the third condition.

Now replace A = M B A=\frac{M}{B} in I ) I) . After some manipulation, we get the quadratic equation B 2 N B + M = 0 B^2-NB+M=0

Solving the quadratic equation gives us B 1 = B_1 = ( N 2 4 M ) + N 2 \frac{\sqrt{(N^2-4M)}+N}{2} , B 2 = B_2 = ( N 2 4 M ) + N 2 \frac{-\sqrt{(N^2-4M)}+N}{2} . Because B 1 B 2 = M B_1 B_2 =M , we can simply say that B 1 = A B_1=A and B 2 = B B_2=B

Now, we only have to input values for N and M such that the value under the square root is not a square number (and not negative) then A and B won't be integers.

A nice counter-example: If we choose N = 1 N=1 and M = 1 M=-1 we get both golden ratios for A and B with A = 1 + 5 2 A=\frac{1+\sqrt{5}}{2} and B = 1 5 2 B=\frac{1-\sqrt{5}}{2}

Haoran Wang
May 31, 2018

Hmm... Actually I think i i and i -i isn't integer. So let A = i A=i , B = i B=-i , then A 2 + B 2 = 1 1 = 2 A^2+B^2=-1-1=-2 , A B = i 2 × 1 = 1 AB=i^2 \times -1=1 , A + B = i + i = 0 A+B=-i+i=0 . All is integer.

Thuan Ngo Van
May 31, 2018

A = -sqrt(B) or B = -sqrt(A)

Nithin Uppalapati
May 31, 2018

Even if A & B are conjugate complex numbers the above statement holds good let 'z=x+iy' denote a non-real complex number and let 'z =x-iy' be its conjugate,where x & y are integers numbers then z+z and zxz* are also integers and even square of z & z* are conjugate with respective of each other:Thus same properties are observed Hence proved.

Ricardo Chavez
May 30, 2018

Let A = i A=i and B = i B=-i

Cash Chew
May 30, 2018

Draw a square where the side is A+B, then there are infinite solutions of (A,B) pairs along the diagonal of the square

I didn't get it. Please explain further with example.

Uttam Manher - 3 years ago
Eduardo Escamilla
May 29, 2018

Let A=i and B=-i then A 2 + B 2 = i 2 + ( i ) 2 = 2 { A }^{ 2 }+{ B }^{ 2 }={ i }^{ 2 }+{ (-i) }^{ 2 }=-2 , A B = i ( i ) = 1 { A }{ B }={ i }{ (-i) }=1 and A + B = i + ( i ) = 0 { A }{ +B }={ i }{ +(-i) }=0

Ritik Khobra
May 29, 2018

Consider A=I1 +f ,B=I2 -f and Now solve (A+B)^2 = A^2 +B^2 +2AB Put as above considered you will get f(I2 -I1) =0 FOR I1 =I2 ,IT IS POSSIBLE FOR ALL VALUES OF FRACTIONAL PART f Hence A and B not necessiraly have to be integers

Vanice Yee
May 29, 2018

Wow everyone's explanations are awesome and complex. Here all I was thinking A + B has to be an integer is false thus No.

A simple counterexample: A = 1 ; B = 4 A=\sqrt{1}; B=\sqrt{4}

Both of those are integer values though

Phillip Temple - 3 years ago
Lee Rachel
May 27, 2018

A counterexample:
A=-√2,B=√2. A²+B²=0 AB=-2 A+B=0

Louis Ullman
May 17, 2018

These 3 facts will become useful when finding a solution to this problem:

  • A non-real number cannot be an integer (but can be a Gaussian integer).

  • A Gaussian integer, x x , times another Gaussian integer, y y , where the imaginary part of y y is -1 times the imaginary part of x x is only an integer if the real parts of x x and y y are equal (if they are complex conjugates).

  • A Gaussian integer squared will only be an integer if it is purely real or purely imaginary.

Now, using those facts, let's try finding a solution where A A is non-real.

First, because A B AB is an integer, if A A is non-real, then B B must also be non-real (as a non-real number times a purely real number cannot equal another purely real number).

Next, because A + B A+B is an integer, and because A A and B B are both non-real, the imaginary part of B B must be -1 times the imaginary part of A A . Because of the second fact listed above, this means that B B must be the complex conjugate of A A .

Finally, because A 2 + B 2 { A }^{ 2 }+{ B }^{ 2 } is an integer if A 2 { A }^{ 2 } and B 2 { B }^{ 2 } are both integers, A A and B B could either be both purely real or both purely imaginary (because of the third fact listed above). Because we want to find a solution where either A A or B B is imaginary, and because B B is the complex conjugate of A A , A A and B B must both be purely imaginary.

We now have our answer: If A and B are both purely imaginary, if they are both integers upon being divided by i i , and if A = B A=-B , then A 2 + B 2 { A }^{ 2 }+{ B }^{ 2 } , A B AB , and A + B A+B must all be integers without either A A or B B being an integer.

Footnote: This is only one way of solving this problem. There are other valid ways to solve this problem that don't involve imaginary numbers.

First, because A B AB is an integer, if A A or B B is non-real, then B B must be the complex conjugate of A A .

This claim is not true. E.g. i × 2 i = 2 i \times 2i = - 2 .
A close cousin of it is true. The backward implication is true, but not the forward implication.

Calvin Lin Staff - 3 years ago

Log in to reply

Nice catch - I meant to introduce that fact later. Thanks!

Louis Ullman - 3 years ago

Log in to reply

Note: There is a much easier way to deal with your "first" and "next" (which arguably isn't properly dealt with here, or at least not fully elaborated)

In fact, all that we need is for A B AB and A + B A+B to be real in order to conclude that A , B A, B are either 1)both real, or 2)complex conjugates of each other.

Calvin Lin Staff - 3 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...