# Week 2 Logistic Regression Gradient Descent: Why is dw\_1 = xdz in logistic regression?

**URL:** <https://community.deeplearning.ai/t/week-2-logistic-regression-gradient-descent-why-is-dw-1-xdz-in-logistic-regression/14911>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [June 18, 2021, 12:05am UTC](https://community.deeplearning.ai/t/week-2-logistic-regression-gradient-descent-why-is-dw-1-xdz-in-logistic-regression/14911 "2021-06-18T00:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomoCoder123](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@TomoCoder123](https://community.deeplearning.ai/u/TomoCoder123)\
**Post date:** [June 18, 2021, 12:05am UTC](https://community.deeplearning.ai/t/week-2-logistic-regression-gradient-descent-why-is-dw-1-xdz-in-logistic-regression/14911/1 "2021-06-18T00:05:07Z")

</div>

I just have a question on the Week 2 Logistic Regression Gradient Descent lesson. I am not quite sure why dw\_1 = x\_1dz in the context of computing gradient descent for logistic regression. Is there a derivation that I do not yet know?

---

<div class="post-metadata">

**Author:** ![jonaslalin](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jonaslalin/32/63_2.png) [@jonaslalin](https://community.deeplearning.ai/u/jonaslalin)\
**Post date:** [June 18, 2021, 12:19pm UTC](https://community.deeplearning.ai/t/week-2-logistic-regression-gradient-descent-why-is-dw-1-xdz-in-logistic-regression/14911/2 "2021-06-18T12:19:17Z")

</div>

Hi @TomoCoder123, see

> [@Dw and db explanation](https://community.deeplearning.ai/t/dw-and-db-explanation/1810/4):
>
> Yes slight_smile Using the chain rule: dL/dw1 = dL/dz \* dz/dw1 = dL/dz \* x1
