# Scalar or vector?

#### hexa

Hello,

I've been wondering if a heightfield is a scalar or a vector, and how many dimensions in space it has.

Sure, if it's a scalar it only has a magnitude, and as a vector magnitude and direction but I cannot see either, or keep them apart in this case. Density or gravityacceleration are easier I guess.

Dimensions: 2 would work out: h=(x,y) but would 1d and 3d possible as well?
Hexa

Last edited:

#### DavidBektas

Hello Hexa,

in the case of h=h(x,y) you get for each set of values x and y a corresponding height h, which is a scalar. Or to put it another way: For every point on the x-y-surface you get a certain height h. So alltogether the function describes a 2-Dimensional surface in a 3-Dimensional space.

I hope that was helpful for you.

#### hexa

Hi David,

that was also my intuition. I got confused by an old exam question about visualising such heightfield as vectorfield and could not find a direction.

Thanks a lot

Hexa

DavidBektas said:
Hello Hexa,

in the case of h=h(x,y) you get for each set of values x and y a corresponding height h, which is a scalar. Or to put it another way: For every point on the x-y-surface you get a certain height h. So alltogether the function describes a 2-Dimensional surface in a 3-Dimensional space.

I hope that was helpful for you.

### The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving