If the Sum of Two Squares Is Zero, Are Both Numbers Zero?
At a glance
- 1. Check the number system
Over the real numbers, squares are nonnegative; over the complex numbers, nonzero squares can cancel.
- 2. Use nonnegativity
If real a² + b² = 0, neither square can be positive, so both squares equal zero.
- 3. Take square roots
Since a² = 0 and b² = 0, it follows that a = 0 and b = 0.
- 4. Check the domain
For complex numbers or modular arithmetic, test the claim separately; the real-number argument may not apply.
If and are real numbers and , then both numbers must be zero. The reason is that the square of a real number is never negative, so two real squares cannot cancel each other out.
The number system matters, however. The same statement is false for complex numbers, and it can also fail in arithmetic modulo an integer. Here is the real-number proof and how to recognize those alternatives.
The real-number proof
For real and , we know
Suppose their sum is zero:
Rearrange to get . The left side is nonnegative, while the right side is nonpositive. The only number that is both nonnegative and nonpositive is zero. Thus and , which gives .
You can also see this directly: if either number were nonzero, its square would be positive. Adding the other nonnegative square would make the sum positive, contradicting the assumption that the sum is zero.
A worked example
Suppose and are real and . This is not the zero-sum case, but it illustrates the same nonnegativity principle: each square is at most 25, since neither can exceed the sum.
If instead , then and are both at least zero and add to zero. For instance, if , then , so the sum would be at least 9, not zero. Therefore cannot be 3—or any other nonzero real number. The only possibility is .
For integers, the conclusion is identical. Every integer is real, so the same proof applies. It also applies to rational numbers, since they too are real.
Why the number system matters
In the complex numbers, squares need not be nonnegative real numbers. The imaginary unit satisfies , so
Thus a sum of two complex squares can be zero even when neither term is zero. More generally, if and are complex, the equation factors as
Because the complex numbers have no zero divisors, this means or . These possibilities include nonzero solutions, such as .
There is another caution in modular arithmetic. Modulo 5, for example, , even though neither 2 nor 1 is congruent to zero modulo 5. Modular arithmetic does not have the ordering property that says every square is nonnegative, so the real-number proof does not carry over.
A useful general rule
The conclusion holds in any number system where squares are nonnegative and a sum of nonnegative elements can be zero only if every summand is zero. This includes the real numbers and their subsets such as the rational numbers and integers.
For a sum of more than two real squares, the same argument gives
Each term is nonnegative, so none can be positive if the total is zero.
Common mistakes
- Forgetting to specify the number system. The claim is true for real numbers but false for complex numbers and can be false modulo an integer.
- Assuming one square can cancel another over the reals. A real square is never negative, so cancellation is impossible unless both squares are zero.
- Dividing by one of the variables. If you divide by or , you first assume it is nonzero. That assumption is exactly what the proof must rule out; nonnegativity avoids this issue.
When the variables are stated to be real—or are integers or rationals—the result follows immediately from the nonnegativity of squares.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.