In short

The first law of thermodynamics is energy conservation, written for a system that can exchange energy with its surroundings in exactly two ways — as heat Q (driven by a temperature difference) or as work W (driven by a volume change against pressure). If U is the system's internal energy — the total kinetic and potential energy of all its molecules — then the change \Delta U over any process equals the heat added minus the work done by the system:

\boxed{\;\Delta U \;=\; Q \;-\; W\;}

Sign conventions (used consistently in this article and throughout padho-wiki): Q > 0 when heat flows into the system; W > 0 when the system does work on its surroundings (by expanding). The work done by a gas that changes volume from V_1 to V_2 is

W \;=\; \int_{V_1}^{V_2} P\, dV,

which is just the area under the process curve on a pressure-volume diagram. Internal energy U is a state function — it depends only on the current state of the system (for an ideal gas, on T alone) — while Q and W are path functions: two different paths between the same endpoints can have different Q and W, but their difference Q - W is always the same \Delta U. A pressure cooker sealed on a hot stove absorbs Q > 0 from the flame, does W = 0 on its rigid walls, and so its internal energy — and its temperature, and its pressure — climb until the regulator lifts. That regulator is the first law made audible.

A pressure cooker sits on your kitchen flame in Pune. Inside, two cups of water, a fistful of rajma, and a few hundred grams of steam already pushing against the lid. The flame below is pumping energy in; no matter is leaving (the lid is sealed); and yet the temperature climbs, the pressure climbs, and eventually the weight on top lifts with a loud hiss. Where is the energy going? Not out — the lid is holding. Not into motion of the whole cooker — it is sitting still. It is going into the gas and water inside, raising their internal energy, which shows up as a rise in temperature and pressure. The regulator hisses because the gas is now strong enough to lift a metal weight; what you hear is the gas doing mechanical work on that weight.

This is the first law of thermodynamics at work, and it is the most useful single equation in physical chemistry, engineering, climate science, biology, and large parts of astrophysics. It says only one thing — energy is conserved — but it says it for systems that cannot be treated as single rigid objects. A gas in a cylinder does not have "a position" or "a velocity". It has a state: a pressure, a volume, a temperature, an amount of stuff. And the first law tracks, cleanly and without mysticism, exactly how the energy stored in that state changes when you heat the gas or push on its piston.

The job of this article is to make the equation \Delta U = Q - W feel inevitable. You will see where the internal energy U comes from (microscopic kinetic plus potential energy of the molecules), where the work W = \int P\, dV comes from (push-times-distance, summed over a moving piston), why Q and W individually depend on how you take the system from one state to another, while \Delta U does not, and how to read off each of those quantities for the four processes an Indian class-11 textbook will throw at you. By the end, a JEE problem that gives you two of Q, W, \Delta U and asks for the third will be a matter of reading the sign conventions and adding.

Systems, surroundings, and the thing you are tracking

Before any book-keeping, you need to know what you are counting. A thermodynamic system is whatever you draw the boundary around — the gas inside a cylinder, the water inside a pressure cooker, the air inside a balloon, the chamber of a car engine at one moment in its cycle. The surroundings is everything else that can exchange energy with the system through that boundary — the piston above the gas, the flame below the cooker, the walls of the balloon, the cold outside air. The boundary is the imaginary surface you are drawing between the two.

Three kinds of boundary matter for the first law:

A boundary can combine these: a thermos piston (moving but adiabatic), a rigid but perfectly heat-conducting wall (fixed volume, free heat flow). The first law will handle all combinations with the same one equation.

System, boundary, surroundings with Q and W arrowsA cylinder containing a gas is drawn at centre. A piston sits on top of the gas. A flame below the cylinder points up with an arrow labelled Q into the system. Above the piston, an arrow labelled W points out of the system, representing work done by the gas on its surroundings. The cylinder walls are labelled boundary. Outside everything is labelled surroundings.piston (movable)gasthe systemQ (heat in)W (work out)boundarysurroundings
The basic picture. Draw a boundary around whatever you want to track; call that the *system*. Everything outside is the *surroundings*. The first law monitors two channels through which energy can cross the boundary: heat $Q$ (here, from the flame) and work $W$ (here, the gas lifting the piston). With the sign convention used throughout this article, both arrows here are positive.

Internal energy — what is actually in the cylinder

