Theory:

Identities are the algebraic equation which is always true regardless of the values assigned to the variables.
The identities give an alternative method of solving problems on multiplication of algebraic expressions and also of numbers.
Let us recall some of the squaring identities.
1.a+b2=a2+2ab+b22.ab2=a22ab+b23.(a+b)(ab)=(a2b2)4.(x+a)(x+b)=x2+(a+b)x+ab
 
Let us derive the formula by applying distributive property \(a(b+c)\) \(=\) \(ab+bc\).
 
1. We will prove \((a+b)^2\) \(=\) \(a^2+2ab+b^2\).
 
Consider the LHS \((a+b)^2\).
 
We know that the square number/term/expression is the product of itself.
 
Thus, \((a+b)^2 =\) \((a+b)(a+b)\).
 
Apply the distributive property.
 
\((a+b)(a+b)\) \(=\) \((a\times a)\)\(+(a\times b)\)\(+(b\times a)\)\(+(b\times b)\)
 
\(= a^2+ab+ba+b^2\)
 
\(=a^2+ab+ab+b^2\)
 
\(=a^2+2ab+b^2\) \(=\) RHS
 
So \((a+b)^2\) \(=\) \(a^2+2ab+b^2\).
 
 
2. We will prove \((a-b)^2\) \(=\) \(a^2-2ab+b^2\).
 
Consider the LHS \((a-b)^2\).
 
We know that the square number/term/expression is the product of itself.
 
Thus, \((a-b)^2\) \(=\) \((a-b)(a-b)\).
 
Apply the distributive property.
 
\((a-b)(a-b)\) \(=\) \((a\times a)\)\(+(a\times -b)\)\(+(-b\times a)\)\(+(-b\times -b)\)
 
\(= a^2-ab-ba+b^2\)
 
\(=a^2-ab-ab+b^2\)
 
\(=a^2-2ab+b^2\) \(=\) RHS
 
So \((a-b)^2\) \(=\) \(a^2-2ab+b^2\).
 
 
3. We will prove \((a+b)(a-b)\) \(=\) \(a^2-b^2\).
 
Consider the LHS \((a+b)(a-b)\).
 
Apply distributive property.
 
\((a+b)(a-b)\) \(=\) \((a\times a)\)\(+(a\times -b)\)\(+(b\times a)\)\(+(b\times -b)\)
 
\(= a^2-ab+ba-b^2\)
 
\(= a^2-b^2\) \(=\) RHS
 
So \((a+b)(a-b)\) \(=\) \(a^2-b^2\).
 
The identities \(1\), \(2\) and \(3\) are known as Standard identities.
 
 
4. We will now prove \((x+a)(x+b)\) \(=\) \(x^2\)\(+(a+b)x\)\(+ab\).
 
Consider the LHS \((x+a)(x+b)\).
 
Apply the distributive property.
 
\((x+a)(x+b)\) \(=\) \((x\times x)\)\(+(x\times b)\)\(+(a\times x)\)\(+(a\times b)\)
 
\(= x^2+xb+ax+ab\)
 
\(= x^2+ax+bx+ab\)
 
\(= x^2+(a+b)x+ab\) \(=\) RHS
 
So \((x+a)(x+b)\) \(=\) \(x^2\)\(+(a+b)x\)\(+ab\).