Can this be considered factoring $a^2 + b^2$? We're told in middle school that there's no easy way to factor $a^2 + b^2$.
However, recently, and I believe this is common knowledge for more advanced mathematicians than me, I came with the following:
$$a^2 + b^2 = (a + b \mathit i)(a - b \mathit i)$$
So, I ask the better heads if this can be considered a factorization of $a^2 + b^2$.
 A: It can be considered a factorisation of $a^2 + b^2$, but it rarely would be without some context indicating that you're supposed to be working in the complex numbers.
I now would like to convince you that $a^2-b^2 = (a+b)(a-b)$ is a "better" factorisation than $a^2+b^2 = (a+bi)(a-bi)$.
For example, consider what happens when we work not in the integers (complex or not), but in the integers mod $n$; let's pick $n=5$ for concreteness.
Then $$2 \equiv -3 = 1 - 4 \equiv 16 - 9 = \underbrace{4^2 - 3^2 = (4+3)(4-3)}_{\text{the factorisation!}} = 7 * 1 = 7 \equiv 2$$ still holds; $a^2 - b^2$ factorises just the same as it ever did.
But what interpretation should we give to the symbol $i$ when we're working in the integers mod $5$?
Well, I guess maybe it's the square root of $-1$, i.e. the square root of $4$, i.e. $i = 2$ (how weird); and indeed $a^2 + b^2 = (a + 2b)(a-2b)$ continues to hold.
What about if we're working mod $3$, where there is no square root of $-1$? In that case, we have to do what we do in the reals and adjoin a new object $i$ which we declare squares to $-1$, and it's not the case that $i$ is equal to an integer mod $3$.
It's all got messy, because now if we want to interpret what $(a+bi)(a-bi)$ means, we now have to work out whether there is a square root of $-1$ mod $n$.
So $a^2 - b^2$ factorises neatly in more general situations than $a^2+b^2$ does.
A: When we say “factoring”, we usually mean taking a positive integer and writing it as the product of two or more positive integers that are not equal to 1. We have a^2-b^2 = (a+b)(a-b) which is a factoring when a and b are both integers. It is not a factoring if a = sqrt(1428) and b = sqrt(3000). The formula is correct, but a and b are not integers. Writing x as the product of two non-integers is trivial, let a ≠ 0 and b= x/a. That’s not a factoring.
What you found is a factoring in the Gauss numbers (complex numbers with real and complex part being integers) but we practically always want to factor in the integers.
