Additional Resources
Here are some online tutorials that cover this material (ordered from less to more detail)
https://towardsdatascience.com/automatic-differentiation-explained-b4ba8e60c2ad
https://stats.stackexchange.com/questions/224140/step-by-step-example-of-reverse-mode-automatic-differentiation
https://rufflewind.com/2016-12-30/reverse-mode-automatic-differentiation
Here is a nice video by Andrew Ng covering the same topic from a slightly different angle:
https://www.youtube.com/watch?v=nJyUyKN-XBQ&t=466s
Here is a video that discusses how we can extend this to vector and matrix quantities:
https://www.youtube.com/watch?v=RP0JScZG6gA