https://courses.grainger.illinois.edu/ece329/329Fall2019IlieNotes/Lecture3_annotated.pdf