# How to reduce this equation to the form of y == k*x + b

I want to reduce this equation to the form of y == kx + b, but I cann't do that using MMA.

Collect[(Det[( {
{1, x, y},
{1, a, b},
{1, c, d}
} )] == 0) // FullSimplify(*Two points determine a straight line*), {x, y}]

• Have a look at Solve. Commented Jan 16, 2020 at 10:15
• I've changed my goal to y == kx + b. Commented Jan 17, 2020 at 0:28

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)*)

• But it's not in the format of y = k * x + B, it needs some other operations, such as ApplySides. Commented Jan 16, 2020 at 10:20
• I modiefied my answer... Commented Jan 16, 2020 at 10:22

I solve this problem like this, but it's too complicated.

SolveAlways[
Det[({{1, x, y}, {1, a, b}, {1, c, d}})] == A*y + B*x + CC &&
k != 0, {x, y}]
Defer[(y == -(B/A)*x - CC/A == 0)] /. %