This is one of those situations where your problem is not how good you are at analysis or what base knowledge you might have, but simply that you have no clue what you don't know. This always makes the first step into electronics a very high one.
In the case of your example, what don't you know about a battery?
- The terminal voltage of an ideal battery would never change (at least until all the energy storage capacity is used). So there must be factors that affect the terminal voltage and its useful energy capacity. A quick list is chemistry, volume of materials, temperature and anode/cathode design.
- A practical battery has limited capacity and many of the other factors influencing terminal voltage and potential current capability can be rolled into a model element called 'Internal resistance'. In the model for most larger batteries this will be fractions of an Ohm. However the battery also has other elements such as capacitance and inductance to make the situation more complex. You could start by reading about battery models with texts such as this.
A great example of a larger battery with very small internal resistance is a 12 V car battery. Here, when you start the car it takes hundreds of Amps (kW of power and current in the 600 A range) to turn over the motor and the terminal voltage might drop from 13.8 V (a fully charged Lead-Acid car battery) to only 10 V when cranking. So the internal resistance might be (using Ohms Law) only 6 milli Ohms or so.
You can scale the thinking for this example to smaller batteries such as AA, AAA and C batteries and at least begin to understand the complexity of a battery.
Now what don't you know about an LED?
- The complexity of the electrical model for a diode (whether just a rectifier or an LED) is immense. But we could simplify it here and say that at it's most simple you can represent a diode by it's Bandgap voltage with a series resistor. You could start here by starting to learn on of the many SPICE packages and this discussion on StackExchange might be a good kickoff point.
- All semiconductor devices have a practical limitation in the amount of power they can dissipate. This is related primarily to the physical size of the device. The bigger the device the more power it can typically dissipate.
Now you can consider your LED. You should begin by trying to understand the datasheet for the device. While many of the characteristics you won't understand you already know one (from your question), the forward voltage (Vf) and you could probably find the current limit and maximum power dissipation in the datasheet.
Armed with those you could figure out the series resistance you need to limit the current so you don't exceed the power dissipation limit of the LED.
Kirchhoff's Voltage Law gives you a big hint that since the voltage across the LED is about 3.1 V (and the datasheet current curve tells you could you could never apply 9 V), you must need another lumped model component in the circuit.
simulate this circuit – Schematic created using CircuitLab
Could the unknown element above simply be a piece of wire (no element)?
It could ....but we can calculate the results easily.
With two ideal voltage elements (9 V and 3.1 V) the resistors must have 5.9 V across them (Kirchhoff's voltage loop). The current flow must therefore be 5.9/10.1 = 584 mA.
The power dissipated in the LED is (3.1 * 0.584) + (0.584^2 * 10) = 5.2 Watts.
Since your LED is probably rated at only 300 mW or so, you can see that it will heat up dramatically and in all probability fail within seconds.
Now if the unknown element is a simple resistor, and we want the current through the LED to be let's say 20 mA, we have enough to calculate the value.
The terminal voltage of the battery would be (9 - (0.02 * 0.1)) = 8.998 V
The terminal voltage of the LED would be (3.1 + (0.02 * 10)) = 3.3 V
So the voltage across the unknown resistor is 5.698 and the current through it 20 mA. So the resistor is 5.698/0.02 = 284.9 Ohms.
Under these conditions the loop voltages balance and the LED passes its designed value of 20 mA. It's power dissipation is therefore ( (3.3 * 0.02) + (0.02^2 * 10)) = 70 mW ....hopefully well within capability of a small LED.
Hope this helps.