Understanding the algebra behind a specific partial derivative equation
We know that:
(1) $\frac{\partial}{\partial x}\big (f(x) + g(x) \big) = \frac{\partial}{\partial x}f(x) + \frac{\partial}{\partial x}g(x)$
(2) $\frac{\partial}{\partial x}a = 0$
Now,
\begin{align*}
&amp;\frac{\partial}{\partial w_{12}^{1}} (w_{11}^{1}h_1^{2} + w_{12}^{1}h_2^{2} + w_{13}^{1}h_3^{2} + b_1^{1}) = &amp; \text{[using (1)]}\\
&amp;\frac{\partial}{\partial w_{12}^{1}} (w_{11}^{1}h_1^{2}) + \frac{\partial}{\partial w_{12}^{1}} (w_{12}^{1}h_2^{2}) + \frac{\partial}{\partial w_{12}^{1}} (w_{13}^{1}h_3^{2}) + \frac{\partial}{\partial w_{12}^{1}} b_1^1) = &amp; \\\\
&amp; \text{since } h_1^2 \text{ is independent of } w_{12}^1 \text{ , } h_3^2 \text{ is independent of } w_{12}^1 \text{ , } b_1^1 \text{ is independent of } w_{12}^1 &amp; \text{[using (2)]}\\
&amp; = 0 + \frac{\partial}{\partial w_{12}^{1}} (w_{12}^{1}h_2^{2}) + 0 + 0 \implies \frac{\partial}{\partial w_{12}^{1}} (w_{12}^{1}h_2^{2})
\end{align*}