Sub topic 10
Pairing KVL with Kirchhoff's current law
This chapter assumes you can write a KVL loop equation with the passive sign convention, apply Ohm's law to a resistor, and solve a small linear system of two or three equations. It adds Kirchhoff's current law (KCL) as the companion rule. It then shows how the two laws together give enough equations to solve a circuit with several loops.
What KCL says
Kirchhoff's current law states that the currents at any node add up to zero. A node is a point where two or more branches meet. The rule is a statement of charge conservation. Charge cannot pile up at an ideal node, so every coulomb that arrives must also leave.
Pick one convention and keep it. This chapter counts currents leaving the node as positive:
sum of (currents leaving node) = 0An equivalent form says the total current entering equals the total current leaving. Both forms give the same equation. The sign of each term depends only on whether you defined its reference arrow as pointing toward or away from the node. If the true current turns out to flow the other way, its value is negative, and the equation stays correct.
Why KVL alone is not enough
KVL relates voltages around a loop. Ohm's law turns each resistor voltage into a current times a resistance. Once a circuit has more than one loop, the currents in different branches are linked, and KVL does not state that link. KCL supplies it.
Count the unknowns. A circuit with b branches has b unknown branch currents. You need b independent equations. A circuit with n nodes and b branches that can be drawn on a flat page, called a planar circuit, gives them as follows:
| Source of equations | How many independent equations |
|---|---|
| KCL at nodes | n − 1 |
| KVL around loops | b − n + 1 |
| Total | b |
The count is n − 1 for KCL because the last node's equation is the negative sum of all the others. Every branch current leaves one node and enters another, so adding all n node equations gives 0 = 0. For KVL, the b − n + 1 independent loops are the meshes of a planar circuit. A mesh is a loop that contains no other loop inside it.
A worked example with branch currents
Use a circuit with two nodes, A (top) and B (bottom), joined by three parallel branches:
- Left branch: a 10 V source with its positive terminal toward A, in series with R1 = 2 Ω.
- Middle branch: R2 = 4 Ω.
- Right branch: R3 = 6 Ω in series with a 4 V source whose positive terminal is toward A.
Define three branch currents, all with reference arrows pointing downward from A to B: Ia in the left branch, Ib in the middle branch, and Ic in the right branch.
KCL at node A
All three currents leave A, so:
Ia + Ib + Ic = 0Node B gives the same equation with the opposite sign, so it adds nothing new.
KVL around the left mesh
Start at A. Go down the left branch, then up the middle branch to A.
- Going down through the 10 V source, you enter at the positive terminal and leave at the negative one. That is a drop of 10 V.
- Going down through R1 in the direction of
Iais a drop of 2·Ia. - Going up through R2 is against
Ib, so it is a rise of 4·Ib.
The sum of drops minus rises is zero:
10 + 2*Ia - 4*Ib = 0KVL around the right mesh
Start at A. Go down the middle branch, then up the right branch to A.
- Going down through R2 is a drop of 4·
Ib. - Going up through R3 is a rise of 6·
Ic. - Going up through the 4 V source, you enter at the negative terminal and leave at the positive one. That is a rise of 4 V.
4*Ib - 6*Ic - 4 = 0Solving the three equations
Rearrange into the form A x = b with x = [Ia, Ib, Ic]:
Ia + Ib + Ic = 0
2Ia - 4Ib = -10
4Ib - 6Ic = 4import numpy as np
# Unknowns: x = [Ia, Ib, Ic], all reference arrows pointing from node A down to node B.
A = np.array([
[1.0, 1.0, 1.0], # KCL at node A: currents leaving A sum to zero
[2.0, -4.0, 0.0], # KVL, left mesh: 10 + 2*Ia - 4*Ib = 0
[0.0, 4.0, -6.0], # KVL, right mesh: 4*Ib - 6*Ic - 4 = 0
])
b = np.array([0.0, -10.0, 4.0])
Ia, Ib, Ic = np.linalg.solve(A, b)
print(f"Ia = {Ia:.4f} A, Ib = {Ib:.4f} A, Ic = {Ic:.4f} A")
# Checks: KCL sum and the voltage between A and B computed through each branch.
print(f"KCL sum = {Ia + Ib + Ic:.12f} A")
print(f"V_AB via left = {10 + 2 * Ia:.4f} V")
print(f"V_AB via middle = {4 * Ib:.4f} V")
print(f"V_AB via right = {4 + 6 * Ic:.4f} V")The result is Ia ≈ −1.9091 A, Ib ≈ 1.5455 A, and Ic ≈ 0.3636 A. All three branch calculations give V_AB ≈ 6.1818 V. That agreement is itself a KVL check: the voltage between two nodes cannot depend on the path you use to measure it.
Ia is negative because the 10 V source pushes current upward through the left branch. The reference arrow points down, so the sign records the real direction.
The workflow as a diagram
How mesh analysis builds KCL in
The next chapter develops mesh analysis fully. The link to KCL is the reason it works, so here is the idea.
Assign a circulating current to each mesh instead of a current to each branch. Let I1 circulate clockwise in the left mesh and I2 clockwise in the right mesh. A branch that belongs to only one mesh carries that mesh current. The shared middle branch carries the difference, because the two clockwise currents run in opposite directions there.
Compare with the branch currents above. In the left branch, clockwise runs upward, so Ia = −I1. In the right branch, clockwise runs downward, so Ic = I2. In the middle branch, Ib = I1 − I2. Substituting into the KCL equation:
Ia + Ib + Ic = -I1 + (I1 - I2) + I2 = 0KCL holds for any values of I1 and I2. The substitution has already used it, which is why mesh analysis needs only KVL equations. You get fewer unknowns (two instead of three) and fewer equations, and the same answer: I1 ≈ 1.9091 A and I2 ≈ 0.3636 A.
Choosing between the two methods
| Situation | Better choice |
|---|---|
| You want every branch current directly | Branch currents with KCL and KVL |
| The circuit is planar with few meshes | Mesh currents |
| A branch contains an ideal current source | Mesh currents with care, or branch currents |
| The circuit is not planar | Branch currents, or node-voltage analysis |
An ideal current source in a branch fixes that branch current. In branch-current form, this just supplies one known value. In mesh form, a source on an outer branch sets its mesh current directly. A source on a shared branch links two mesh currents, and you must write a constraint instead of a KVL equation for that branch. The voltage across the source is unknown, so KVL through it would add an unknown with no new equation.
Common errors when combining the laws
- Mixing arrow conventions in one KCL equation. Pick "leaving is positive" and apply it to every term at that node. A single term written with the opposite convention makes the equation wrong without any visible sign of the mistake.
- Writing KVL for a loop that is not independent. In the example, the outer loop through the left and right branches gives
10 + 2*Ia - 4 - 6*Ic = 0. This equals the left-mesh equation plus the right-mesh equation. It carries no new information, and the matrix becomes singular if you use it in place of a mesh. - Using KCL at every node. The n-th node equation is redundant. Keep it as a check rather than an equation to solve.
- Treating the sign of an answer as an error. A negative current means the true direction is opposite to your reference arrow. The equations stay valid.
- Forgetting that a source voltage can be a rise or a drop. In the example, the 4 V source was a drop going down and a rise going up. Decide per loop direction, not per source.
Checking the combined solution
Two inexpensive checks follow from the two laws:
- Substitute the solution back into KCL at the node you did not use, or into any node equation. The sum should be zero up to rounding.
- Compute the voltage between the same two nodes along each branch. All paths must agree, which is KVL applied to the loop formed by any two paths.
Chapter 12 extends the second check into a power balance. In the example, Ia is negative while the 10 V source is a rise along the upward current. That makes the 10 V source a supplier of power, which a power balance will confirm.
Exercise
A planar circuit has 6 branches and 4 nodes. How many independent KCL equations and how many independent KVL (mesh) equations do you need to find every branch current? Then, at a node where branch currents of 3 A and 5 A enter and a third branch carries current out, what is the third current?
Show answer
KCL gives n − 1 = 3 equations. KVL gives b − n + 1 = 6 − 4 + 1 = 3 equations. The total of 6 matches the 6 unknown branch currents. At the node, the current entering is 3 + 5 = 8 A, so 8 A must leave through the third branch.
Exercise
In the worked example, suppose the right-branch source is changed to 6 V (positive terminal still toward A). Which of the three equations changes, and what is the new right-mesh equation? Is the solution of the new system affected by KCL changing?
Show answer
Only the right-mesh KVL equation changes, because the source appears only there. It becomes 4Ib - 6Ic - 6 = 0, so the right-hand side of the third row of the matrix is 6 instead of 4. The KCL equation Ia + Ib + Ic = 0 does not depend on any source value, so it stays the same.