Check out: https://en.wikipedia.org/wiki/Corresponding_squares
And the wiki page is a little limited but this subject can get complex but still very cool.