Linear Equation ( Slope)

I dont understand why the slope =-1 and why we find slope in linear equation.

Recall the equation for a line is y = mx + b, where b is a constant (your intercept with the y-axis). The slope is -1 because every time you increase your x value (or your horizontal position on the graph, your y value (the vertical axis) decreases (thus the negative sign) by the same amount.

m (your slope) can be found with the formula:

m = (y2 – y1)/(x2 – x1)

Plugging in:

m = (2 - 10)/(8 - 0) = - 1

Keep in mind any two points on the line will work for this, not just those shown.

:grin: Or to put in terms of this graph, every time you gain an apple, you loose a banana, and vice versa. :grin:

Also, this may seem very basic/simple, but as you will see later in neural networks, at least with regards to forward propagation, this is basically what the network is calculating-- Just on steroids (with a few other tricks thrown in). It will surprise you. I know it surprised me.


What is the slop in this case? I am calculating and getting -2

@itsShayanProfile Can you show me what numbers you are using for the formula I gave you ?

Note: You have two unknowns here so you have to look at the points on the line-- Otherwise it is unsolvable given only on equation.

1 Like