# Could someone help explain about this to me?

**URL:** <https://community.deeplearning.ai/t/could-someone-help-explain-about-this-to-me/336971>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [May 17, 2023, 7:27am UTC](https://community.deeplearning.ai/t/could-someone-help-explain-about-this-to-me/336971 "2023-05-17T07:27:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enfant](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@Enfant](https://community.deeplearning.ai/u/Enfant)\
**Post date:** [May 17, 2023, 7:27am UTC](https://community.deeplearning.ai/t/could-someone-help-explain-about-this-to-me/336971/1 "2023-05-17T07:27:01Z")

</div>

![Screenshot 2566-05-17 at 14.16.57](https://global.discourse-cdn.com/dlai/original/3X/9/d/9de22639c438fc6c11b99a9531bfe8d6201255a1.jpeg)  
That I highlight on the pic I don’t understand why suddenly gets dZ like that  
why it not be dz[1] = a[1] - y ?

---

<div class="post-metadata">

**Author:** ![reinoudbosch](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@reinoudbosch](https://community.deeplearning.ai/u/reinoudbosch)\
**Post date:** [May 24, 2023, 9:26pm UTC](https://community.deeplearning.ai/t/could-someone-help-explain-about-this-to-me/336971/2 "2023-05-24T21:26:17Z")

</div>

Hi Enfant,

dZ[2] is shorthand for dL/dZ[2], with L referring to the loss function. Because of the definition of the loss function, dZ[2] = A[2] - Y. You can find the (non-vectorized) derivation [here](https://community.deeplearning.ai/t/derivation-of-dl-dz/165/2).

In its turn, dZ[1] = dL/dZ[2] \* dZ[2]/dA[1] \* dA[1]/dZ[1] (following the [chain rule](https://en.wikipedia.org/wiki/Chain_rule)).

dZ[2]/dA[1] = W[2] while dA[1]/dZ[1] = g[1]'(Z[1]). This leads to the equation you highlight.
