Kirchhoff's Rules
Circuit analysis via KCL · KVL · and linear systems \( A\mathbf{x} = \mathbf{b} \)

The Two Big Ideas

Before touching numbers, understand why these rules exist. They're not arbitrary — they're conservation laws in disguise.

Kirchhoff's Current Law (KCL) — Conservation of Charge

Charge cannot pile up at a node. Whatever current flows in must flow out.

\[ \sum_{\text{node}} I_{\text{in}} = \sum_{\text{node}} I_{\text{out}} \qquad\Longleftrightarrow\qquad \sum_{\text{node}} I_k = 0 \]

Think of water pipes meeting at a junction — water in = water out. No water "disappears" at the junction.

Kirchhoff's Voltage Law (KVL) — Conservation of Energy

If you walk around any closed loop in the circuit and come back to where you started, the total energy gain and loss must cancel.

\[ \sum_{\text{loop}} V_k = 0 \]

Like hiking: if you return to base camp, the total elevation gained = total elevation lost. No free energy.


The Circuit

We'll solve this two-loop circuit. It has one battery, three resistors, and we want to find every branch current.

+ ε = 12 V R₁ = 2 Ω R₂ = 4 Ω R₃ = 6 Ω A B C D E F I₁ I₂ I₃ Loop 1 Loop 2 Two-loop circuit · ε = 12V · R₁ = 2Ω · R₂ = 4Ω · R₃ = 6Ω
Reading the Diagram
SymbolMeaningValue
εEMF (battery voltage source)12 V
R₁Resistor in left branch (top)2 Ω
R₂Resistor in right branch (top)4 Ω
R₃Resistor in middle branch6 Ω
I₁Current leaving battery, through R₁
I₂Current through R₂ (right branch)
I₃Current through R₃ (middle branch)

Current directions are assumed. If a result is negative, the current actually flows the other way — the algebra handles it automatically.


Step 1 — Apply KCL at Node E

Node E is where three branches meet. KCL says charge cannot pile up there. Count currents entering as positive and leaving as negative (or vice versa — pick a convention and stick with it).

At node E: \(I_1\) arrives from the left, then splits into \(I_2\) going right and \(I_3\) going down. So \(I_1 = I_2 + I_3\).
KCL Equation — Node E
\[ I_1 - I_2 - I_3 = 0 \qquad \textit{(KCL)} \]

This is our first equation. It came purely from topology — we haven't used Ohm's law yet.

Why Only One KCL Equation?

With \(N\) nodes, KCL gives \(N-1\) independent equations. Here we have 2 key nodes (E and F), but the equation at F is identical (just signs flipped) — it carries no new information. So: 1 independent KCL equation.


Step 2 — Apply KVL to Each Loop

Now we walk around each closed loop and add up voltage rises (positive) and drops (negative) until we return to the start. The total must be zero.

Sign Convention for Walking a Loop

Loop 1 — Left Loop (A → E → F → D → A, clockwise)

Start at node A and walk clockwise.

  1. A → E (top-left): We pass through the battery (− to +): rise of \(+\varepsilon = +12\text{ V}\). Then through \(R_1\) in the direction of \(I_1\): drop of \(-I_1 R_1\).
  2. E → F (middle branch): Through \(R_3\) in the direction of \(I_3\): drop of \(-I_3 R_3\).
  3. F → D → A (bottom + left side): Plain wire, zero resistance, zero voltage change.
KVL — Loop 1
\[ +\varepsilon - I_1 R_1 - I_3 R_3 = 0 \]

Substituting values \(\varepsilon=12,\, R_1=2,\, R_3=6\):

\[ 12 - 2I_1 - 6I_3 = 0 \qquad \textit{(KVL-1)} \]

Loop 2 — Right Loop (E → B → C → F → E, clockwise)

Start at node E and walk clockwise.

  1. E → B (top-right): Through \(R_2\) in the direction of \(I_2\): drop of \(-I_2 R_2\).
  2. B → C (right side): Plain wire, no drop.
  3. C → F (bottom-right): Plain wire, no drop.
  4. F → E (middle, going up): Through \(R_3\) against assumed \(I_3\) direction: rise of \(+I_3 R_3\).