Drop a thermometer into the pressure cooker in your kitchen and it reads, say, 395 K once the regulator is hissing. What does that number mean, microscopically? You already saw in kinetic theory that for an ideal gas, temperature is proportional to the average translational kinetic energy per molecule:

\tfrac{1}{2} m \langle v^2 \rangle \;=\; \tfrac{3}{2} k_B T.

Each of the N molecules in the cooker has, on average, that much kinetic energy. But molecules can also rotate and vibrate (see degrees of freedom and equipartition); each active quadratic degree of freedom contributes another \frac{1}{2} k_B T of kinetic-or-potential energy per molecule. Real gases have weak intermolecular forces, which store a little potential energy too.

Add it all up and you get the internal energy U of the system:

U \;=\; \underbrace{\text{total translational KE of all molecules}}_{\text{kinetic theory}} \;+\; \underbrace{\text{rotational + vibrational energy}}_{\text{equipartition}} \;+\; \underbrace{\text{intermolecular potential energy}}_{\text{real-gas correction}}.

For an ideal monatomic gas (helium, neon, argon) where molecules have only three translational degrees of freedom and no intermolecular forces:

U \;=\; N \cdot \tfrac{3}{2} k_B T \;=\; \tfrac{3}{2}\, n R T,

Why: multiply the per-molecule average \frac{3}{2} k_B T by the number of molecules N = n N_A; use N_A k_B = R to get the per-mole form.

For an ideal diatomic gas at room temperature (nitrogen, oxygen — this is the air around you), there are three translational plus two active rotational degrees of freedom, so:

U \;=\; \tfrac{5}{2}\, n R T.

Why: each of the five active quadratic degrees of freedom gets \frac{1}{2} k_B T per molecule by equipartition; five times \frac{1}{2} is \frac{5}{2}.

Two facts follow from these formulas and will be used all over thermodynamics:

  1. For any ideal gas, U depends on T alone — not on P, not on V separately. Doubling the pressure of a gas at constant temperature does not change its internal energy, because the molecules are still moving at the same average speed. Only raising T raises U.

  2. U is a state function. Give me n, T, and the type of gas, and I can tell you U without asking how you got there. It does not matter whether you reached 395 K by heating quickly or slowly, by compressing then cooling then heating again, or by any other route. Two paths ending in the same (n, T) give the same U.

This second fact is the technical underpinning of the whole first law. Two paths between the same endpoints can involve wildly different Q and W, but the difference Q - W is pinned down — it has to equal \Delta U, and \Delta U depends only on the endpoints.

Heat Q — energy flow driven by temperature difference

Heat is energy transferred across a system boundary because of a temperature difference. When you put a cold pot of water on a hot flame, energy flows from flame to pot; when you put a hot chai cup on a cold marble slab, energy flows from cup to slab. The flow is always "downhill" in temperature, and it stops when the two temperatures match (this is the zeroth law of thermodynamics, already in your bones from daily experience).

The units of heat are joules in SI. Indian textbooks and older physics papers often use the calorie (1 cal = 4.186 J), defined historically as the heat needed to raise the temperature of 1 g of water by 1 K at 15 °C. You will also see the kilocalorie ("food calorie") in nutrition — a samosa, roughly 260 kcal, carries about 260 \times 4186 \approx 1.09 \times 10^6 joules of chemical potential energy, of which any portion released as heat is a Q into your body.

Sign convention (critical — used throughout this wiki). Q is positive when heat flows into the system and negative when heat flows out. This is the modern physics convention, used by all Indian CBSE and NCERT textbooks and by JEE; some older chemistry texts use the opposite sign for W but the same sign for Q, so watch the source when cross-reading.

A typical calibration: to raise the temperature of 1 kg of water by 1 K requires about 4186 J; to raise the temperature of 1 kg of aluminium by 1 K requires only about 900 J; to raise the temperature of 1 kg of air at constant volume by 1 K requires about 718 J. These numbers are specific heats, and they will return in full detail in isobaric and isochoric processes along with the Mayer relation C_P - C_V = R.

Work W — energy flow driven by volume change

Picture the cylinder and piston in the figure above. Gas at pressure P pushes upward on the piston; the piston has area A, so the gas exerts a force F = PA on it. If the piston moves outward by an infinitesimal distance dx, the gas does an infinitesimal amount of mechanical work on it:

dW \;=\; F\, dx \;=\; PA\, dx \;=\; P\, (A\, dx) \;=\; P\, dV,

