I am trying to explore how gradient descent works. I found a Formula
$$\begin{aligned} \frac { \partial } { \partial \mathrm { m } } & = \frac { 2 } { N } \sum _ { i = 1 } ^ { N } - x _ { i } \left( y _ { i } - \left( m x _ { i } + b \right) \right) \\ \frac { \partial } { \partial \mathrm { b } } & = \frac { 2 } { N } \sum _ { i = 1 } ^ { N } - \left( y _ { i } - \left( m x _ { i } + b \right) \right) \end{aligned}$$
I don't understand one thing, trying to find a derivative, why $-(2/n)$ is being used? I just started to learn about derivatives in my math class, I didn't learn this derivative rule. I read a few articles but none explain why $-(2/n)$ is used.
It's basically just the chain rule (and the fact that differentiation is linear).
I'm assuming you are trying to differentiate a cost function $C(m,b) := \frac{1}{N}\sum\limits_{i=1}^{N}(y_{i} - mx_{i} - b)^{2}$. Note that because of the chain rule, we have $$\frac{\partial}{\partial m}\left( (y_{i} - mx_{i} - b)^{2} \right) = 2(y_{i} - mx_{i} - b) \times \underbrace{\frac{\partial}{\partial m} (y_{i} - mx_{i} - b)}_{=-x_{i}} = -2x_{i}(y_{i} - mx_{i} - b). $$
Therefore, we have
$\begin{align*} \frac{\partial C}{ \partial m} &= \frac{\partial}{\partial m} \left(\frac{1}{N}\sum\limits_{i=1}^{N}(y_{i} - mx_{i} - b)^{2}\right) \\ &= \frac{1}{N}\sum\limits_{i=1}^{N} \frac{\partial}{\partial m}(y_{i} - mx_{i} - b)^{2} \tag{differentiation is linear}\\ &= \frac{1}{N}\sum\limits_{i=1}^{N} (-2x_{i}(y_{i} - mx_{i} - b)) \\ &= \frac{2}{N}\sum\limits_{i=1}^{N}-x_{i}(y_{i} - mx_{i} - b), \end{align*}$
which gives us your first formula. The second formula can be obtained similarly.