Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. 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

I've just seen this graph and while it's isn't the first 3d graph I've seen, as a math "noob" I never thought how these graphs are plotted. I can draw 2d graphs on paper by marking the input and output values of a function. It's also easy for me to visualize what the graph I'm seeing says about the function but what about graphs for functions with 2 variables? How do I approach drawing and understanding the visualization?

share|cite|improve this question
+1, for so nice hat! – Salech Alhasov Mar 30 '12 at 21:37
Since when did Google do that? – David Mitra Mar 30 '12 at 22:41

Set your function equal to a given constant, this give you a function you are used to, and varying the height (ie what you set your function equal to) gives you the graph (2d) of the surface intersected with planes parallel to the xy-plane. Its essentially the same as a contour map of a mountain.

share|cite|improve this answer

An illustration should make things more clear. Here is the function you mentioned: ContourPlot3D[Sqrt[x*x+y*y]+3*Cos[Sqrt[x*x+y*y]]+5==z,{x,-4,4},{y,-4,4},{z,5,10},MeshFunctions->{#3&},ContourStyle->Opacity[0.75]]

I have drawn contours (the black curves) to indicate the set of points for which the function is equal to a particular constant. As you go up the "wall" from one contour "rung" to the next, the value of the function (the z axis) increases.

share|cite|improve this answer

It's the same idea as a two-dimensional graph. Instead of one variable for input, you have two, so instead of a line for inputs you need a plane for inputs. Then, if it's a real-valued function, $f(x,y)$ is a real value, so you still only need one line for output.

Then, over the input plane, you place the points $(x, y, f(x,y))$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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