Does this proof of the binomial expansion (a+b)^2 work? I was rereading Terence Tao's Analysis 1 and found this question in the section:

Exercise $2.3.4.$ Prove the identity $(a + b)^2 = a^2 + 2ab + b^2$ for all natural
numbers a, b.

Prior to this we already have proved:
$1.a\cdot b=b\cdot a\\2.a\cdot b=0\implies a=0\lor b=0\\3.a\cdot (b\cdot c)=(a\cdot b)\cdot c\\4. a\cdot (b+c)=a\cdot b+a\cdot c\\$
So I wrote this down:
$(x+y)^2\\=(x+y)(x+y)\\=x(x+y)+y(x+y)\\=x^2+xy+xy+y^2\\=x^2+2xy+y^2$
Is this a valid proof?

Basically correct, but here are two remarks:

*

*From $(x + y)(x + y)$ to $x(x + y) + y(x + y)$ you need the result $(a + b)\cdot c = a \cdot c + b \cdot c$ which can be proved from 1. 4. but you haven't done it.


*From $x(x + y) + y(x + y)$ you can only get $(x^2 + xy) + (yx + y^2)$. In order to be able to write it as $x^2 + xy + xy + y^2$, you need to know that $+$ is associative, namely $(a + b) + c = a + (b + c)$, so that order of addition doesn't matter.
