Why is heat not measured in $\rm kg\,K$? I'm trying to understand thermodynamics. The way I think about total heat energy is by multiplying the temperature by the mass. So 100 kg of matter at a temperature of 500 K would have the same "total heat energy" as 500 kg at 100 K, or 250 kg at 200 K.
If that were true, then joules would be measured in $\rm kg\,K$. But they are actually measured in kg m$^2$ s$^{−2}$. Not even a kelvin is involved there.
It's hard to figure out what all of that means, but with time involved it looks like a rate or force. Yet joules are a scalar, and watts (joules per second) are the vector.
Is there something else in physics that is measured in $\rm kg\,K$? Am I thinking of "total heat energy" in a completely wrong way?
I have read Wikipedia's article on the joule. I can quote it but don't really understand it when it comes to heat. The problem is that the joule is used for a lot of things. Energy, exergy, entropy (edit oops, not entropy, that's J/K), enthalpy, maybe other things I'm not aware of. And if inverse seconds are involved, then I really get confused about how the joule could be a scalar quantity. And the lack of a kelvin at all in the joule definition just seems really weird.
 A: Temperature is not a measure of energy. It seems what you are doing is you are interpreting temperature as a kind of "energy per unit mass", but that is not the case - otherwise we'd just use that: energy per unit mass (joules per kilogram, say), and we would not need a separate unit (kelvin) for temperature. It's far from unrelated to energy, and indeed, the higher the temperature, the more energy the system will have, but it's far from a simple, straightforward relationship between the two as you posit. In particular, two objects at the same temperature and with the same mass may very well contain different amounts of energy.
It's hard to give a solid intuitive definition of just what temperature "is" by itself -  perhaps the best one can think of it as is the basic governing parameter of thermodynamic phenomena. Moreover, much of thermodynamics concerns temperature differences than just absolute temperatures: the more difference in temperature between two objects, the more of their internal energy can be converted into mechanical work, and the more readily the object of higher temperature dumps energy into the one of lower temperature. Indeed, it is these properties that can be used to construct a definition of temperature empirically, because they let us create an ordered set (a mathematical structure where you can assert a claim that an object is "lesser" or "greater" or "precedes" or "succeeds" another in some way) of categories of objects-at-a-given-moment on this basis, by comparing their energy flows. But the point is, it itself is not energy.
Energy, incidentally, is somewhat easier to explain intuitively - energy can be thought of as a kind of "money" that must be "spent" by one system to cause changes in another system, while the total amount of this "money" in the universe is a constant. Anything you want to do - accelerate an object, heat or cool it (i.e. change the temperature), lift it up, etc. - all require some amount of energy to be expended (which may in some cases be negative, i.e. the process gives energy to you.).
The reason energy has the units you mention is because of how the SI system of units is constructed - it's not something innate about energy itself. Energy is defined in terms of mechanical quantities: one joule is the energy required to generate mechanical work equal to pushing an object with one newton of force over one meter of distance. Force, in turn, involves mass and acceleration (Newton's second law) - thus, the units of energy ultimately will use mass, distance, and time.
However, there's no reason we have to do things this way. It's just based on the usual exposition of physics, starting with mass and motion first under the tired old Newton's Three Laws premises. We could start physics on other grounds, and then we would not necessarily have the unit of energy defined in terms of mass, length, and time.
One more note - you ask about what makes energy a scalar quantity. Being a scalar quantity is a mathematical property. In simple terms, it means the quantity is directly a real number, perhaps with units, and not drawn from a vector space over the real numbers.
A: The kinetic energy (in Joules), for each atom in a gas, is $\frac{3kT}{2}$, where $k$ is Boltzmann's constant and $T$ is the temperature in Kelvin.
The number of atoms in each gram depends on the atomic mass; for example, 12 g of carbon has Avogadro's number ($6.02\times 10^{23}$) atoms of carbon.
The total heat energy is then the kinetic energy times the number of atoms, but not necessarily the kinetic energy times the mass.
You could look into specific heat capacity, measured in $\mathrm{J}\,\mathrm{kg^{-1}}\,\mathrm{K^{-1}} $,
which is a measure of how much energy is needed to heat (in Joules) 1 kg of a substance by 1 kelvin; there is a formula similar to what you suspected:
$E=mc\Delta\Theta$
where $E$ is the change in heat energy, $c$ is the specific heat capacity and $\Delta\Theta$ is the change in temperature.
Why the specific heat capacity varies from substance to substance was asked here.
A: Yeah, you are basically right that heat should be something like Kg K. But maybe use the number of particles ($N$) instead of mass. Temperature is just the average kinetic energy of the particles, so multiplying it by N gives the total kinetic energy. So it makes sense. And the unit is NK, where N has no unit, and K has the unit of $\frac{1}{2} m v^2$. Velocity is just $ms^{-1}$, so it looks like the unit of heat is $kg m^2 s^{−2}$ as you mentioned.
The problem with saying 'heat is NK' is that when you add heat, it doesn't all go into kinetic energy of the particles (temperature). There are other places that heat can go. Maybe some energy is getting stuck in rotational modes, or maybe some energy is getting stuck in vibrations, or maybe some energy is being used by a particle to escape the potential energy well of its neighbours. So when you add heat to a material, only some fraction of it becomes temperature (kinetic energy). It changes for each material as well. So it doesn't exactly work out, and you need a different unit.
A: Energy is not temperature. The lack of kelvins in the definition of the joule is not weird when you consider that every material requires a different amount of joules to heat up by 1 kelvin, and during a phase change, there is no change in temperature (kelvins) at all even as you add or remove energy (joules). You can add a bunch of joules to a material, and not all of it will show up as a temperature change. If I have water at boiling at 100°C producing water vapour, neither adding nor removing joules changes the temperature of either liquid or vapour. It just changes the amount of liquid and vapour.
