Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to put terms in lexicographic order?

I write the equation of the plane passing through the three points $A(-1, 5, -2)$, $B(2, 4, -3)$ and $F(4, -8, 6)$, and this is my code

A := {-1, 5, -2};
B := {2, 4, -3};
F := {4, -8, 6};
M := {x, y, z};
u := A - B;
v := A - F;
w := A - M;
n := u\[Cross]v;
Sort[Simplify[w.n] == 0]

I want the equation $ABF$ has the form

$21 x + 29 y + 34 z-56=0$,

but Mathematica out

$0 == -56 + 21 x + 29 y + 34 z$

What must I do? Please help me.

share|improve this question

marked as duplicate by Mr.Wizard Sep 12 '12 at 11:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Try PolynomialForm[Simplify[w.n], TraditionalOrder -> True]. – J. M. Sep 11 '12 at 10:07
up vote 9 down vote accepted

It really does not matter how to write these equation - the order does not influence mathematical statement. Your both cases are correct mathematically. Notation/style is a different matter. Use transition to traditional notation:

TraditionalForm[Simplify[w.n] == 0]

enter image description here

To get a better grip on the subject please read Polynomial Orderings.

share|improve this answer
Also, perhaps a warning is in order: tweaking expressions to have Mathematica write them the way you like is many times very difficult. Avoid trying it until you get a good grip. – Dr. belisarius Sep 11 '12 at 7:09
@belisarius good point. I add a tutorial link. – Vitaliy Kaurov Sep 11 '12 at 7:15

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