In thermodynamics we follow energy flowing from one place to another during chemical or physical changes. To be able to quantify these changes rigorously it is important for us to define what specifically is changing. To accomplish this we pick a specific part of the world that we are interested in and we call it "the system." For a given change (process), the system is what we are interested in. It is the matter and the total energy associated with that matter. For example, if we wanted to understand the energy change of ice melting in a glass at room temperature. Let's imagine that for this process the ice is initially at temperature of 0°C and then melts and the ending liquid water is 25°C.
\[{\rm H_2O(s) \rightarrow H_2O(l)}\]
In this example, the system would be the water. We would also need to describe the "state" of the system. The "state" is the set of properties that describe the system. Here, the initial state of the system is that the water is solid at a pressure of 1 atm with a temperature of 0°C. The final state is that the water is liquid at a pressure of 1 atm with a temperature of 25°C. The energy change associated with this physical change will depend on the initial and final states. The amount of energy change will vary depending on the initial temperature of the ice and the final temperature of the water. Therefore we need to give more details for this change rather than just saying the change is ice melting.
The same is true for chemical changes. Let's try and understand how much energy flows out of a typical combustion reaction. Below is the combustion reaction for methane, which is the principle component of natural gas:
\[{\rm CH_4(g) + 2O_2(g) \rightarrow CO_2(g) + 2H_2O(g)}\]
For this example, the "system" would be comprised of the all the matter in the reaction (both reactants and products) and the associated energy that is released during the reaction. This is all the "stuff" in the reaction. Initially, the system would be the methane and the oxygen (at a particular temperature and pressure). At the end of the reaction, the system would be the carbon dioxide and the water (at a particular temperature and pressure). If the reaction didn't go to completion, the system would be a mixture of reactants and products (at a particular temperature and pressure).
For both of these examples we can easily identify the initial state of the system and the final state of the system. In each example, the energy of the system would change in going from the initial to the final state. This is because there is energy that is exchanged between the system and something else. The something else interacting with the system we call the "surroundings." In thermodynamics terms, we call this a "closed" system. A closed system exchanges only energy (not matter) with the surroundings. In our first example, the system is the water and the surroundings would be the "room." The energy for melting the ice came from the "room." We often have examples in which we don't know much about the details of the surroundings. We might have conditions such that the surroundings have a constant temperature of 25°C and a constant pressure of 1 atm. How does it keep these constant? It doesn't matter. The fact that the room is held at a constant temperature by the air conditioner in the room is not relevant. This is because we are interested in the system, not the surroundings. The definition of system and surroundings is our choice. We choose the system to examine what we are interested in. It is important to define these carefully since the energy flow will be different depending on our definition.
Finally, there are times in thermodynamics that we are looking at the system and the surroundings together. The system and the surrounding combined are essentially "everything." This is because the combined energy in the system and the surroundings is a constant. Energy can flow between these two, but the total energy is constant. Thus we talk about the system + surroundings as the "universe." Since energy is constant in the universe (from a chemistry thermodynamics perspective), we can discuss changes for both the system and the surrounding as being for the universe.
system + surroundings = universe
State functions are "variables" that define the state of a system. When you have a system you need to be able to define the conditions in which it exists before and after a change. We typically referred to these as the initial and final states. By states we mean the system can be described by a set of properties. For example, the state of a system might be that I have 1 mole of argon in a 10 L container with a temperature of 300 K. Here the state of the system is defined by the "state functions" of volume and temperature as well as the amount of the gas. Likewise, the pressure is also a state function. We'll also see later in thermodynamics that there are a number of variables related to energy that are also state functions.
If I take my 1 mole of gas and do something to it, I might end up in a new state where for example the volume is now 20 L and the temperature is 600 K. For such a process I can look at the change in the state functions. In this case the initial volume, Vi, was 10 L and the final volume, Vf, was 20 L. So my change in volume is given by
\[\Delta V = V_{\rm f} - V_{\rm i} = 20 L - 10 L = 10 L\]
The key to this idea is that the change in volume has nothing to do with the particulars of the mystery process that brought me from my initial state to my final state. The difference in volume will always be the same. That is, if I started with a volume of 10 L and ended with a volume of 20 L the difference is always + 10 L. This might seem frightfully obvious. However, when we start to think about abstract state functions related to energy it can be more difficult to wrap your head around the ideas. But it is important to know that the concept is exactly the same. If you know the initial state and you know the final state, then you can calculate the change (regardless of the process by which you achieved the change).
Extensive variables depend on the amount of material. These are a material's properties such as mass and volume.
Intensive variables are independent of the amount of material. These are either properties like temperature or others that combine, or are the ratio of, two extensive variables like density (mass/volume) or molar volume (volume/mole).
So our state functions can be either intensive or extensive.
We'll deal a lot with energy changes and it is important to keep track of when we are talking about extensive changes. These are usually very particular questions about specific amounts of a substance: how many joules of heat are released by reacting 10 g of carbon with an excess of oxygen gas? This clearly depends on "the amount of stuff" and will be a certain number of joules (J). The answer for 10 g will be different than for 5 micrograms. Alternatively, we could be talking of intensive energies. How many joules of heat are consumed for every mole of ice that melts? Now I want to know how much energy per mole? The question doesn't ask about a specific amount and will have an answer that is in joules per mole (J mol-1).