Try Solve[Det[({{1, x, y}, {1, a, b}, {1, c, d}})] == 0, y][[1]] //Collect[#, x, Simplify] & (*{y -> (-b c + a d)/(a - c) + ((b - d) x)/(a - c)}*) create equation (% /. Rule -> Equal) [[1]] (*y == (-b c + a d)/(a - c) + ((b - d) x)/(a - c)*)