Here we have couple of math properties,if you do follow the rules you will really end up on right square, properties are called invariants.