Indicate and explain the logical error in the following set of algebraic expressions

Let a=b

square both sides to get a^2=b^2

a^2=b*b

Since a=b, then a^2=a*b

Subtract b^2 from both sides a^2-b^2=a*b-b^2

Factor both sides: (a+b)(a-b)=b(a-b)

Divide both sides by (a-b)

(a+b)=b

Since a=b

b+b=b or

2b=b

Divide by b

You said " Divide both sides by (a-b) " , but a = b

so you are dividing by zero, which is a no-no in math .