The mass of an object is a measure of the amount of matter it contains and depends on the number of atoms in it. Its weight is the gravitational force acting on it from a larger object, like the Earth or the Moon, whichever is nearest to it. As the amount of matter does not change in response to the applied force, the object's mass remains constant. However, its weight depends on its location. An object on the Earth weighs differently than that on Mars or the Moon, but its mass remains the same. The weight change is due to the difference in acceleration due to gravity acting on it. Mass can never be zero, but weight becomes zero when gravitational force does not act on it. Using this observation and Newton's second law, an object of mass m weighs m times vector g. That is to say, the greater the mass of an object, the greater is its weight. Mass is a scalar quantity, but weight is a vector directed towards the Earth's center.