Theroem: Given two points $A$ and $B$ with coordinates $(x_A;y_A)$ and $(x_B;y_B)$ then the equation of the line passing trough both $A$ and $B$ is $$y= y_{A/B}+\frac{\Delta y}{\Delta x}\cdot(x-x_{A/B})$$ $$ \text{where} \frac{\Delta y}{\Delta x}=\frac{y_A-y_B}{x_A-x_B}=\frac{y_B-y_A}{x_B-x_A}$$
Demonstration:
The equation for a generic line in the cartesian plane is $y=mx+c$.
We know that
$$\tan(\alpha)=\frac{b}{a}=\frac{y_B-y_a}{x_B-x_A}=\frac{y_A-y_B}{x_A-x_B}$$

Since $\alpha=\tan^{-1}(\tan\alpha)$ $$\alpha=\tan^{-1} \frac{y_B-y_a}{x_B-x_A}=\tan^{-1}\frac{y_A-y_B}{x_A-x_B}$$ From this post here we have that $\alpha = \tan^{-1}(m)$ so we have: $$\alpha = \tan^{-1}(m)=\tan^{-1}\frac{\Delta y}{\Delta x}\rightarrow m=\frac{\Delta y}{\Delta x} \tag {1}$$
If $y = mx+c$ then $c=y-mx$ where $y$ and $x$ are the coordinates of a generic point on the line; so we can rewrite $$c=y_A -\frac{\Delta y}{\Delta x}\cdot x_A=y_B -\frac{\Delta y}{\Delta x}\cdot x_B = y_{A/B} -\frac{\Delta y}{\Delta x}\cdot x_{A/B} \tag 2$$ Finally we have: $m=\frac{\Delta y}{\Delta x} \tag {1}$
$c=y_{A/B} -\frac{\Delta y}{\Delta x}\cdot x_{A/B} \tag 2$ And since $y= mx+c$ the final equation is: $$y=\frac{\Delta y}{\Delta x}\cdot x + y_{A/B} -\frac{\Delta y}{\Delta x}\cdot x_{A/B} ; \ y=y_{A/B} + \frac{\Delta y}{\Delta x}\cdot (x-x_{A/B})$$ QED
Is this correct?
p.s. I don't now anything about calculus but I noticed that $\frac{\Delta y}{\Delta x}$ should be the derivative of the function or something...