KVL — Loop 2
\[ -I_2 R_2 + I_3 R_3 = 0 \]

Substituting values \(R_2=4,\, R_3=6\):

\[ -4I_2 + 6I_3 = 0 \qquad \textit{(KVL-2)} \]

Step 3 — Assemble the Linear System

We now have three equations in three unknowns \(I_1, I_2, I_3\). Write them in standard form (all unknowns on the left, constants on the right):

\[ \begin{array}{rcrcrcl} I_1 & - & I_2 & - & I_3 &= 0 & \quad\textit{(KCL)}\\[6pt] 2I_1 & & & + & 6I_3 &= 12 & \quad\textit{(KVL-1)}\\[6pt] & - & 4I_2 & + & 6I_3 &= 0 & \quad\textit{(KVL-2)} \end{array} \]
Each equation is a hyperplane in \(\mathbb{R}^3\) (the space of all possible \((I_1, I_2, I_3)\) triples). The solution is the single point where all three planes intersect.

Writing as \(A\mathbf{x} = \mathbf{b}\)

Collect coefficients into a matrix \(A\), unknowns into a column vector \(\mathbf{x}\), and constants into \(\mathbf{b}\):

\[ \underbrace{\begin{pmatrix} 1 & -1 & -1 \\ 2 & 0 & 6 \\ 0 & -4 & 6 \end{pmatrix}}_{A} \underbrace{\begin{pmatrix} I_1 \\ I_2 \\ I_3 \end{pmatrix}}_{\mathbf{x}} = \underbrace{\begin{pmatrix} 0 \\ 12 \\ 0 \end{pmatrix}}_{\mathbf{b}} \]
What Does Each Row Encode?
RowEncodesPhysics
Row 1\(1\cdot I_1 - 1\cdot I_2 - 1\cdot I_3 = 0\)KCL: charge conservation at node E
Row 2\(2I_1 + 6I_3 = 12\)KVL Loop 1: energy conservation
Row 3\(-4I_2 + 6I_3 = 0\)KVL Loop 2: energy conservation

Step 4 — Solve via Row Reduction (Gaussian Elimination)

Form the augmented matrix \([A \mid \mathbf{b}]\) and row-reduce to upper triangular form. Each row operation is a legal algebraic manipulation — it doesn't change the solution set.

Augmented Matrix (Starting Point)

\[ \left[\begin{array}{ccc|c} 1 & -1 & -1 & 0 \\ 2 & 0 & 6 & 12 \\ 0 & -4 & 6 & 0 \end{array}\right] \]

Operation 1 — Eliminate \(I_1\) from Row 2

What we're doing: Row 2 has a \(2\) in the \(I_1\) column. Subtract \(2 \times\) Row 1 from Row 2.

\[ R_2 \leftarrow R_2 - 2R_1 \] \[ \text{New } R_2: \quad (2 - 2\cdot1,\; 0-2\cdot(-1),\; 6-2\cdot(-1) \mid 12-2\cdot 0) = (0,\; 2,\; 8 \mid 12) \]
\[ \left[\begin{array}{ccc|c} 1 & -1 & -1 & 0 \\ 0 & 2 & 8 & 12 \\ 0 & -4 & 6 & 0 \end{array}\right] \]

Operation 2 — Eliminate \(I_2\) from Row 3

What we're doing: Row 3 has \(-4\) in the \(I_2\) column. Add \(2 \times\) Row 2 to Row 3 to kill it.

\[ R_3 \leftarrow R_3 + 2R_2 \] \[ \text{New } R_3: \quad (0+0,\; -4+2\cdot2,\; 6+2\cdot8 \mid 0+2\cdot12) = (0,\; 0,\; 22 \mid 24) \]
\[ \left[\begin{array}{ccc|c} 1 & -1 & -1 & 0 \\ 0 & 2 & 8 & 12 \\ 0 & 0 & 22 & 24 \end{array}\right] \]
We've reached upper triangular form. Each row has one fewer leading non-zero than the one above it. Now we read off the solution by back-substitution — starting from the bottom.

