Source: https://engineering.purdue.edu/wcchew/ece604f19/Lecture Notes/Lect2.pdf