Welcome back! Let's continue our journey of understanding backpropagation in detail.
Let's briefly recall what we covered in Part 1 so far.
A Quick Recap
We first started trying to understand neural networks using a simple dataset.

In that process, we built a small neural network and understood how it makes predictions through forward propagation.

We then observed that the predicted values were far from the actual values, resulting in a large error. Now, we wanted to train this neural network to perform better.
By comparing it with simple linear regression, we observed that, in our neural network, the loss depends on seven parameters: .
Our complete loss function looked like this:
Next, just as we did in simple linear regression, we wanted to differentiate the loss with respect to each parameter. We started with and used the classical differentiation method, arriving at:
Do We Really Have to Repeat This?
Now it's time to think. We differentiated the loss with respect to , meaning we were finding how the loss changes as changes. We used the classical differentiation method. However, we have six more parameters to differentiate with respect to. Do we need to proceed with the same method? No.
The Chain Rule to the Rescue
If you remember, we discussed the chain rule in Part 1. We used a simple example: and . We noticed that does not depend directly on . Instead, the relationship looks like . This means that when changes, it first changes , and the change in then affects . Since the chain rule efficiently captures such dependencies, we can apply it to our neural network to compute gradients without re-deriving each derivative from scratch. In the context of modern deep learning (2026), frameworks like TensorFlow and PyTorch automate this process using automatic differentiation, but understanding the chain rule remains fundamental for debugging and optimizing models.