Back Substitution — Solve from Bottom Up

Solve for I₃ (Row 3)
\[ 22 I_3 = 24 \;\Longrightarrow\; I_3 = \frac{24}{22} = \frac{12}{11} \approx 1.09 \text{ A} \]
Solve for I₂ (Row 2)
\[ 2I_2 + 8I_3 = 12 \;\Longrightarrow\; 2I_2 = 12 - 8 \cdot \frac{12}{11} = 12 - \frac{96}{11} = \frac{132 - 96}{11} = \frac{36}{11} \] \[ I_2 = \frac{36}{22} = \frac{18}{11} \approx 1.64 \text{ A} \]
Solve for I₁ (Row 1)
\[ I_1 - I_2 - I_3 = 0 \;\Longrightarrow\; I_1 = I_2 + I_3 = \frac{18}{11} + \frac{12}{11} = \frac{30}{11} \approx 2.73 \text{ A} \]

Step 5 — Verify the Solution

Always check. Plug back into every original equation.

Verification
\[ \textbf{KCL: }\quad I_1 - I_2 - I_3 = \frac{30}{11} - \frac{18}{11} - \frac{12}{11} = \frac{0}{11} = 0 \;\checkmark \]
\[ \textbf{KVL-1: }\quad 12 - 2I_1 - 6I_3 = 12 - \frac{60}{11} - \frac{72}{11} = 12 - \frac{132}{11} = 12 - 12 = 0 \;\checkmark \]
\[ \textbf{KVL-2: }\quad -4I_2 + 6I_3 = -\frac{72}{11} + \frac{72}{11} = 0 \;\checkmark \]

✦ Final Answer
\[ I_1 = \frac{30}{11} \approx 2.73 \text{ A}, \qquad I_2 = \frac{18}{11} \approx 1.64 \text{ A}, \qquad I_3 = \frac{12}{11} \approx 1.09 \text{ A} \]

All currents are positive, confirming our assumed directions were correct.


The Linear Algebra Perspective

Step back. What did we actually do?

The Big Picture

We had three unknowns \((I_1, I_2, I_3)\) — a point somewhere in \(\mathbb{R}^3\). Each equation is a constraint — a plane in that 3D space. Three planes in general position intersect at exactly one point. That point is the solution.

\[ A\mathbf{x} = \mathbf{b} \;\Longrightarrow\; \mathbf{x} = A^{-1}\mathbf{b} \quad \text{(when } \det A \neq 0 \text{)} \]

Gaussian elimination is the computational procedure for finding \(A^{-1}\mathbf{b}\) without explicitly inverting \(A\). It's the same as computing the determinant — if it were zero, the planes wouldn't have a unique intersection (the circuit would be degenerate).

Why Linear Algebra Works Here

Ohm's law is linear: \(V = IR\). KCL and KVL are linear combination rules. The whole circuit is a linear system. Non-linear components (diodes, transistors) would require iteration — but for pure resistor networks, a single matrix solve gives the exact answer.

The matrix \(A\) encodes the entire topology of the circuit. The vector \(\mathbf{b}\) encodes the sources (batteries). Solving \(A\mathbf{x} = \mathbf{b}\) is the same as asking: given this physical structure and these energy sources, where does equilibrium land?

Kirchhoff's Recipe — Checklist

Step-by-Step Recipe
  1. Label nodes and assign current directions to every branch (guess is fine).
  2. KCL: Write one equation per independent node: \(\sum I_{\text{in}} = \sum I_{\text{out}}\).
  3. KVL: Walk each independent loop and sum voltage drops: \(\sum V_k = 0\).
  4. Check equation count: You need exactly as many independent equations as unknowns.
  5. Assemble \(A\mathbf{x} = \mathbf{b}\) and solve by row reduction or matrix inversion.
  6. Verify by plugging back into all original equations.
  7. Interpret signs: A negative current means the actual flow opposes your assumed direction.

Kirchhoff's Rules · KCL · KVL · Linear Systems · Gaussian Elimination