(a+b)^2
=(a+b)(a+b)
=a*a+b*a+a*b+b*b (展开,各项相乘)
=a^2+2ab+b^2 (合并同类项)
(a-b)^2
=(a-b)(a-b)
=a*a+a*(-b)+(-b)*a+(-b)*(-b)
=a^2-2ab+b^2
(a+b)^2
=(a+b)(a+b)
=a*a+b*a+a*b+b*b (展开,各项相乘)
=a^2+2ab+b^2 (合并同类项)
(a-b)^2
=(a-b)(a-b)
=a*a+a*(-b)+(-b)*a+(-b)*(-b)
=a^2-2ab+b^2