Why: A\, dx is the tiny volume swept out by the piston as it moves. The work done by the gas on the piston is force times distance, which reorganises into pressure times the volume change.

Integrate over a finite change in volume from V_1 to V_2:

\boxed{\;W \;=\; \int_{V_1}^{V_2} P\, dV\;}

Why: during the process, pressure is generally a function of volume (the gas changes state as the piston moves). Summing up P\, dV over the whole process gives the total work.

Geometrically, W is the area under the process curve on a pressure-volume diagram — a fact that deserves a section of its own (see PV diagrams and work). The sign falls out cleanly from the integral:

Two special cases deserve to be at your fingertips because they appear in every thermodynamics problem:

Isobaric (constant pressure). If P is constant, pull it out of the integral:

W_{\text{isobaric}} \;=\; P\, \int_{V_1}^{V_2} dV \;=\; P\,(V_2 - V_1) \;=\; P\,\Delta V.

Isochoric (constant volume). If the volume does not change, dV = 0 everywhere and

W_{\text{isochoric}} \;=\; 0.

A rigid sealed container can absorb heat without doing any work — all the heat goes into raising U and hence the temperature. This is exactly what happens in the pressure cooker before the regulator lifts.

Isothermal and adiabatic work require a bit more algebra (one involves \int dV/V and produces a \ln; the other requires the relation PV^\gamma = \text{const}) and are derived in full in thermodynamic processes — isothermal and adiabatic.

The sign-convention warning that catches everyone

The variable W in the first law — "\Delta U = Q - W" — is defined as work done by the system on the surroundings. This is the physics convention. You will occasionally see a chemistry textbook write \Delta U = Q + W with W defined as work done on the system; the two forms are algebraically identical, but if you mix sources you will get a sign error every time. For this article and everywhere in padho-wiki physics, stick with:

\boxed{\;W = \text{work done BY the system};\qquad Q = \text{heat added TO the system}.\;}

The first law — energy conservation, rewritten

Now put the pieces together. Over any process, the system's internal energy can change only through the two boundary channels: heat in, and work out. Energy is conserved, so

\Delta U \;=\; (\text{energy in as heat}) \;-\; (\text{energy out as work})
\boxed{\;\Delta U \;=\; Q \;-\; W\;} \tag{first law}

In differential form, for an infinitesimal step:

dU \;=\; dQ \;-\; dW \;=\; dQ \;-\; P\, dV.

(A side note on notation: many texts write \delta Q and \delta W with deltas, not d, to emphasise that Q and W are path functions and the infinitesimals are not exact differentials. The physics is the same; this article uses ordinary d and flags the distinction where it matters.)

The fact worth carving into your memory. \Delta U between two states depends only on those two states. Q and W individually depend on the path — on how you got from one state to the other. But their difference Q - W equals \Delta U, which is path-independent. That is the whole technical content of the first law.

Why should you believe this? Two arguments, both worth holding in your head at once:

  1. Microscopic: U is a function of the molecular configuration — in the ideal gas case, of T alone. Heat and work are just two ways of changing that molecular configuration. Heat does it by transferring energy through molecular collisions at the boundary; work does it by moving the boundary through distance. Both end up as molecular kinetic + potential energy in the system. Energy is neither created nor destroyed, so the totals balance.

  2. Experimental: James Joule's 1843 paddle-wheel experiment — a falling weight turned a paddle inside an insulated vat of water, raising the water's temperature by exactly the amount that would require a known Q by direct heating. Mechanical work converted into internal energy in a measurable, reproducible ratio. This is the ancestor of every calorimetry experiment in every Indian school lab, and it is how physicists first became sure that heat and work are the same kind of thing — both are energy in transit across a boundary.

A live simulation — heat flows in, work flows out, internal energy climbs

Animated: a piston rises at constant pressure as heat is added Inside a vertical cylinder, a piston moves upward linearly with time from height 1 to height 3.5 as heat enters from below. A red dot marks the piston face; its vertical trail records position over time. Axis labels mark time in seconds on the horizontal axis and volume in arbitrary units on the vertical. cylinder volume V time →
As heat $Q$ enters the gas (flame below, not drawn), the gas pushes the piston up at constant pressure. Volume grows linearly with time here (a pedagogical choice), so work $W = P\Delta V$ accumulates linearly too. Watch the trail grow — that trail is, up to a scale factor, the running integral of $P\, dV$. Click **replay** to watch again.

Sign conventions in one table

