Follow along with me using this interactive applet: https://www.mathopenref.com/coordrectangle.html