# How to draw normal vector in Mathematica? [duplicate]

Question

If I have plane equation $x+y+z=0$, then normal vector is $\{1,1,1\}$. Why is it not normal visually? How can I draw it properly?

Code

p1 = Plot3D[-x-y, {x,-1,1},{y,-1,1}];
p2 = Graphics3D[Line[{{0,0,0},{1,1,1}}]];
Show[p1,p2]


Output • Because of the aspect ratios of the axes (they are not on the same scale). Please always post correctly formatted, copy-and-pastable code rather than screen captures of your code. – march Nov 25 '15 at 23:13
• Use BoxRatios -> Automatic. – user484 Nov 25 '15 at 23:19

## 1 Answer

I see a black line from $(0,0,0)$ to $(1,1,1)$

The reason it does not appear to be orthogonal to the brown plane is the scale of the vertical axis not matching the scales of the other two axes either in range or in size. Stretch it and it looks better • what is the right way to match axes? – stiv Nov 25 '15 at 22:45
• @stiv - That is a programming question, but I have added a stretched image which looks more orthogonal – Henry Nov 25 '15 at 22:50
• I guess there should be some option for mathematica? – stiv Nov 25 '15 at 22:55
• I believe you need to use the option boxratios->{1,1,1} – Michael McCain Nov 26 '15 at 4:54
• @michael No, BoxRatios->Automatic. {1,1,1} is only ok if the plot ranges are the same. – Sjoerd C. de Vries Nov 26 '15 at 7:44