Can we actually walk along the gradient of a scalar to climb the hill faster?

I know from my physics classes that gradient of a scalar points in the direction normal to a plane passing through the point or in other words it is perpendicular to constant height surface.

Imagine climbing a hill. In the following picture heights are the constant surfaces represented by planes.

But the normal to the plane passing through a point on the hill is directed into the sky through the air.

Is it actually possible to walk along this path? I mean we can't really walk upwards against gravity! But normal to the constant height surface point straight up!

enter image description here

• I actually dislike the “climbing a hill” picture for explaining the gradient, because it frequently causes this confusion. I prefer to imagine that $f(x,y,z)$ is the temperature at the location $(x,y,z)$. The gradient vector tells you which way to move to make the temperature increase as rapidly as possible. Dec 1, 2021 at 5:37

Your function acts from $$\mathbb{R}^2$$ to $$\mathbb{R}$$ (the height of a given point). Through the point you have chosen, you can draw a circle on which the function is constant (assuming that the hill has the appropriate shape). The vector (in the plane $$\mathbb{R}^2$$) pointing to the center of the hill is really perpendicular to this circle at this point.

That is, your mistake is that you misunderstood what "constant height surface" means. We are talking about a surface (dimension $$n-1$$) in the domain of the function, and not anywhere in its graph.

• Circle through the point is in a plane R^2 . And according to you gradient vector in R^2 pointing to the the center of hill is also in the same plane. But how can the vector be normal to a plane if it is along the plane? Also how, in such a case gradient points in the direction of "increasing" function. According to you the vector is still in R^2 plane...but we need to go up to "increase height" and not remain in the same plane Dec 1, 2021 at 5:46
• The vector is normal to this circle. In this case, the n-1 surface is a circle. Dec 1, 2021 at 5:50
• So can we walk along the gradient of scalar? Dec 1, 2021 at 5:52
• Yes. In this case, the surface of dimension $n-1$ is a circle, because the domain of the function is 2-dimensional $(n = 2)$. You will have a 2-dimensional surface (but not necessarily a plane) if the function will act from $\mathbb{R}^3$ to $\mathbb{R}$. Dec 1, 2021 at 5:54
• Thank you. I understood it finally!! I'm giving summary...The constant surfaces must be part of the function domain(n-1 dimension). From my picture they are concentric circles like a ring. Middle part of the ring is hollow because that part is "inside the hill" not on it, not part of function. Gradient is not in up or z direction. It is pointing only in x-y plane. At any point it is pointing ''into'' the mountain. But it doesn't mean we can can walk ''inside'' the mountain by digging the rocks and soil. It is just a direction we need to take to climb faster. It is projection of steepness on 2d Dec 1, 2021 at 6:48

This image colors vectors to represent their length to cut back on clutter (warmer colors represent longer vectors). Those vectors constitute the gradient, and they point horizontally, whereas the surface is $$3$$-dimensional. So what is the relation between the surface and its gradient?

For an intuitive idea, imagine a video game character not particularly susceptible to gravity, such as an ant, standing on either the inside or the outside of the surface. The vector directly beneath your character tells you how to hold the control stick in order to move him in the direction of steepest ascent (assuming the game's camera cooperates). The length (here color) of that vector tells you how steep it will be. This should give an intuition on how movement along a $$3$$-dimensional function can be controlled using only $$2$$ dimensions.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 7, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/4320829/can-we-actually-walk-along-the-gradient-of-a-scalar-to-climb-the-hill-faster/4320841", "fetch_time": 1716774379000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2024-22/segments/1715971058984.87/warc/CC-MAIN-20240526231446-20240527021446-00238.warc.gz", "warc_record_offset": 320138817, "warc_record_length": 37917, "token_count": 932, "char_count": 3945, "score": 4.0, "int_score": 4, "crawl": "CC-MAIN-2024-22", "snapshot_type": "latest", "language": "en", "language_score": 0.943000078201294, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00035-of-00064.parquet"}