2
$\begingroup$

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}]
$\endgroup$
2

2 Answers 2

6
$\begingroup$

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)*)
$\endgroup$
2
  • $\begingroup$ But it's not in the format of y = k * x + B, it needs some other operations, such as ApplySides. $\endgroup$ Jan 16, 2020 at 10:20
  • 1
    $\begingroup$ I modiefied my answer... $\endgroup$ Jan 16, 2020 at 10:22
1
$\begingroup$

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)] /. %
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.