One mistake students make in every thermodynamics exam is getting a sign wrong. The right habit is to set up a little table before plugging numbers in, and never to rely on the phrasing of the problem.

Process Q W \Delta U
Heat added, no volume change + 0 + (equals Q)
Heat added, gas expands + + Could be +, 0, or -
Heat removed, no volume change - 0 - (equals Q)
Heat removed, gas is compressed - - Could be +, 0, or -
Insulated (adiabatic) expansion 0 + - (equals -W)
Insulated (adiabatic) compression 0 - + (equals -W)

The second and fourth rows are interesting: when both Q and W are positive (or both negative), their difference can go either way, and you need the actual numbers to decide. An isothermal process of an ideal gas is the extreme case: \Delta U = 0 because T is constant, so every joule of heat added comes out as work done by the gas (Q = W exactly).

Worked examples

Example 1: Pressure cooker before the regulator lifts

A pressure cooker in a Lucknow kitchen contains n = 0.4 mol of air (ignore the water and rajma for this idealisation) at 300 K. The cooker is rigid (ignore the slight flex of the steel) and sealed. The flame adds Q = 2500 J of heat before the regulator starts to lift. Treat the air as an ideal diatomic gas. Find the final temperature and pressure inside the cooker, assuming the initial pressure was 1 atm \approx 1.01 \times 10^5 Pa. (The rigid-wall idealisation means we track only the isochoric stage, before the regulator opens.)

Rigid sealed pressure cooker: all heat goes into internal energyA schematic pressure cooker is drawn as a thick-walled cylinder with a sealed lid bearing a small regulator weight. A flame below sends an arrow labelled Q equals 2500 joules into the gas. A second arrow labelled W equals zero is crossed out above, because the walls are rigid. The interior is labelled 0.4 mol of diatomic gas at initial temperature 300 kelvin.regulatorQ = 2500 JW = 0 (rigid)n = 0.4 molT₁ = 300 K
Before the regulator lifts, the cooker is a constant-volume system. All heat from the flame goes directly into raising the internal energy — hence the temperature, and (by the ideal gas law) the pressure.

Step 1. Identify the process and what the first law says for it.

The walls are rigid, so V is constant; therefore W = \int P\, dV = 0. The first law \Delta U = Q - W collapses to

\Delta U \;=\; Q.

Why: when the gas cannot change volume, the only boundary channel for energy is heat. Every joule that enters through the flame goes directly into internal energy.

Step 2. Relate \Delta U to \Delta T for a diatomic ideal gas.

From the equipartition result above:

U \;=\; \tfrac{5}{2}\, n R T \quad\Longrightarrow\quad \Delta U \;=\; \tfrac{5}{2}\, n R\, \Delta T.

Why: U is linear in T for an ideal gas, so \Delta U is just the slope times \Delta T. The slope here is \frac{5}{2} n R because air is (approximately) a diatomic gas with 5 active degrees of freedom at ordinary temperatures.

Step 3. Solve for \Delta T.

\Delta T \;=\; \frac{2\, \Delta U}{5\, n R} \;=\; \frac{2 \times 2500}{5 \times 0.4 \times 8.314} \;=\; \frac{5000}{16.628} \;\approx\; 300.7 \text{ K}.

Why: plug in \Delta U = Q = 2500 J, n = 0.4 mol, R = 8.314 J mol⁻¹ K⁻¹, and divide. The arithmetic is deliberately clean so you can check each multiplication.

Step 4. Final temperature.

T_2 \;=\; T_1 + \Delta T \;=\; 300 + 300.7 \;\approx\; 600.7 \text{ K}.

Step 5. Final pressure from the ideal gas law at constant volume.

