Convex Hull Problem :

how m1-m2 simplyfy into :
(q.y - p.y) * (r.x - q.x) -(q.x - p.x) * (r.y - q.y) ?

its the numerator part of the question ,
as we can see that x is increasing therefore we are not considering the denominator because it will always be positive .
we only need three value i.e. if points are collinear or in anti clockwise direction or in clockwise direction, therefore we are return three values 0,positive or negative and only considering the numerator.
if you are confused how slope is being calculated then refer