
The Vedic god of fire reveals the chemistry of combustion, the physics of flames, and the science of heat.
The First Fire
In the beginning, the world was cold and dark. The Devas — the celestial beings of Hindu mythology — needed a messenger. Someone who could carry offerings from the Earth to the heavens. Someone who could travel between the world of mortals and the world of gods.
That someone was Agni.
Agni is the god of fire. But he is not merely fire in the way you might think of a campfire. In the Vedas — the oldest scriptures of Hinduism, composed over 3,500 years ago — Agni appears in more hymns than any other deity. Over 200 hymns of the Rig Veda are addressed to him. He is the mouth of the gods, the priest of the sacrifice, the light that drives away darkness.
The sages described Agni as having three forms: the fire on Earth (the cooking flame, the sacrificial fire), the lightning in the sky (atmospheric fire), and the Sun in the heavens (celestial fire). Three forms, but one essence — energy released through transformation.
The Birth of Agni
The myths tell many versions of Agni’s birth. In one, he is born from the rubbing of two wooden sticks — the arani sticks. A sage takes a hard stick and drills it rapidly into a softer piece of wood. Smoke curls up. The wood darkens. And then, suddenly, a tiny spark catches on dry grass and blazes into flame. Agni is born.
In another version, Agni hides inside wood and water, afraid of the responsibility the gods have given him. The sages search everywhere. They find him hiding in a shamee tree (Prosopis cineraria), coiled inside the wood like a secret waiting to be told. They coax him out with friction, and he erupts into life.
This is remarkable. Thousands of years before modern chemistry, the Vedic poets understood that fire was inside the wood — stored as potential energy, waiting for the right conditions to release it.
Agni the Transformer
Every Vedic ritual — every yajna — centres on fire. The priest builds a sacred fire pit, arranges wood in precise geometric patterns, and pours offerings of ghee (clarified butter), grains, and herbs into the flames. As the offerings burn, fragrant smoke rises skyward. The sages called this smoke the path to the gods — Agni carrying the offerings upward.
Watch what happens when you pour ghee into a fire. The flame surges upward, brighter and hotter. The ghee — a fat — is dense fuel. It vaporises almost instantly in the heat, mixing with air, and combusts with a rush of energy. The flame turns white-gold. The fire roars.
The Vedic sages categorised fires by colour and purpose. The Garhapatya fire (household fire) burned steady and low — used for cooking, warm and orange. The Ahavaniya fire (offering fire) burned hot and bright — fed with ghee and dry wood. The Dakshinagni fire (southern fire) was maintained as glowing embers — red coals without visible flame.
They were, without using modern terminology, describing different combustion conditions: complete combustion (bright, blue-tinged), incomplete combustion (orange, smoky), and smouldering (glowing embers, low oxygen).
Agni and the Elements
The ancient Indian system of Pancha Bhuta — five elements — lists fire (tejas) alongside earth, water, air, and space. Fire, the sages said, is the element of transformation. It turns wood to ash. It turns water to steam. It turns raw grain into cooked food. Nothing that passes through fire remains unchanged.
Modern chemistry agrees, though with more precision. Fire is a chemical reaction — specifically, rapid oxidation. A hydrocarbon fuel reacts with oxygen, releasing carbon dioxide, water vapour, heat, and light. The equation for burning methane is:
CH₄ + 2O₂ → CO₂ + 2H₂O + energy
The wood, the ghee, the grain — all are hydrocarbons. Agni’s transformation is combustion.
Why Flames Rise
One observation the sages made repeatedly: fire always reaches upward. Flames stretch toward the sky. Smoke climbs. Sparks spiral up into darkness. They interpreted this as Agni’s nature — always ascending, always reaching for the gods above.
Physics explains it differently, but no less beautifully. When fuel burns, it heats the surrounding air. Hot air is less dense than cool air — the molecules move faster and spread apart. Cooler, denser air rushes in from the sides and below, pushing the hot gases upward. This creates a convection current — a continuous upward flow that shapes the flame into its familiar teardrop form.
In zero gravity, there is no convection. Flames on the International Space Station are spherical — round blue balls of fire, nothing like the dancing pointed flames on Earth. The shape of a flame is written by gravity.
The Lesson of Agni
Agni teaches that fire is not destruction — it is transformation. Every fire converts one form of matter into another, one form of energy into another. The wood becomes ash, carbon dioxide, and water vapour. The chemical energy stored in bonds becomes heat and light. Nothing is created. Nothing is destroyed. Only changed.
The Vedic sages watched fire for thousands of years and saw what modern science confirms: fire requires fuel, air, and heat. Remove any one, and the fire dies. They understood that fire lives inside wood, waiting. They observed that different fuels produce different flames. They noted that fire always rises.
They did not call it chemistry. They called it Agni.
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
# Combustion Energy Calculator
fuels = {
"Wood": {"formula": "C6H10O5", "kJ_per_kg": 15000},
"Methane": {"formula": "CH4", "kJ_per_kg": 55500},
"Ghee": {"formula": "C16H32O2","kJ_per_kg": 37000},
"Hydrogen": {"formula": "H2", "kJ_per_kg": 141800},
}
mass_kg = 1.0 # 1 kg of each fuel
print(f"Energy from burning {mass_kg} kg of each fuel:\n")
for name, data in fuels.items():
energy = data["kJ_per_kg"] * mass_kg
print(f" {name:10s} ({data['formula']:>8s}): {energy:>10,.0f} kJ")
# Which fuel gives the most energy per kg? Why?This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build a Combustion Energy Calculator.
By Level 4, enrolled students build: Build a Combustion Energy Calculator
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
The real-world science behind Agni — combustion reactions, flame physics, heat transfer, and spectroscopy.
The big idea: "Agni — The Science of Fire" teaches us about Combustion Chemistry & Thermodynamics — and you don't need to write a single line of code to understand it.
Light a match. Hold it to a piece of paper. The paper catches fire, burns, and turns to ash. Simple, right? But there is a precise set of conditions that must be met for that fire to start — and if you remove any one of them, the fire dies instantly.
Fire needs exactly three things: fuel (something to burn — wood, paper, gas), oxygen (from the air around us — air is about 21% oxygen), and heat (enough energy to start the reaction — the match provides this). These three requirements form the combustion triangle, also called the fire triangle.
Here is the crucial insight: remove any one side of the triangle, and the fire goes out. Cover a candle with a glass jar — you cut off oxygen, and the flame dies within seconds. Throw water on a campfire — you remove heat (water absorbs it), and the fire goes out. Clear a firebreak around a forest fire — you remove fuel, and the fire cannot spread. Every firefighting technique works by attacking one side of the combustion triangle.
The Vedic sages understood this intuitively. The sacred fire pit (the yajna kund) was designed to maximise airflow from below (oxygen supply), with precisely arranged dry wood (fuel), and was started with friction between arani sticks (heat source). They were engineering the combustion triangle thousands of years before chemistry named it.
Check yourself: If you blow gently on a campfire, it burns brighter. But if you blow hard on a candle, it goes out. Why the difference?
Key idea: Fire requires three things: fuel, oxygen, and heat. This is the combustion triangle. Remove any one element and the fire dies. Every method of starting or extinguishing fire works by adding or removing one of these three.
Watch any fire — a candle, a campfire, a gas stove. The flames always reach upward. Even if wind pushes them sideways, the general direction is up. The Vedic poets said Agni reaches toward the gods in the sky. Physics says something equally elegant: hot air rises.
Here is what happens. When fuel burns, it releases heat. This heat warms the air immediately around the flame. Hot air molecules move faster and spread apart — the air becomes less dense. Meanwhile, the cooler, denser air around the flame is pulled downward by gravity. This cooler air rushes in from the sides and below, pushing the hot gas upward. The result is a continuous upward flow called a convection current.
The shape of a flame — that familiar teardrop — is sculpted by this convection current. Fresh cool air feeds the base of the flame (where oxygen meets fuel), and hot combustion gases stream upward, tapering to a point as they cool and slow down.
Here is a stunning proof. On the International Space Station, where there is no gravity, there is no convection. Flames in microgravity are spherical — perfect blue balls of fire, nothing like Earth flames. Without gravity to make cool air sink and hot air rise, the flame spreads equally in all directions. The teardrop shape we know is written by gravity itself.
Check yourself: If hot air rises, why does smoke from incense sometimes drift downward before rising? (Hint: think about temperature.)
Key idea: Flames point upward because combustion heats the surrounding air, making it less dense. Cooler, denser air rushes in from below and pushes the hot gas up — this is convection. In zero gravity (space), flames are spherical because there is no convection.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
Not all flames are the same colour. A candle flame is yellow-orange. A gas stove burns blue. Fireworks explode in red, green, purple, and white. Coppe...
Sit by a campfire and you experience all three modes of heat transfer at once. Your face feels warm even though you are two metres away — that is **ra...