Sub topic 1
Nodes and branches
Kirchhoff's current law is a statement about nodes, so you need to identify nodes correctly before you can apply it. Most wrong KCL equations come from miscounting nodes or from missing a branch. This chapter gives you precise definitions and a procedure for reading nodes and branches off a schematic.
Prerequisites
This chapter assumes you can do the following:
- Describe electric current, voltage, and resistance, and use their units (amperes, volts, ohms).
- Apply Ohm's law, v = iR, to a single resistor.
- Recognize the symbols for resistors, independent voltage sources, and independent current sources on a schematic.
- Solve a small system of linear equations, such as two equations in two unknowns.
You do not need KCL itself. The chapters after this one build on the vocabulary defined here.
What a node is
A node is a point in a circuit where two or more circuit elements are connected. More precisely, a node is the entire set of points joined to each other by ideal wires. An ideal wire is a conductor with zero resistance, so every point on it is at the same voltage.
The "entire set" part matters. A node is not a dot on the drawing. It is an electrical region. If you draw a long wire with three bends, and five elements attach to it at different places, those five attachments are all on one node.
Two practical rules follow:
- Any two points joined by an ideal wire belong to the same node. Moving along a wire never takes you to a new node.
- A new node begins only when you pass through a circuit element. Crossing a resistor, a source, or any other two-terminal element takes you from one node to another, unless something else also connects the two sides.
Schematics add a drawing convention. A filled dot where wires meet means the wires are connected. Two wires that cross with no dot are not connected, unless your source says otherwise. Some drawings use a dot-free "T" junction as a connection, so read the conventions of the document in front of you.
What a branch is
A branch is a single circuit element together with the path that connects its two terminals to nodes. In this tutorial, each two-terminal element (a resistor, a voltage source, a current source) is one branch. A branch connects two nodes, and the same current flows through the whole branch.
A node is where branches meet, and a branch is what runs between two nodes. Together they describe the circuit's connection structure, which is called its topology. Topology ignores component values and asks only what is connected to what.
| Term | Definition | Example in the circuit below |
|---|---|---|
| Node | A set of points joined by ideal wires | The junction of I1, R1, and R2 |
| Branch | One two-terminal element between two nodes | R2 |
| Terminal | One end of an element | The left end of R2 |
| Reference node | The node chosen as 0 V | The bottom wire |
Some textbooks use "branch" for a series chain of elements that share the same current. Both usages appear in the literature. This tutorial uses one element per branch, because it keeps counting simple and the choice does not change any KCL result.
A worked example
Consider the circuit used again later in this tutorial. A 10 mA current source feeds a resistor R1 (1 kΩ) from node 1 to the bottom wire. A second resistor R2 (2 kΩ) connects node 1 to node 2. A third resistor R3 (2 kΩ) connects node 2 to the bottom wire.
The bottom wire runs under the whole circuit. Even if the drawing shows it in three separate segments, it is one node, because the segments are joined by ideal wire.
This drawing is a graph: circles for nodes, lines for branches. Here there are 3 nodes and 4 branches. The source branch is drawn with an arrow only to show which way its current is defined to flow. Branch directions are the subject of the next chapter.
You can now list which branches touch each node:
| Node | Branches attached | Number of branches |
|---|---|---|
| Node 1 | I1, R1, R2 | 3 |
| Node 2 | R2, R3 | 2 |
| Ground | I1, R1, R3 | 3 |
The number of branches at a node is its degree. KCL for a node involves exactly the currents in the branches attached to it, so the list above is the list of terms each equation will contain. A node with degree 2, like Node 2, has only two currents in its equation, so those two currents are tied together. That fact comes back when we discuss series connections.
Finding nodes systematically
On a small schematic you can find nodes by eye, but on a large one, a procedure is safer. Use this one:
- Mark every terminal of every element.
- For each ideal wire, mark the points at both ends as connected.
- Merge all points connected through wires, directly or through other points. Each merged group is one node.
- Label each group with a name or a number.
- For each element, write down the two nodes at its terminals.
Step 3 is a classic "connected components" problem, and a program can do it. The following Python script performs steps 2 to 5 on the example circuit. It uses a union-find structure, which merges groups of points and tells you which group a point belongs to. Each terminal has a point name, and the wire list says which points are joined.
# Each component has a name and two terminal points.
components = [
("I1", "a", "g1"),
("R1", "b", "g2"),
("R2", "c", "d"),
("R3", "e", "g3"),
]
# Ideal wires join pairs of points.
wires = [("a", "b"), ("b", "c"), ("d", "e"), ("g1", "g2"), ("g2", "g3")]
parent = {}
def find(p):
parent.setdefault(p, p)
while parent[p] != p:
parent[p] = parent[parent[p]] # path halving
p = parent[p]
return p
def union(p, q):
parent[find(p)] = find(q)
for p, q in wires:
union(p, q)
for _, p, q in components:
find(p)
find(q)
# Group points by their root: each group is one node.
groups = {}
for point in list(parent):
groups.setdefault(find(point), []).append(point)
nodes = sorted(sorted(members) for members in groups.values())
for members in nodes:
attached = sorted(
{name for name, p, q in components if p in members or q in members}
)
print(members, attached)
print(len(nodes), "nodes,", len(components), "branches")
for name, p, q in components:
if find(p) == find(q):
print(name, "is shorted: both terminals are on the same node")Running it prints:
['a', 'b', 'c'] ['I1', 'R1', 'R2']
['d', 'e'] ['R2', 'R3']
['g1', 'g2', 'g3'] ['I1', 'R1', 'R3']
3 nodes, 4 branchesThe three groups match the table above. The final loop reports any element whose two terminals land on the same node. Such an element is shorted, a case covered in the next section.
Choosing a reference node
Voltages are always measured between two points. In nodal analysis, you pick one node as the reference node (also called ground) and define its voltage as 0 V. Every other node voltage is then measured relative to it.
Any node can be the reference node. Experienced analysts follow a few habits:
- Choose the node with the most branches attached, because it removes the most unknowns from the equations.
- Choose the node connected to one terminal of a voltage source, because that fixes one more node voltage immediately.
- Choose the node that the schematic already shows as ground, if there is one.
In the example, the bottom wire has three branches and is the natural choice. With 3 nodes and one reference, you are left with 2 unknown node voltages, v1 and v2. In general, a circuit with n nodes has n − 1 unknown node voltages. This is why the matrix in the later nodal-analysis chapter is 2 × 2 for a 3-node circuit.
A related count describes the loops in the circuit. A connected circuit with n nodes and b branches has b − n + 1 independent loops. For the example, that is 4 − 3 + 1 = 2. You do not need loops for KCL, but the count gives you a quick consistency check on your node and branch tallies.
Edge cases and common errors
Treating a wire segment as a node. A bent wire, or a wire drawn in several pieces, is still one node. Count electrical regions, not drawn segments.
Splitting a node because it is drawn in two places. If a schematic shows two ground symbols, they are the same node, because ground symbols imply an ideal wire between them.
Missing a crossing with no dot. Two crossing wires without a dot are separate. If your schematic software draws a dot at every connection, no dot means no connection.
Merging nodes across a voltage source. A voltage source is an element, so its two terminals are on different nodes, even though the voltage between them is fixed. The source holds its terminals at a fixed difference, but it does not make them the same node. This distinction matters when you reach supernodes.
Ignoring a shorted element. If both terminals of an element sit on the same node, the element carries no useful current in a circuit of ideal parts. A shorted resistor can be dropped from the node equations. A shorted ideal voltage source is a different problem, because it forces a nonzero voltage across zero resistance, and no consistent solution exists.
Ignoring an element with a floating terminal. If one terminal of an element connects to nothing else, it forms a node of degree 1 and no current can flow through that element. Check your schematic for a missing wire before concluding that the circuit is meant to work this way.
Counting a branch twice. Each element appears once in the branch count, even though it touches two nodes. Counting it once per terminal gives 2b instead of b. That doubled number is the sum of the node degrees, which is a useful check: in the example, the degrees are 3 + 2 + 3 = 8, and 2 × 4 = 8.
Looking ahead
You can now identify every node and every branch of a circuit and list which branches touch which node. The next chapter assigns each branch a current reference direction, which is the step that turns this list into signed terms in an equation.
Exercise
A circuit has a 5 V source V1 from node a to the bottom wire, a resistor R1 from node a to node b, and two resistors R2 and R3 each connected from node b to the bottom wire. The bottom wire is drawn in two separate pieces joined by an ideal wire. How many nodes and branches does it have, and what is the degree of each node?
Show answer
There are 3 nodes (a, b, and the bottom wire, which is one node despite being drawn in two pieces) and 4 branches (V1, R1, R2, R3). Node a has degree 2 (V1, R1). Node b has degree 3 (R1, R2, R3). The bottom node has degree 3 (V1, R2, R3). The degrees sum to 8, which equals 2 × 4.
Exercise
If you choose node b from the previous exercise as the reference node instead of the bottom wire, how many unknown node voltages remain, and does the number of branches change?
Show answer
Two unknown node voltages remain, because n − 1 = 3 − 1 = 2 for any choice of reference. The number of branches stays at 4, because branches depend on the elements, not on which node is called ground.