How to calculate the problem of 1002 & # 178; - 1002 * 4 + 4?

How to calculate the problem of 1002 & # 178; - 1002 * 4 + 4?

1002²-1002*4+4
=1002*(1002-4)+4
=1002*998+4
=(1000+2)*(1000-2)+4
=1000²-4+4
=1000²
=1000000