This illustration shows the following two formulas: