Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

1  
Try PolynomialForm[Simplify[w.n], TraditionalOrder -> True]. –  J. M. Sep 11 '12 at 10:07
add comment

1 Answer 1

up vote 8 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
2  
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. –  belisarius Sep 11 '12 at 7:09
1  
@belisarius good point. I add a tutorial link. –  Vitaliy Kaurov Sep 11 '12 at 7:15
add comment

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