Rules for analyzing DC circuits, worked out by Gustav Robert Kirchhoff in the mid-nineteenth century. They are derived from the laws of conservation of charge and energy. The rules are two:

**Kirchhoff's first** or **junction rule**, based on conservation of charge, states that **the sum of all currents entering a junction must equal the sum of all currents leaving the junction**. You can't have more current going in than coming out: the charge has to go somewhere. Similarly, you can't have less current coming in than going out, because the charge has to come from somewhere.

**Kirchoff's second** or **loop rule**, based on conservation of energy, states that **the sum of the changes in potential around any closed path of a circuit must be zero**. If you go around in a loop and get back to where you started, you must be at the same potential energy, since we are dealing with a conservative force here.

Let's apply Kirchhoff's rules to the arbitary circuit below, where `R`_{1}, R_{2}, R_{3}, R_{4}, R_{5} are the resistances of the respective resistors; `V`_{1}, V_{2}, V_{3} are the voltages of the respective voltage sources; and `I`_{1}, I_{2}, I_{3} are the strengths of the currents in the three branches of the circuit.

_____
A---|+ -|---\/\/\---B
| ----- R_{1} |
| V_{1} | \/\/\ = a resistor
| | _____
\ | |- +| = a battery
/ | -----
\ R_{2} |
/ I_{2} | ↑I_{1} Arrows indicate assumed direction
| → | of current; note that if our as-
| _____ | sumed direction is incorrect, the
C----|- +|--\/\/\---D value for current will come out
| ----- R_{3} | negative, so we know it goes the
| V_{2} | ↓I_{3} other way.
| |
/ \
\ R_{4} R_{5}/
/ V_{3} \
\ _____ /
E------|- +|--------F
-----

Taking point `D` as our junction, the junction rule gives us:

sum of currents in = sum of currents out

`I`_{2} = `I`_{1} + `I`_{3}

Using CABD as our loop, we apply the loop rule, noting that if we are going with the current, the voltage drops over a resistor, and if we are going against the current, the voltage increases over a resistor; and that `V`=`I`*`R`:

sum of voltage changes = 0

`I`_{1}*`R`_{2} - `V`_{1} + `I`_{1}*`R`_{1} + `I`_{2}*`R`_{3} - `V`_{2} = 0

We then do the same over loop CDEF, althogh we could also use ABFE, the outside loop:

sum of voltage changes = 0

`V`_{2} - `I`_{2}*`R`_{3} - `I`_{3}*`R`_{5} - `V`_{3} - `I`_{3}*`R`_{4} = 0

Assuming we know the resistances and the voltages, we can now

solve for the current in each of the parts of the circuit, since we have three

unknowns,

`I`_{1},I_{2}, and

`I`_{3}, and three

equations: the junction rule and two applications of the loop rule. We could also solve for voltages if we were given currents, or for any three unknown variables

given the rest of them.