https://courses.grainger.illinois.edu/cs498qc3/fa2023/Notes/Lecture-2.pdf