For an ideal gas at constant n and V, P/T is constant (Gay-Lussac's law), so

\frac{P_2}{P_1} \;=\; \frac{T_2}{T_1}\quad\Longrightarrow\quad P_2 \;=\; P_1 \cdot \frac{T_2}{T_1} \;=\; 1.01 \times 10^5 \times \frac{600.7}{300} \;\approx\; 2.02 \times 10^5 \text{ Pa}.

Why: constant V and constant n turn PV = nRT into P \propto T, so doubling the temperature doubles the pressure. This is the physics of why the regulator lifts — above a certain internal pressure, the weight on top is no longer heavy enough to hold the lid shut.

Result. T_2 \approx 601 K, P_2 \approx 2.02 \times 10^5 Pa (about 2 atm). W = 0, Q = \Delta U = 2500 J.

What this shows. An isochoric (rigid-walled) process is the purest form of the first law: Q and \Delta U are equal. No energy is wasted on mechanical work because there is no moving piston. The feel of a sealed pressure cooker heating on the flame — temperature climbing, pressure climbing, everything bottled up — is Q = \Delta U made tangible. When the regulator finally lifts, the process switches over to approximately isobaric expansion, and some of the heat now pays for the work lifting the regulator weight.

Example 2: A bicycle pump (approximately adiabatic compression)

You pump up a cycle tyre in Delhi on a summer morning. In one quick downstroke, the pump compresses n = 0.01 mol of air (a realistic small sample) from initial volume V_1 = 2.5 \times 10^{-4}\text{ m}^3 (250 cm³) to final volume V_2 = 1.0 \times 10^{-4}\text{ m}^3 (100 cm³). The stroke is fast enough that essentially no heat leaks out through the pump wall during the compression: Q \approx 0. The work done on the gas during this adiabatic compression is W_{\text{on gas}} = 37 J (given — it would come from integrating P\, dV for an adiabatic path, see the next chapter). Starting temperature is 300 K. Find \Delta U and the final temperature. Use C_V = \frac{5}{2} R for air.

Bicycle pump adiabatic compression schematicA cylindrical bicycle pump is drawn horizontally. An arrow on the right pushes a piston inward, compressing the gas column from a longer initial length to a shorter final length. An arrow labelled W on gas equals 37 joules points inward. An arrow labelled Q equals zero is struck through above, marking the process as adiabatic. The gas inside is labelled 0.01 mol of air at initial temperature 300 K.air, 0.01 mol, 300 K (initial)pushW on gas = 37 JQ = 0 (fast, insulated)
Fast compression leaves no time for heat flow — the process is adiabatic. All the mechanical work that your hand does on the piston is deposited as extra internal energy of the gas.

Step 1. Convert the given work to "work done by the gas".

W_{\text{on gas}} = +37 J means the surroundings did 37 J of work on the gas. The first law uses W = work done by the gas, so

W \;=\; -W_{\text{on gas}} \;=\; -37 \text{ J}.

Why: the pump's piston did positive work on the gas (pushed it in); equivalently, the gas did negative work on the piston. Flipping the sign keeps us in the convention used by \Delta U = Q - W.

Step 2. Apply the first law.

\Delta U \;=\; Q - W \;=\; 0 - (-37) \;=\; +37 \text{ J}.

Why: no heat leaves, so every joule of work done on the gas is stored as internal energy. This is why a bicycle pump gets warm when you use it — not from friction, but from the adiabatic heating of the air inside.

Step 3. Convert \Delta U to \Delta T.

For a diatomic ideal gas, \Delta U = n C_V\, \Delta T = n \cdot \frac{5}{2} R\, \Delta T, so

\Delta T \;=\; \frac{\Delta U}{n \cdot \frac{5}{2} R} \;=\; \frac{37}{0.01 \times \frac{5}{2} \times 8.314} \;=\; \frac{37}{0.2079} \;\approx\; 178 \text{ K}.

Why: invert the U = \frac{5}{2} n R T relation on changes. A small sample (0.01 mol) heats up a lot for 37 J because the denominator is small — which matches the lived experience of a pump barrel getting hot after vigorous pumping.

Step 4. Final temperature.

T_2 \;=\; 300 + 178 \;=\; 478 \text{ K} \;\approx\; 205\,^\circ\text{C}.

Result. \Delta U = +37 J, T_2 \approx 478 K. The bicycle pump barrel really does get hot — not searing, because the hot air exchanges heat with the steel barrel almost immediately (the Q = 0 assumption breaks down after the stroke is over), but warm enough that you feel it against your palm. In serious industrial compressors (jet engines, diesel engines), the same effect is exploited on a much larger scale: adiabatic compression of intake air heats it to ignition temperatures.

What this shows. When Q = 0, the first law becomes \Delta U = -W — all work done on the gas ends up as internal energy, and the gas gets hotter. This is the single mechanism behind a diesel engine: compress air adiabatically hard enough and it becomes hot enough to ignite the fuel spray, no spark plug required.

Common confusions

If you came here to understand what \Delta U = Q - W means and can now read a PV diagram, you have what you need. What follows is for readers who want to see why U must be a state function (not an assumption but a theorem), and how the first law handles cyclic processes — which is the doorway to heat engines.

Why is U a state function? A sketch of the argument

The first law as written — \Delta U = Q - Wdefines U only up to an additive constant, in the following sense. Pick any reference state of the system (say, T_0 = 273.15 K, V_0 = 1\text{ m}^3, one mole of the gas). Assign U in that state any value you like, say zero. Now for any other state (T, V, n), run any process connecting the reference state to it, measure Q and W, and compute

U(T, V, n) \;=\; U(\text{reference}) + Q - W.

The claim is that this is well-defined — that the answer U does not depend on which process you use to connect the reference to (T, V, n). If it did, you could cheat: use Path A to go from State 1 to State 2 (giving \Delta U_A), and Path B to come back (giving \Delta U_B), with \Delta U_A \ne -\Delta U_B. The round trip would give a net change in U without returning to the original state — but that is a contradiction, because U is by construction a property of the state, and you did return to the original state.

So the assertion "U is a state function" is equivalent to "\oint (dQ - dW) = 0 around any closed cycle" — the integral of dQ - dW around any closed loop in state space is zero. That is not a definition; it is a claim about nature. It has been tested by every calorimetry experiment ever done, including Joule's paddle-wheel. No counterexample has been found, and the existence of U as a state function is one of the two pillars of thermodynamics (the other being the existence of S, the entropy, from the second law — see entropy introduction).

Cyclic processes and the preview of heat engines

A cyclic process is one where the system returns to its original state after some sequence of steps. Since U depends only on the state, \oint dU = 0 for any cycle. The first law then gives:

\oint dU \;=\; \oint dQ \;-\; \oint dW \;=\; 0 \quad\Longrightarrow\quad Q_{\text{net}} \;=\; W_{\text{net}}.

Why: the closed-loop integral of an exact differential is zero; that leaves the sum of heat and the sum of work equal around the cycle. The net heat absorbed by the system in a full cycle equals the net work it performs in that cycle.

This is the single most important consequence of the first law for engineering. A heat engine is a device that runs in a cycle, absorbing heat from a hot source, doing net mechanical work, and rejecting some heat to a cold sink. The first law says its net work output cannot exceed the net heat input — you cannot build a perpetual motion machine of the first kind. The second law will sharpen this further: not only is W_{\text{net}} \le Q_{\text{in}}, but W_{\text{net}} \le (1 - T_C/T_H) Q_{\text{in}}. That factor 1 - T_C/T_H is the Carnot efficiency — see heat engines and Carnot cycle.

The enthalpy H — a useful bookkeeping trick

In constant-pressure processes (the default in a chemistry lab or an open beaker on a Bunsen burner), the combination U + PV is a convenient new state function:

H \;\equiv\; U + PV.

Then, for a constant-pressure process,

\Delta H \;=\; \Delta U + P\, \Delta V \;=\; (Q - W) + W \;=\; Q_P,

Why: at constant P, W = P\, \Delta V exactly; substituting cancels the work term, leaving \Delta H equal to the heat absorbed. This is why chemists tabulate "enthalpies of reaction" at 1 atm — they are directly measurable calorimetrically under the usual lab condition.

Enthalpy becomes ubiquitous in chemistry (\Delta H for reactions), meteorology (moist-air thermodynamics), and thermodynamic tables for steam turbines. The first law remains the parent result; enthalpy is a convenient re-packaging for a specific kind of process.

What counts as "work" in a more general system

In this article, work has meant pressure-volume work: dW = P\, dV. That is the dominant work term for a gas in a cylinder, but not the only possibility. A more general first law allows any kind of external work:

dW \;=\; P\, dV \;-\; \sigma\, dA \;-\; E\, dq \;-\; \mu_0 H\, dM \;+\; \cdots

where the extra terms describe surface work (against surface tension \sigma over area change dA), electrical work (moving charge dq against voltage E), magnetic work (changing magnetisation dM against field H), and so on. For each kind of work there is a conjugate pair of variables (an intensive one that stays uniform and an extensive one that is added up). The bookkeeping generalises cleanly, and this generalised first law is what is used in statistical mechanics textbooks and in real engineering on thermodynamic systems involving electromagnetism, surfaces, or chemical reactions.

For everything you will see in class 11, class 12, or JEE, dW = P\, dV is enough. But it is worth knowing that the first law is much more than just gas physics — it is the conservation of energy rewritten for any system you can draw a boundary around.

Where this leads next