Margarine is a vegetable oil-based fat that was created as a less expensive alternative to butter. Indeed the composition of margarine is very similar to butter, about 80% fat and 15% water, so the two can be used interchangeably. The earliest margarines can be traced back to mid-nineteenth century France. They were composed of beef fat mixed with water and milk solids for a butter-like flavor. When hydrogenation was invented around 1900, food scientists dispensed with the beef fat and moved to the purely vegetable-based formula we know today.
What is hydrogenation and what does it do? Well based on what you now know about fat, you can probably guess. It involves turning a liquid oil into a more broadly useful firm fat by adding hydrogen atoms to its fatty acid chains — which is to say, saturating them. This has the effect of creating more crystal-forming triglyceride molecules, and the fat firms (for all that, margarine still has a lower proportion of saturated fat than butter, lard or suet).
The problem with hydrogenating oil is that if you take the process all the way it creates a fat that’s so hard that it’s almost useless to a home cook. So margarine makers “partially” hydrogenate the oil in order to leave some free liquid fats in the mix. The problem with partial hydrogenation is that it creates a small proportion of trans fats which have become, shall we say, unfashionable in recent years. The funny thing is that all dairy fat contains a small proportion of trans fat and always has. It’s why organic butter can’t be labeled “contains zero trans fats”, because 5% of the fatty acids it contains have the dreaded “trans” bonds in their hydrocarbon chains. But when they’re in margarine or shortening they’re lethal. Go figure.
Oops, am I editorializing? Sorry. The point is that margarine, like butter, has trans fats in it. Margarine in stick form has more, but that’s because it’s firmer. Tub margarine is, by design, made to be spreadable even when it’s cool. However that soft consistency makes it unsuitable for most baking applications, especially laminated doughs. Firm stick margarine, by contrast, is perfect for an application like croissant dough. Indeed this very day there are more margarine-based croissants being made in France than natural butter croissants. And they are darn good!
Margarine melts at almost the same temperature as butter, often just a little higher — around 95 degrees Fahrenheit. That meams cookies made with margarine spread less in the oven as the starches in the flour have more time to relate and firm, and the egg proteins have longer to set.