# C2\_W3\_Lab\_2\_Classification\_with\_Perceptron, Find the line equation

**URL:** <https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479>\
**Category:** Calculus for Machine Learning and Data Science\
**Tags:** week-module-3\
**Created:** [October 2, 2023, 12:42pm UTC](https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479 "2023-10-02T12:42:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asyafa\_Ditra\_Al\_Haun](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Asyafa\_Ditra\_Al\_Haun](https://community.deeplearning.ai/u/Asyafa_Ditra_Al_Haun)\
**Post date:** [October 2, 2023, 12:42pm UTC](https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479/1 "2023-10-02T12:42:21Z")

</div>

![Screenshot 2023-10-02 193852](https://global.discourse-cdn.com/dlai/original/3X/0/d/0da5299a8ed32e03b897c2039c8fc658a7e20354.png)

Where does this formula come from ? Could anyone help me about the math behind it ?

```auto
- W[0,0] / W[0,1] * x_line + -b[0,0] / W[0,1]

```

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [October 2, 2023, 4:43pm UTC](https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479/2 "2023-10-02T16:43:23Z")

</div>

It’s a bit of algebra that lets you plot two points that are on the decision boundary, then draw a line between them.

---

<div class="post-metadata">

**Author:** ![Asyafa\_Ditra\_Al\_Haun](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Asyafa\_Ditra\_Al\_Haun](https://community.deeplearning.ai/u/Asyafa_Ditra_Al_Haun)\
**Post date:** [October 2, 2023, 10:33pm UTC](https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479/3 "2023-10-02T22:33:56Z")

</div>

What is the name of the formula, then ? Could you give me some references ?

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [October 2, 2023, 10:42pm UTC](https://community.deeplearning.ai/t/c2-w3-lab-2-classification-with-perceptron-find-the-line-equation/460479/4 "2023-10-02T22:42:59Z")

</div>

It doesn’t have a special name, it’s just some algebra based on the equation of a line that passes through two points.
